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.
| Version | CPU Time (s) | Elapsed Time (s) | Max Resident Set Size (MB) |
|---|---|---|---|
| 1.5 | n/a | n/a | n/a |
| 1.5.1 | 1579.72 | 2475.38 | 221 |
| 2.0 | 1182.99 | 1237.72 | 179 |
| 2.0.1 | 1191.07 | 1267.03 | 179 |
| 2.0.2 | 1181.57 | 1245.06 | 179 |
| 2.0.3 | 1192.81 | 1247.53 | 179 |
| 2.1 | 1200.48 | 1281.52 | 185 |
| 2.1.1 | 956.40 | 1015.45 | 185 |
| 2.1.2 | 896.68 | 953.27 | 184 |
| 2.2 | 948.17 | 1050.77 | 185 |
| 2.3 | 940.01 | 1054.05 | 187 |
| 2.3.1 | 943.06 | 1061.14 | 187 |
| 2.3.2 | 973.50 | 1114.84 | 187 |
| 2.4 | 996.29 | 1124.91 | 180 |
| 2.4.1 | 995.57 | 1108.05 | 180 |
| 2.5 | 1021.38 | 1149.89 | 180 |
| 2.5.1 | 1100.05 | 1248.43 | 180 |
Notes:
- 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.
- Version 2.0 ran without crashing although it crashed in the normal mode. This is probably because of a difference in which segment was kept in case of a duplicated segment (see below).
Database size and contents
The size of the database is approximately the same for the normal and slim versions of the program so no results are presented here. Since version 2.4 the results have been identical but previous versions 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.
| Version | CPU Time (s) | Elapsed Time (s) | Max Resident Set Size (MB) | Number Routed |
|---|---|---|---|---|
| 1.5 | n/a | n/a | n/a | n/a |
| 1.5.1 | 9.39 | 10.14 | 15 | 179 |
| 2.0 | 30.27 | 30.55 | 49 | 179 |
| 2.0.1 | 30.86 | 31.21 | 49 | 179 |
| 2.0.2 | 30.20 | 30.54 | 49 | 179 |
| 2.0.3 | 30.25 | 30.57 | 49 | 179 |
| 2.1 | 30.26 | 30.60 | 49 | 178 |
| 2.1.1 | 20.70 | 21.06 | 66 | 178 |
| 2.1.2 | 2.58 | 2.68 | 25 | 178 |
| 2.2 | 2.43 | 2.53 | 24 | 180 |
| 2.3 | 2.45 | 2.54 | 24 | 180 |
| 2.3.1 | 2.46 | 2.55 | 24 | 180 |
| 2.3.2 | 2.45 | 2.56 | 24 | 180 |
| 2.4 | 2.45 | 2.56 | 24 | 182 |
| 2.4.1 | 2.68 | 2.82 | 26 | 187 |
| 2.5 | 2.65 | 2.80 | 26 | 187 |
| 2.5.1 | 2.67 | 2.85 | 26 | 187 |
Version 2.1.1 benefits from the improvements in the normal 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 normal mode which reduces both memory and time.
Conclusions
The slim version of planetsplitter uses only one third of the memory and the time taken is one third longer compared to the normal version. The saving in memory is considerably more than the increase in time.The slim version of the router uses only one quarter of the memory but the time taken is four times as long. The tradeoff between time taken and memory is much more balanced.