[Devel] [TRD] optimization for zero-filled pages written by VMs

Konstantin Khorenko khorenko at virtuozzo.com
Thu Sep 7 16:41:11 MSK 2017


1. Feature

Optimization for zero-filled pages written by VMs
https://jira.sw.ru/browse/PSBM-64658

2. Description

Any page before being written to the physical swap is checked if it is filled
by zeroes and mapped to a zero page in this case instead of actual swap out.

The feature is implemented on the tswap level, so the page is checked for zeroes
before putting to tswap.

Usecase when the feature is expected to provide most performance boost: many
Windows-based VMs started simultaneously on a Hardware Node with overcommit
=> on any restart of an overcommitted HN which runs Windows-based VMs.

Windows-based VMs are chosen here because Windows is known to rewrite its RAM
with zeroes on boot and lazily while it is running.

3. Products

Virtuozzo 7

Packages versions (or later):
      vzkernel-3.10.0-514.26.1.vz7.35.8

4. Testing

Start N Windows-based VMs in parallel, wait until they are started - time T.
Time T should be significantly less when running a kernel with the feature.

N should be chosen so the Hardware Node is overcommitted by memory.

Another parameter to monitor: swapout should be much less when running on
kernel with the feature enabled.

5. Known issues

tswap is a front swap and thus it works only in case physical swap is
configured on the Hardware Node.

6. Feature owner

Kirill Tkhai <ktkhai at virtuozzo.com>


--
Best regards,

Konstantin Khorenko,
Virtuozzo Linux Kernel Team


More information about the Devel mailing list