[Geoserver-users] Geoserver performance is low but Geoserver doesn't uses even a half of system resources.

Hi!

I am using GeoServer 2.4.2 on Windows Server 2003 x64. I have strangeness with performance.

Firstly is performance itself. For example, it is takes about a minute for my GeoServer to render 800x600 tiled map on each zooming or panning without any other requests. I am using map client based on OpenLayes. The layer is a topographic mosaic stored in ArcSDE (MSSQL Server). Tiles are 256x256.
I have following java tuning parameters:
-Xms2048m -Xmx2048m
-XX:MaxPermSize=512M
-XX:PermSize=512M
-XX:NewRatio=2
-XX:SoftRefLRUPolicyMSPerMB=36000
My system configuration is:
Software:
Windows Server 2003 x64;
JRE 7 with latest update;
Hardware:
CPU: 2 Intel Xeon E5335 (8 cores summary, 2 GHz each)
Memory: 8GB

Secondly, no matter how many requests are , the GeoServer uses mostly 2 halves of 8 cores or about 17-20 percent of CPU.
There are CPU load examples:
1 user requests tiled map http://s27.postimg.org/gv38mus1v/1_user_tiled.jpg
4 users request different tiled maps http://s24.postimg.org/4irrc98xh/4_users_tiled.jpg
8 users request different tiled maps http://s24.postimg.org/l9351l7cl/8_users_tiled.jpg

And thirdly, the processes which load CPU are strange.
Just look at this http://s8.postimg.org/f7ihdmvph/processes.jpg
First 3 processes (csrss.exe, wrapper.exe and java.exe) make most part of CPU load. What are doing wrapper.exe and java.exe I can understand, but what is doing csrss.exe? Why while GeoServer processes requests, the csrss.exe is making most part of CPU load? When system idle, csrss.exe does not load CPU, only when the GeoServer processes requests.

Somebody explain me please, why this all happens, and what I should do to increase my GeoServer performance and resource usage.
Your help will be very much appreciated.

Sergey.

Hi Sergey,

given that your server doesn't die of what the Japanese call karoshi, I
would look at the database and the network. However, please use first
something like Jvisualvm (in your Java bin directory) to check what the
geoserver Java process does when there are a decent number of concurrent
users. If there isn't any significant load and garbage collection activity,
it is suspicious and the next thing to check would be the database, as the
geoserver instance might just sit there and wait for the DB to get back.

Cheers

Christian

-----
____________________________

Dr Christian Maul
Project Manager

Information Services Branch
Department Environment and Primary Industries
Level13, Marland House, 570 Bourke Street
Melbourne 3000

PO Box 500, East Melbourne Vic 3002

Telephone: +61-3-8636 2325
Telefax: +61-3-8636 2813
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Geoserver-performance-is-low-but-Geoserver-doesn-t-uses-even-a-half-of-system-resources-tp5092576p5092629.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Hi Sergey,

something else. I was thinking myself whether I should deviate from the
default with the expiry of the soft references. Your definition is:

-XX:SoftRefLRUPolicyMSPerMB=36000

Expiring the softreferences so slowly might not improve the speed of your
server.
Please have a look here:

http://jeremymanson.blogspot.com.au/2009/07/how-hotspot-decides-to-clear_07.html

The default is 1000 msec per free MB. So let's calculate: Assuming you are
using 1000 MB and you have 1000 MB free memory these soft references would
expire after 36*1000 secs, i.e. 10 hours. Do you really want them to hang
around for that long?

Default is 1000, which would make it 16 minutes under the conditions above.
It is only a minor thing and will not solve your problems. However, running
my server with the line above in and out showed the following memory
changes. Please note the scale of the X-Axis are different, 0.5 minute and 2
minutes.

Test with 8 concurrent users, 35 different requests cycled trough. Results
400 requests/min, memory 1.6GB tendency stable

http://services.land.vic.gov.au/cm/Memory_with_expiring_softreferences.jpg

Same test. Results 370 requests/min, memory 1.8 GB and slowly creeping up.
CPU seems to be a bit less busy.
http://services.land.vic.gov.au/cm/Memory_with_keeping_softreferences.jpg

You see the load on the CPU in both cases is completely different to what
you report. (See first Email))

I wouldn't read anything into the differences of speed, because that is
within the variation of the DB or network, but the memory consumption and
the behaviour is a bit different.
I'll throw it out again and leave it with the default.

And, please put the PermSize to 128, but leave the MaxPermSize where it is.
I would be very surprised if your Geoserver instance uses more than 150 MB,
but it will be probably more in the vicinity of 100 MB. Once everything has
loaded this value doesn't change much. So, you are currently wasting 350
MB. Calling the Java VisualVM will tell you what this value actually is.

Cheers

Christian

-----
____________________________

Dr Christian Maul
Project Manager

Information Services Branch
Department Environment and Primary Industries
Level13, Marland House, 570 Bourke Street
Melbourne 3000

PO Box 500, East Melbourne Vic 3002

Telephone: +61-3-8636 2325
Telefax: +61-3-8636 2813
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Geoserver-performance-is-low-but-Geoserver-doesn-t-uses-even-a-half-of-system-resources-tp5092576p5092834.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Hi Sergey,
If you increase the logging level to “GEOSERVER_TOOLS”, then when you look in the logs after making a request it will show you a complete list of all the stuff GeoServer has done during the request including the timings it happened at. If you post that to this list (or to pastebin with a link) we should be able to get an idea what GeoServer is waiting on for the 60second render times.

I did something similar and discovered it’s the database lagging my system down.

Regards,
Jonathan

This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.

···

On 4 December 2013 08:11, Пашинский Сергей <pss47@anonymised.com> wrote:

Hi!

I am using GeoServer 2.4.2 on Windows Server 2003 x64. I have strangeness with performance.

Firstly is performance itself. For example, it is takes about a minute for my GeoServer to render 800x600 tiled map on each zooming or panning without any other requests. I am using map client based on OpenLayes. The layer is a topographic mosaic stored in ArcSDE (MSSQL Server). Tiles are 256x256.
I have following java tuning parameters:
-Xms2048m -Xmx2048m
-XX:MaxPermSize=512M
-XX:PermSize=512M
-XX:NewRatio=2
-XX:SoftRefLRUPolicyMSPerMB=36000
My system configuration is:
Software:
Windows Server 2003 x64;
JRE 7 with latest update;
Hardware:
CPU: 2 Intel Xeon E5335 (8 cores summary, 2 GHz each)
Memory: 8GB

Secondly, no matter how many requests are , the GeoServer uses mostly 2 halves of 8 cores or about 17-20 percent of CPU.
There are CPU load examples:
1 user requests tiled map http://s27.postimg.org/gv38mus1v/1_user_tiled.jpg
4 users request different tiled maps http://s24.postimg.org/4irrc98xh/4_users_tiled.jpg
8 users request different tiled maps http://s24.postimg.org/l9351l7cl/8_users_tiled.jpg

And thirdly, the processes which load CPU are strange.
Just look at this http://s8.postimg.org/f7ihdmvph/processes.jpg
First 3 processes (csrss.exe, wrapper.exe and java.exe) make most part of CPU load. What are doing wrapper.exe and java.exe I can understand, but what is doing csrss.exe? Why while GeoServer processes requests, the csrss.exe is making most part of CPU load? When system idle, csrss.exe does not load CPU, only when the GeoServer processes requests.

Somebody explain me please, why this all happens, and what I should do to increase my GeoServer performance and resource usage.
Your help will be very much appreciated.

Sergey.


Sponsored by Intel(R) XDK
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk


Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users