On 9/22/2014 8:19 AM, Alex Peshkoff wrote: > Current memory manager was ported from Vulcan a few years ago, at the > most beginning of FB3 project. Certainly the first thing to do was > performance comparison. I've tries on fbtcs, backup/restore of some > real life databases, tpc/c and something else. Unfortunately I did not > save results for all tests and I do not remember them now - too many > time has gone, but speedup for all tests was between 5 and 10 > percents, and certainly none of them showed worse performance. > Certainly I knew about O(n) performance issues, but that time > performance growth appeared enough for me, and I've decided to return > to that issue later. Looks like time for it came.
Then it is an early version of my personal memory manager. I wrote it because memory management was becoming a gating performance factor. At the time it was written it was twice as fast as the default malloc on Linux and four times the speed of the default malloc on Windows, though I understand that with tuning, the Windows memory manager approaches the speed of the Linux memory manager. Since the Vulcan snapshot, the free hunk management was replaced with AVL trees. For a typical database load this was a modest improvement but for the pathological cases that Nikolay referenced, it was vastly better. It's probably available on a pre-Oracle MySQL V6 beta download, but it's also contaminated with GPL. Later stuff I added was thread specific sub-pools to allow most allocation/deallocation requests to be serviced without thread synchronization. Periodically, free blocks in the thread specific sub-pool would be passed back to the primary pool. Probably due to the unavoidable fragmentation of the sub-pools jealloc proved better. In a similar vein, if Firebird is still using the venerable Quick Sort that a coded more or less straight from Knuth, Volume 2, in 1984, see Bentley & McIlroy's "Engineering a Sort Function" for a must faster version. If anyone is interested, I've turned it into a C++ template, which I'd be happy to contribute. ------------------------------------------------------------------------------ Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel