[Mono-aspnet-list] CPU usage of mod-mono
Poiros
Poiros at hotmail.com
Mon Jun 18 17:37:48 UTC 2012
I have been using Apache with mod-mono to support ASP.NET applications on an
embedded device for a while now and I have noticed that the mod_mono process
still uses some CPU time after a request has been completed. To show this, I
have created this simple WebService:
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class Service1 : System.Web.Services.WebService
{
[WebMethod]
public bool Sleep()
{
System.Threading.Thread.Sleep(60000);
return true;
}
}
Then, I created a simple console application on windows that calls the Sleep
method of the WebService. While the console application makes the call, I
get this output from the top command on the device:
PID PPID USER STAT VSZ %MEM %CPU COMMAND
20308 1 daemon S 45584 22% 6% /usr/bin/mono
/usr/lib/mono/4.0/mod-mono-server4.exe --filename /tmp/mod_mono_server_qqq
--applications /qqq:/usr/htdocs/qqq --nonstop
When the request has returned successfully, I can still see some CPU being
used by the mod-mono process:
PID PPID USER STAT VSZ %MEM %CPU COMMAND
20308 1 daemon S 46908 23% 6% /usr/bin/mono
/usr/lib/mono/4.0/mod-mono-server4.exe --filename /tmp/mod_mono_server_qqq
--applications /qqq:/usr/htdocs/qqq --nonstop
I was wondering if it was xsp or mod-mono that was the cause of the CPU
usage. So I extented this test by using xsp4:
While running:
PID PPID USER STAT VSZ %MEM %CPU COMMAND
19074 5596 root S 45624 22% 2% /usr/bin/mono
/usr/lib/mono/4.0/xsp4.exe
After the request has returned:
PID PPID USER STAT VSZ %MEM %CPU COMMAND
19074 5596 root S 45956 23% 2% /usr/bin/mono
/usr/lib/mono/4.0/xsp4.exe
I am wondering why the mod-mono process and xsp4 are using the CPU when the
request has been completed. Also, I have noticed that the mod-mono process
is doing some extra processing compared to xsp4. why??
Any help would be greatly appreciated!
Erik Poirier, sw dev
--
View this message in context: http://mono.1490590.n4.nabble.com/CPU-usage-of-mod-mono-tp4650044.html
Sent from the Mono - ASP.NET mailing list archive at Nabble.com.
More information about the Mono-aspnet-list
mailing list