Messages in this thread | | | Date | Mon, 21 Jul 2014 17:55:40 +0200 | From | Joerg Roedel <> | Subject | Re: [PATCH 0/6] PM / Hibernate: Memory bitmap scalability improvements |
| |
Hi,
On Mon, Jul 21, 2014 at 04:39:05PM +0200, Pavel Machek wrote: > So you reduced O(n) to O(n/2 log(n)) ... that's still O(n log(n)), right?
Radix trees have a memory complexity of ~O(n + log(n)). We have an additional log(n) space requirement for the tree itself, but we linearly safe memory for each node compared to the old implementation. Since n beats log(n) at some point there is a point where we need less pages with the new code than with the old. That break-even point is somewhere around 32GB of RAM, for smaller sizes we need 2 additional pages at most.
> > > You can also modify the above tool to give you some data to plot, then > > you will also SEE that there is still a linear relationship between RAM > > size and memory required by the old and new memory bitmap > > implementation. > > I believe radix tree is O(log(N)) per operation, but its memory is > certainly not linear.
Numbers beat believes.
Joerg
| |