If you're using Informix Dynamic Server 10.00.xC5 or later you can make use ofan undocumented performance feature known as Virtual Processor Memory Cache.

The VP memory cache holds a configurable amount of memory in a location thatallows userthreads to retrieve memory blocks without obtaining the sh_lockmemory latch.In some situations (mainly when there are many CPU VPs) the memory latch canbecome a bottleneck (use onstat -g spi to monitor usage of this latch).The VP cache can also reduce the search time for large memory blocks used insorts and other operations.

This feature can improve performance on busy systems with a large number ofCPU VPs and spare memory capacity. By default the VP memory cache is set to 0(switched off). Youcan set the size in kilobytes with the onconfig parameterVP_MEMORY_CACHE_KB or set it dynamically with onmode -wm.For example to set VP cache to 800 Kb per CPU VP:

onmode -wm VP_MEMORY_CACHE_KB=800

Note: Apart from 0, the minimum allowed setting is 800. The total size of the VPmemory cache (VP_MEMORY_CACHE_KB * number of CPU VPs) should be no greaterthan 10 to 20% of shared memory size. 10% should be ample in mostcircumstances. In tests 800 was a good value and gave 97% cache hit rate.

A system may benefit from a higher cache setting if it has a large numberof userthreads, or many sorts (or other operations which involve large memoryblock allocations). The VP memory cache does increase consumption of memorysince some memory is not shared between CPU VPs. If SHMTOTAL is set and mostof the available memory is being used consider increasing SHMTOTAL accordingly.

To monitor performance of the VP memory cache use the undocumented onstatoption onstat -g vpcache.

Note that blogged does not equal documented or supported. This feature will besupported in a later release, so for now use at your own risk. Internaltests have shown good results and R&D are interested in external feedback.If anyone tries it pleasesend me an email whichI will forward, or comment via the blog.