1
votes

I am new to azure cloud and I have deployed my first Worker Role.

The process that takes 30 minute to complete in my local system is taking more than 1 hour on azure worker role.

To find the issue I have taken access of remote desktop of worker role. I checked the task manager and found that the worker role process (WaWorkerHost.exe) was using just 12% of the CPU even if no other process was running. If I run the same code in my local system it is taking 24-25% of CPU.

I think that is why the worker role is taking double time then in my local system.

The VM size of my worker role is Extra Large (8 Cores, 14336MB).

I think as there is no other process on worker role my process should get more CPU usage. But I am not able to find the way by which I can increase the CPU usage of worker role process (WaWorkerHost.exe) from azure portal.

Please with this.

Thanks.

1
What about the memory used ?Thomas

1 Answers

3
votes

CPU consumption only is not enough to determine if a machine is working hard or hardly working. Your assumption "CPU percentage is low, so the machine isn't busy (enough)" is way too simplistic. You should take more resources into consideration like disk access, memory usage and network access.

As you can imagine it's relatively simple to create an application that doesn't use up all your CPU, while it completely freezes your machine. Just have it read and write files from all over the disk, for instance.

EDIT:
Expanding in the first paragraph: what is it the Worker Role actually does? Does it connect to some type of storage? Or maybe an internally hosted database or files? Is it putting messages on a queue or calling external services?

All of these things might be the reason the Worker Role is taking longer to complete the task than your local machine does. For instance because of network latency. And while it seem like it isn't too busy if you only look at the CPU, it might be very busy waiting for an answer from an external resource.