Creating demo database fails with sort error [CR #631097]

Creating the demo database may fail with an Informational stack trace for SORT and the error:

Exception Thrown from s_csort.cxx:1496, Err# 2,
tid 3676 origtid 3676
O/S Err#: 0, ErrID: 2062 (hs_csortexception);
SQLCode: -1009134, SQLState: 'QSB34', Severity: 14
[21023]: Insufficient buffers for 'Sort'.
-- (s_csort.cxx 1496)

The “insufficient buffers” error may be related to the small default Sybase IQ memory caches (-iqmc 32 and -iqtc 24) and a high number of processors on the machine.

Workaround:

If hyperthreading is on, set the -iqnumbercpus server startup option to the number of physical processors. This may avoid the “insufficient buffers” error, if -iqnumbercpus is 64 or less.

If hyperthreading is off and the number of processors is greater than 64, edit mkiqdemo.sh to increase the size of the memory cache. For example, on a machine with 128 processors, change -iqmc 32 and -iqtc 24 to -iqmc 100 and -iqtc 100.

See System Administration Guide: Volume 1 > Troubleshooting hints > Solutions for specific conditions > Performance issues > Slow performance on a multi-CPU or hyperthreaded machine.