PG_Zero: Faster Page Allocation Proposed For Linux By Zeroing Out Pages Ahead Of Time
A set of patches sent out Sunday morning for "PG_zero" could provide much faster page allocation performance by the Linux kernel.
Rather than zeroing out any previous contents when allocating pages, the proposed PG_zero functionality would zero out pages ahead of time. Pages zeroed out ahead of time are marked with a new PG_zero bit that is checked when allocating new pages to ensure they were already cleared. If cleared, the pages can be more quickly allocated and with saving CPU time.
The initial motivation for PG_zero was for faster virtual machine creation. When transparent huge-pages are disabled, the patch while being tested dropped the VM creation time from 23~24 seconds down to 10~11 seconds. While that is significant by itself, when transparent huge-pages were enabled PG_zero led the VM creation speed to go from 14~17 seconds down to less than two seconds.
The initial PG_zero proposal can be found on the kernel mailing list.
Rather than zeroing out any previous contents when allocating pages, the proposed PG_zero functionality would zero out pages ahead of time. Pages zeroed out ahead of time are marked with a new PG_zero bit that is checked when allocating new pages to ensure they were already cleared. If cleared, the pages can be more quickly allocated and with saving CPU time.
The initial motivation for PG_zero was for faster virtual machine creation. When transparent huge-pages are disabled, the patch while being tested dropped the VM creation time from 23~24 seconds down to 10~11 seconds. While that is significant by itself, when transparent huge-pages were enabled PG_zero led the VM creation speed to go from 14~17 seconds down to less than two seconds.
The initial PG_zero proposal can be found on the kernel mailing list.
18 Comments