Difference between revisions of "Page size"

From RCS Wiki
Jump to navigation Jump to search
(Virtual Machines)
(Checking Your Page Size)
Line 18: Line 18:
  
 
Virtual machine guests (in KVM-HV) can run in either page size, regardless of the host OS's page size. This can be a good approach if you need to run a specific software package that doesn't support your host OS's page size.
 
Virtual machine guests (in KVM-HV) can run in either page size, regardless of the host OS's page size. This can be a good approach if you need to run a specific software package that doesn't support your host OS's page size.
 +
 +
= Checking Your Page Size =
 +
 +
You can check your kernel's page size with this command:
 +
 +
getconf PAGESIZE

Revision as of 20:49, 17 May 2023

POWER supports both 4KiB and 64KiB page sizes; this is in contrast to x86, which supports only 4KiB.

Performance

64KiB mode yields performance improvements for some workloads, if sufficient RAM is available. However, 64KiB mode also incurs higher RAM usage, so users with limited RAM will see better performance in 4KiB mode.

Porting Buggy Software

With rare exceptions (e.g. emulation), correctly written software will work in both 4KiB and 64KiB modes without issues. However, if software was only subject to QA testing on one page size, there is a nontrivial chance that it was written to rely on assumptions that only are accurate for that mode. Such breakage is most common in hardware drivers. In practice, this means that hardware drivers that were exclusively tested on x86 are likely to exhibit bugs in 64KiB mode, while some POWER-specific hardware drivers are likely to exhibit bugs in 4KiB mode.

The Hardware Compatibility List may be helpful in checking which page sizes your preferred hardware's drivers support, or finding hardware whose drivers support your preferred page size. For checking other software support, the Ports List may be helpful.

Emulation

User-mode emulators (e.g. Box86) work most reliably when the host and guest page size are the same. Some emulators are able to emulate a different page size, but doing so increases the complexity and decreases the accuracy of the emulation, which may or may not cause bugs. In practice, this means that if you are emulating x86 software, you will probably experience fewer bugs in 4KiB mode.

Virtual Machines

Virtual machine guests (in KVM-HV) can run in either page size, regardless of the host OS's page size. This can be a good approach if you need to run a specific software package that doesn't support your host OS's page size.

Checking Your Page Size

You can check your kernel's page size with this command:

getconf PAGESIZE