SHARD_MEM configuration parameter
Specifies how to allocate shared memory for sharded queries on a shard server.
- onconfig.std value
- SHARD_MEM 0
- range of values
0
: Memory allocation for sharded queries comes from a single memory pool.- takes effect
- After you edit your onconfig file and restart the database server.
Usage
SHARD_MEM 0
is the traditional method of memory-allocation. Use this setting
when resource allocation is more important than performance.
SHARD_MEM 1
prevents multiple threads from simultaneously accessing a memory
pool. The performance of large-scale sharding environments can improve because memory allocation is
done by multiple threads that are working in parallel.
SHARD_MEM 2
improves performance at the cost of increased memory usage. Memory
allocation requests are increased to the closest fixed-block size, so that free memory blocks can be
found faster. Memory pools are not associated with specific CPU virtual processors, so memory can be
freed directly to the memory pool.