Routino : Slim Mode Benchmarking

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 standard benchmarks also applies.

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)
2.01421.151464.61179
2.0.11423.441462.60179
2.0.21410.941449.99179
2.0.31408.081449.21179
2.11418.771461.47187
2.1.11143.191175.97187
2.1.21088.751123.88187
2.21160.341216.16187
2.31147.531192.94187
2.3.11136.841193.56187
2.3.21154.331205.21187
2.41174.061222.90180
2.4.11158.521204.50180
2.51140.911188.23180
2.5.11275.881343.40180
2.6355.64425.22188
2.7353.36418.29188
2.7.1356.39426.58188
2.7.2365.26422.65191
2.7.3340.98385.08189
3.0341.42432.43190
3.1 / 3.1.1355.11402.86304

Planetsplitter (slim) time vs version graph

Planetsplitter (slim) memory vs version graph

Version 2.0 ran without crashing although it crashed in the standard mode. This is probably because of a difference in which segment was kept in case of a duplicated segment (see below).

Version 2.6 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 standard 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 was increased which is visible in these results only as a very small increase in memory used.

Version 2.7.3 and 3.0 has no significant changes to the planetsplitter so the time taken is the same.

Version 3.1 (same as 3.1.1) uses significantly more memory and slightly more time. This is because of the use of 64-bit nodes for OSM IDs.

Database size and contents

The size of the database is approximately the same for the slim and standard 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
2.032.9833.0250179
2.0.133.0133.0550179
2.0.229.1529.1849179
2.0.332.6432.6749179
2.132.4732.5049178
2.1.122.1722.1966178
2.1.22.732.7425178
2.22.692.6924180
2.32.712.7225180
2.3.12.622.6324180
2.3.22.662.6724180
2.42.602.6124182
2.4.12.882.8826187
2.52.812.8226187
2.5.12.842.8526187
2.61.451.4527187
2.71.431.4427187
2.7.11.451.4627187
2.7.21.441.4433187
2.7.31.451.4533187
3.01.411.4233187
3.1 / 3.1.11.441.4534187

Router (slim) time vs version graph

Router (slim) memory vs version graph

Version 2.1.1 benefited from the improvements in the standard 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 standard mode which reduces both memory and time.

Version 2.6 was 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 standard mode.

Versions 2.7 and 2.7.1 made no changes to the performance.

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

Version 2.7.3 had no changes to the routing.

Version 3.0 has a very small reduction in time, possibly due to the parsing of the profiles files.

Version 3.1 (same as 3.1.1) has a slight increase in time due to the routing from both ends towards the middle.

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 standard 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 standard version. The tradeoff between time taken and memory used is much more balanced.