<HTML>
<HEAD>
<TITLE>Re: [mapserver-users] High CPU</TITLE>
</HEAD>
<BODY>
<FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Steve -<BR>
<BR>
Your CPU spends 100% of its time doing SOMETHING. &nbsp;You seem to be focusing on high CPU utilization by a process as being a bad thing, and in many case it is instead a very good thing. &nbsp;Many MapServer applications are I/O bound, waiting for disk seeks, etc. &nbsp;Since your CPU is not waiting for I/O to any significant degree, 100% CPU utilization means you&#8217;re not suffering from that I/O limitation.<BR>
<BR>
If your machine is not doing anything else, seeing 100% CPU utilization is good. &nbsp;If you are testing with 10 other applications in active use, having one of them consume 100% of the CPU is bad. &nbsp;But I think you may need to do more sophisticated load testing in order to evaluate your situation; adding more RAM is most likely to be helpful in a multi-user, heavily-loaded situation. &nbsp;It might not help much, however, and you can only tell by doing multi-user (and in your case, multi-application) simulated load tests.<BR>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;- Ed<BR>
<BR>
Ed McNierney<BR>
205 Indian Hill Road<BR>
Groton, MA &nbsp;01450<BR>
<a href="ed@mcnierney.com">ed@mcnierney.com</a><BR>
+1 (978) 761-0049<BR>
<BR>
<BR>
<BR>
On 9/7/08 4:32 PM, &quot;Steve White&quot; &lt;<a href="steve@online-archaeology.co.uk">steve@online-archaeology.co.uk</a>&gt; wrote:<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Ed &#8211;<BR>
&nbsp;<BR>
The reason I feel edgy is because I have other hosted .NET applications on the same box.<BR>
&nbsp;<BR>
I discovered from my tests that another process (CSRSS.exe) is also using excessive CPU (about 40%), so it&#8217;s not all MapServer, so I&#8217;m going to set up some auto tests scripts to find out what kind of a ceiling I have and see if I can pull down CSRSS.exe a bit.<BR>
&nbsp;<BR>
Cheers,<BR>
&nbsp;<BR>
Steve<BR>
&nbsp;<BR>
<BR>
</SPAN><FONT SIZE="2"><SPAN STYLE='font-size:10pt'><B>From:</B> Ed McNierney [<a href="mailto:ed@mcnierney.com">mailto:ed@mcnierney.com</a>] <BR>
<B>Sent:</B> 07 September 2008 13:48<BR>
<B>To:</B> Steve White; Paul Ramsey<BR>
<B>Cc:</B> <a href="mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><BR>
<B>Subject:</B> Re: [mapserver-users] High CPU<BR>
</SPAN></FONT></FONT><FONT FACE="Times New Roman"><SPAN STYLE='font-size:12pt'> <BR>
</SPAN></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Steve -<BR>
<BR>
Would you prefer your CPU was sitting idle? &nbsp;Keeping the CPU busy is a good thing, isn&#8217;t it? &nbsp;It means your network, disk, and other resources are not preventing your CPU from working at full capacity.<BR>
<BR>
What makes you feel that running your CPU at 100% capacity is a bad thing?<BR>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;- Ed<BR>
<BR>
Ed McNierney<BR>
205 Indian Hill Road<BR>
Groton, MA &nbsp;01450<BR>
<a href="ed@mcnierney.com">ed@mcnierney.com</a><BR>
+1 (978) 761-0049<BR>
<BR>
<BR>
<BR>
On 9/7/08 4:20 AM, &quot;Steve White&quot; &lt;<a href="steve@online-archaeology.co.uk">steve@online-archaeology.co.uk</a>&gt; wrote:<BR>
The problem is that CPU shoots to 100% while tiles are being generated from<BR>
a remote WMS call.<BR>
<BR>
The shp2img dump was taken directly on the server but the problem occurs<BR>
when I send remote WMS requests to the server.<BR>
<BR>
I'm starting to think that 640MB RAM isn't enough and I should probably bump<BR>
it up to 1GB.<BR>
<BR>
<BR>
-----Original Message-----<BR>
From: Paul Ramsey [<a href="mailto:pramsey@cleverelephant.ca">mailto:pramsey@cleverelephant.ca</a>]<BR>
Sent: 07 September 2008 06:07<BR>
To: Steve White<BR>
Cc: <a href="mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><BR>
Subject: Re: [mapserver-users] High CPU<BR>
<BR>
It took 0.3s to run to completion, what's the problem precisely?<BR>
<BR>
P.<BR>
<BR>
On Sat, Sep 6, 2008 at 1:35 PM, Steve White<BR>
&lt;<a href="steve@online-archaeology.co.uk">steve@online-archaeology.co.uk</a>&gt; wrote:<BR>
&gt; Thanks Jeff -<BR>
&gt;<BR>
&gt;<BR>
&gt;<BR>
&gt; - &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;I upgraded to MS4w 2.2.9<BR>
&gt;<BR>
&gt; - &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;I ran shptree.exe and produced the index file<BR>
&gt;<BR>
&gt; - &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;My results of shp2img.exe are below<BR>
&gt;<BR>
&gt; - &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;I don't think any projections-on-the-fly are occurring<BR>
&gt;<BR>
&gt;<BR>
&gt;<BR>
&gt; Shp2img dump:<BR>
&gt;<BR>
&gt;<BR>
&gt;<BR>
&gt; msDrawMap(): Layer 0 (OA), 0.015s<BR>
&gt;<BR>
&gt; msDrawMap(): Drawing Label Cache, 0.000s<BR>
&gt;<BR>
&gt; msDrawMap() total time: 0.015s<BR>
&gt;<BR>
&gt; SaveImage() total time: 0.297s<BR>
&gt;<BR>
&gt; msFreeMap(): freeing map at 0144B498.<BR>
&gt;<BR>
&gt;<BR>
&gt;<BR>
&gt; I'm still getting very high CPU usage with just one active session, so<BR>
&gt; there's no way I can go into production till this is resolved.<BR>
&gt;<BR>
&gt;<BR>
&gt;<BR>
&gt; Any other things I can look at?<BR>
&gt;<BR>
&gt;<BR>
&gt;<BR>
&gt; Cheers,<BR>
&gt;<BR>
&gt;<BR>
&gt;<BR>
&gt; Steve<BR>
&gt;<BR>
&gt; _______________________________________________<BR>
&gt; mapserver-users mailing list<BR>
&gt; <a href="mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><BR>
&gt; <a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><BR>
&gt;<BR>
&gt;<BR>
<BR>
<BR>
_______________________________________________<BR>
mapserver-users mailing list<BR>
<a href="mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><BR>
<a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><BR>
<BR>
</SPAN></FONT></BLOCKQUOTE>
</BODY>
</HTML>