Issue Details (XML | Word | Printable)

Key: CORE-3457
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Dmitry Yemanov
Reporter: Dmitry Yemanov
Votes: 1
Watchers: 7

If you were logged in you would be able to see more operations.
Firebird Core

Optimize the temporary space manager regarding small chunk allocations

Created: 30/Apr/11 08:44 AM   Updated: 15/Jul/15 04:27 AM
Component/s: Engine
Affects Version/s: None
Fix Version/s: 2.5.1, 2.1.5, 3.0 Alpha 1

QA Status: Cannot be tested

 Description  « Hide
Currently, the temp space manager is not tuned for small allocations properly. This is so because historically it has been developed primarily for sorting/merging purposes that are known to work with big memory blocks, but now it's also used for temporary blobs and record sets which can be quite small.

First of all, it allocates 1MB of memory even for a few bytes of the requested temporary space. In the concurrent environment, it could be a problem, forcing other processes to swap their temporary data to disk instead of using the available memory.

Second, the internal segment allocator uses the linear search which is sub-optimal when number of segments is large (many small blocks). This issue manifests itself while releasing thousands of tiny temporary blobs at the transaction completion.

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.