5.6. Point Size Limit

There is an inter-process communication message size limit that all Cogent processes must agree upon. This defaults to 8192 bytes, and no point value can exceed this number, less a certain variable amount of header, so conservatively this number is about 8100 bytes. We'll call this the IPC Message Size.

There is an additional buffer specific to the DataHub that used to create exception messages which is nominally 1000 bytes in length. This is kept small to limit the number of exceptions that go out in a single IPC message. We'll call this the Exception Message Size.

When a point representation is constructed, it is constructed in the exception buffer, so that limit is 1000 bytes, less some header. A string value is further reduced because strings may contain escaped characters, and the rendering code estimates the size conservatively by assuming the worst case: all characters are escaped, and each character in the input string requires two characters to render. This limits the string to (1000 - header) / 2, giving us a few characters less than 500.

You can increase the Exception Message Size with the -b option to the DataHub. This size cannot be greater than the IPC Message Size. There is also a hard limit of 65000 characters.

You can increase the IPC Message Size by setting the environment variable IP_MSG_DEFAULT_SIZE. You must make this environment variable the same for all programs that are going to communicate with the DataHub. This size cannot be greater than 65535 if you plan to have it run in Linux, or over a QNX network.

For example, to work with larger strings:

[sh]$ export IP_MSG_DEFAULT_SIZE=65535
...
[sh]$ datahub -b 65000
...
[sh]$ writept -s test '1234567890...' (1)
...
[sh]$ readpt -s test
(1)

Insert a large number of characters here.

These settings would allow you to create strings up to approximately (65000 - 30) / 2 bytes in the DataHub.