firebird
firebird copied to clipboard
Information request buffer allocation
Server allocates memory for subj according to client request. And as long as client can request up to 4Gb - 1 this causes use of too much of virtual address space. Worse, currently server zeros that buffer in advance, which causes abuse of physical RAM.
Plans to fix first of all second problem. Return to virtual space later.
@mrotteveel Mark, can you retry your test with 0xFFFFFFFF size of buffers with current snapshot of fb6? I wonder did my small change affect performance.
@AlexPeshkoff I guess you mean 0xFFFEFFFF, as the code in protocol.cpp intentionally treats values in the range 0xFFFF0000-0xFFFFFFFF as if it's 16-bits unsigned (i.e., it ignores the high 16 bits if those high 16 bits are 0xFFFF).
Seems to be a lot better:
Test run (unmodified Jaybird): 6.0.0.708: 2m36s 6.0.0.770: 2m38s
Test run (modified Jaybird): 6.0.0.708: 47m29s 6.0.0.770: 5m09s
Note that Firebird's memory still spikes in Task Manager, as it reports virtual memory, not physical memory.
In short, the change reduced the runtime from ~47 minutes to ~5 minutes.
In that case I will backport it to all supported branches - and proceed with API enhancement no hurry.