[Python-Dev] The untuned tunable parameter ARENA_SIZE
songofacandy at gmail.com
Fri Jun 2 07:56:31 EDT 2017
> I would be curious of another test: use pymalloc for objects larger
> than 512 bytes. For example, allocate up to 4 KB?
Since current pool size is 4KB and there is pool_header in pool,
we can't allocate 4KB block from pool.
And if support 1KB block, only 3KB of 4KB can be actually used.
I think 512 bytes / 4KB (1/8) is good ratio.
Do you mean increase pool size?
How about adding configure option like server-mode?
SMALL_REQUEST_THRESHOLD 1024 // 2x
POOL_SIZE (16*1024) // 4x
ARENA_SIZE (2*1024*1024) // 8x, and same to huge page size.
> In the past, we already changed the maximum size from 256 to 512 to
> support most common Python objects on 64-bit platforms. Since Python
> objects contain many pointers: switching from 32 bit to 64 bit can
> double the size of the object in the worst case.
More information about the Python-Dev