7
votes

I'm using the Worker Role machines (Medium -> 2 Cores with 3,5 GB of Ram) to do massive work, and I'm able to use 100% of the CPU (of both cores) and 85% of RAM.

During this work, each takes around 20 minutes/ 40 minutes the Azure thinks the machine is unhealthy and stops all my work. In the Portal I see my worker instance are getting the message "Waiting for the status (Role cannot be reached by the host system).

Can anyone know a work around that doesn't include: 1) Use a more power full Role with cores that I will not use 2) Try to reduce the CPU usage by my application (100% CPU usage is what we want to use)

Thanks in advance Rui

2
This sounds like some kind of deadlock. May it be that Azure does some callback to your instances and those block because of high load?sharptooth
Deadlock where ? Doesn't seems deadlock, seems the machine is using her full resources to run my big task, and doesn't have resource to own applications (that are checking the connectivity or other measurements tools...)rsantos
I dunno where exactly. Something like a "status check" handler taking long. Btw you can get Azure internal logs and try read them.sharptooth
Hi, thanks for your comment, this is nothing that I could control probably... this is something that I think MS should take care, I'm using a machine with 2 cores and I will try to use the resources at 100%, if this don't leave resource for MS run their process to control the health of the machine, this should be controlled by MS, for instance running this process with Higher priority... I would just need a confirmation of this "bug" from MS ;)rsantos
They will request logs anyway which means you could just as well get those logs and read them yourself.sharptooth

2 Answers

0
votes

try this:

Thread.CurrentThread.Priority = ThreadPriority.BelowNormal

maybe some other things(processes, threads) need lower priority's also but this should keep the cpu utilization at 100%

for (external) processes start them with the following code(this is vb but you should be able to covert it to your language

Dim myprocess As New System.Diagnostics.Process() 
myprocess.StartInfo.FileName = "C:\the\path\to\the\the\process.exe" 
myprocess.Start() 
myprocess.PriorityClass = ProcessPriorityClass.BelowNormal

you could set the priority of the current process of the worker role but this might be dependent of other processes so watch out, its better to set the priority of the demanding process lower this won't slow it down unless there is other work to be proformed

Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.AboveNormal
0
votes

This is something that is affecting a service I'm running in a Windows Azure as well. I have just tried manually setting the Priority of WaAppAgent to High. Hopefully that helps.

But really this is shouldn't be my problem. Sometimes my database is running at 100% CPU and really this is the WORST possible time for a restart.

I really don't want to over provision resources just so some heart beat will be happy. Do the VM instances have a heart beat event as well? Maybe the solution is to switch to using a VM instead of using a PaaS role?