[mapserver-users] speed performance question
Stephen Woodbridge
woodbri at swoodbridge.com
Sat Apr 13 06:23:59 PDT 2002
Joe,
I'm not sure if there is any definitive document, but here is some
information that you might find useful in sizing your own
implementation. If you haven't seen or used:
http://www.joedog.org/
I would recommend getting it (its free) or something like it. I just did
some analysis on a site that will be migrated to a production server at
some point. Here is what I did and some of my insights.
My goal was not to get optimum performance out of the box. It was to
prove the the mapserver configuration was as optimimal as I could make
it and to demonstrate that the mapserver times were consistanly in the
2-6 sec range and be able to explain why the large numbers where system
configuration issue and not mapserver issues.
I wanted to be able to know two things, mainly:
1) what was user response times under load
2) what was mapserver response times under load
These are both important and tell you different things.
1) talks more to the system configuration and tuning and
2) tells you how well you have mapserver configured.
How I did my testing using joedog: With joedog you create a file of urls
that you want multiple joedog "users" to lay seige on the server, so you
can tell it to attach the server with 5, 10, 100, whatever simulated
users. Each user grabs a random url from the file and hits the server
then sleep a specified amount of time and repeats until the end criteria
are met.
So I created urls, secifically picking locations that were in each of my
different shapefiles and at 3-5 different zoom scales. The idea being to
avoid all the users hitting the same location and getting the benefit of
the system cache a small number of files in its system cache.
I then ran the test with 1, 2, 3, 5, 10, 15, 20, ... users until a
swampped the system. I also ran some sample test running joedog on the
server and running it remote (from the US to Europe) to see if I was
getting internet lag in the results (if it was there it was not
measurable.
Oh, you need to run enough samples at each user count to get a good
average that is above the noise. You can test this by rerunning a sample
and seeing it the numbers change significantly.
Here is what I found out using a 1-GHz Athalon, 1GB mem, running RH 7.2:
1) it is critically important that EVERY *.shp in your configuration
have a corresponding *.qix file.
2) I was able to get mapserver response time to be consistantly in the
2-6 sec range if the system file cache was working for me. If not this
time could go as high 20 - 40 secs with an occasional 60 sec outlier
when the system was heavly swamped. This difference I attribute to how
well the urls are hitting the system cache and the fact that one CPU can
only process data as fast as one CPU can do it.
3) Summary of some of user response times from joedog:
run
users delay length response time
-------------------------------------------
1) 10 15s 15m 39.78 secs
2) 10 5s 5m 40.48 secs
3) 5 5s 5m 22.04 secs
4) 3 5s 5m 18.57 secs
5) 1 5s 5m 16.96 secs
6) 1 0s 5m 9.80 secs
7) 1 5s 5m 14.27 secs (repeat of 5)
8) 1 0s 30m 15.10 secs (repeat of 6 for 30m)
Remember my comment about getting a large enough sample size? compare 5
and 7, 6 and 8 above.
For all the horsepower of this system, I was not impressed by the
performance. In fact it seemed significantly slower than my 450 MHz
AMD-K2 box and compiling seemed to take longer (but I did not run any
comparision timing tests), but it may mean that whomever set it up, or
the out of the box setup was not aimed at a server.
If I were setting up a server it would definitely be multi-process
before any thing else. Fast disks come next, this mapserver had like 18
GB of data that it had to romp through for every image, so have
tileindexes and shptree indexes made a huge difference. A fast SCSI raid
array is expensive, but if you expect lots of hits you are going to need
it.
I'm not sure I have answered your question, but I hope I have given you
the tools or ideas so you can size your own config up and document your
server requires.
-Steve Woodbridge
http://web-maps.org/
Joe Bussell wrote:
>
> Greetings,
> What is the real story on hardware requirements? Is anyone putting
> mapserver through heavy load tests? I have read two threads in the
> mailing list archives requesting the same. There are no replies.
>
> Any information would be helpful.
>
> Cordially,
>
> Joe Bussell
> On Time Systems
More information about the MapServer-users
mailing list