Routino : Benchmarking (Slim Mode)


Introduction

The slim mode for the planetsplitter and router programs are separate versions of the programs that do not map the database files into memory. This allows the total size of the database to be larger than 2GB on a 32-bit system or use on systems where mapped files are not available or where the size of the mapped files counts towards the memory quota (some virtual machine environments). The need to seek within the file to read (or write) the data rather than allowing the operating system to optimise things will reduce the speed.

The information about the slim mode is presented below in an abbreviated form with no detailed descriptions. Unless there is a specific description of a reason for a change between versions it should be assumed that the description for the non-slim mode also applies. The tests with the slim mode have only been made with version 1.5 onwards.

Database Generation

Time and Memory

The results for time and memory are presented below as a table and a pair of graphs.

VersionCPU Time (s)Elapsed Time (s)Max Resident
Set Size (MB)
1.5n/an/an/a
1.5.11734.362330.35221
2.01182.991237.72179
2.0.11191.071267.03179
2.0.21181.571245.06179
2.0.31192.811247.53179
2.11200.481281.52185
2.1.1956.401015.45185
2.1.2896.68953.27184
2.2948.171050.77185
2.3940.011054.05187
2.3.1943.061061.14187
2.3.2973.501114.84187
2.4996.291124.91180
2.4.1995.571108.05180
2.51021.381149.89180
2.5.11100.051248.43180
2.6341.67396.49188
2.7337.22416.98188
2.7.1334.05398.63188
2.7.2344.17420.73191

Notes:

  1. Version 1.5 failed to run without crashing - since a bug-fix release is available (1.5.1) there was no point in patching the source code to allow it to run.
  2. Version 2.0 ran without crashing although it crashed in the non-slim mode. This is probably because of a difference in which segment was kept in case of a duplicated segment (see below).

Planetsplitter (slim) time vs version graph

Planetsplitter (slim) memory vs version graph

Version 2.6 has had a large number of speed improvements, a lot of which are particularly applicable to slim mode. In addition to the file buffering which also benefitted the non-slim mode there is a larger memory cache of recently accessed objects (nodes, ways etc).

In version 2.7.2 the memory cache for slim mode has been increased which is visible in these results only as a very small increase in memory used. What is not visible in these benchmarks is that some computer systems will have a much improved performance with this version. On systems that have a very limited amount of memory (therefore a small operating system disk cache) and slow disk access the effect of the slim mode memory cache is magnified. Instead of being a few seconds slower it may be faster by a factor of two or more.

Database size and contents

The size of the database is approximately the same for the slim and non-slim versions of the program so no results are presented here. Since version 2.4 the results have been identical. In previous versions it varied because the sort function gave different results for overlapping segments depending on the amount of memory used for sorting.

Routing

Time and Memory

The results for time and memory are presented below as a table and a pair of graphs.

VersionCPU Time (s)Elapsed Time (s)Max Resident
Set Size (MB)
Number
Routed
1.5n/an/an/an/a
1.5.19.3910.1415179
2.030.2730.5549179
2.0.130.8631.2149179
2.0.230.2030.5449179
2.0.330.2530.5749179
2.130.2630.6049178
2.1.120.7021.0666178
2.1.22.582.6825178
2.22.432.5324180
2.32.452.5424180
2.3.12.462.5524180
2.3.22.452.5624180
2.42.452.5624182
2.4.12.682.8226187
2.52.652.8026187
2.5.12.672.8526187
2.61.371.3827187
2.71.421.4327187
2.7.11.351.3627187
2.7.21.341.3633187

Router (slim) time vs version graph

Router (slim) memory vs version graph

Version 2.1.1 benefits from the improvements in the non-slim mode of operation with no specific slim mode improvements but this does increase the memory used significantly.

Version 2.1.2 included a specific optimisation for slim mode by using more RAM to cache some data which greatly improves the time taken. The other improvement in this version is the same as for non-slim mode which reduces both memory and time.

Version 2.6 is also faster at routing, mainly because of the additional object cache that also helps the database generation but also for the same reasons as the non-slim mode.

Versions 2.7 and 2.7.1 make no changes to the performance.

Version 2.7.2 shows an increase in memory usage due to the increased size of the memory cache but there is no change in the time taken.

Conclusions

The slim version of database generation uses only one third of the memory and the time taken is one third longer compared to the non-slim version. The saving in memory is considerably more than the increase in time.

The slim version of the router uses only one third of the memory but the time taken is about three times as long as the non-slim version. The tradeoff between time taken and memory used is much more balanced.