[Openstreetmap-dev] ticket 134

Lars Aronsson lars at aronsson.se
Thu Feb 16 23:17:26 GMT 2006


Mikel Maron wrote:

> Both requests for streets and landsat timed out. The server is 
> simply overloaded.

The only thing that is "simply" in this is that the current 
behaviour is simply unacceptable.  My measurements using wget 
--no-cache indicate that satellite image tiles with streets drawn 
take 3 seconds, but when streets are failing the call returns 
after 2 seconds.  If I get a faulty HTTP response (without 
streets) 2 seconds after the HTTP request was sent, then what is 
the timeout configured to be?  Sometimes I get responses after 6 
or 12 seconds - and right now I think that is fine if the streets 
are drawn.  I don't mind the slowness as much as the failure to 
deliver.  Once we get the tile server to deliver, I'm sure we can 
work on the performance.

My wget tests were done in the middle of the night, when nobody 
uses the server (you can prove me wrong by telling me how many 
tile requests were served every hour of the last week, because I 
have no idea), and the tile was not downtown London where streets 
are everywhere, but Swedish countryside.

Tile generation did work 14 days ago, before Magick was 
introduced.  And it did work for some hours this Sunday afternoon 
February 12th.  At that time, streets were shown in every tile 
where they should, and all yellow markers were visible in the edit 
applet.  This enabled me to draw some 50 km of country road and 
four small villages.  But that's the only contribution I have been 
able to make in the last two weeks.

> There's one I forgot!! THIS COULD BE CRUCIAL. Apache is also too 
> heavy duty for this job on the tile server. We'd get much better 
> performance replacing it with lighttpd. Anyone have experience 
> with configuring lighttpd?

No Mikel, this is not it.  Apache is fast enough.  Together with 
the Squid and the Linux kernel, Apache is the least suspected 
component of this system.  But the test is easy to do.  Let Apache 
serve a static file, such as a PNG image, and measure (with wget) 
how fast or slow that is.

> I think mainly Ruby takes too long to do all the calculations 
> and drawing commands.

How can we move from thinking to knowing?

One way is to add a CGI parameter &debug=yes to the URL.  In 
streets.rbx this could be used for generating more debug log 
output.  This would not add load to the ordinary requests, only 
when I want to do my wget tests.  And then I would need a way to 
read that logfile.  For example:

debug = cgi['debug']
start = Time.now()

  # rest of streets.rbx here...

if (debug == 'yes')
  elapsed = Time.now() - start
  @@log = Osmlog.instance
  @@log.log("streets.rbx: Call took " + elapsed + " seconds for "
            + "bbox = " + bbox + ", "
            + "tile_too_big = " + tile_too_big)
end


-- 
  Lars Aronsson (lars at aronsson.se)
  Aronsson Datateknik - http://aronsson.se




More information about the dev mailing list