Nable wrote:What is the exact problem?
I was wondering about the following (you can find same topic asked for also on other forums without getting a clear answer...)...just to recap the scenario, I'm working on a virtual networking lab where each network node is implemented as a qemu/kvm based VM running on top of a Linux Ubuntu (bare-metal) system equipped with a huge amount of RAM (128 GB).
Memory is not an issue as follow:
Code: Select all
root@unl01:~# free -g
total used free shared buffers cached
Mem: 125 19 106 0 0 1
-/+ buffers/cache: 17 107
Swap: 127 0 127
root@unl01:~#
Nevertheless, for the linux process running the qemu VM instance, there exist an amount of minor page faults incrementing during the time (note that major page faults conversely are low and remain stable after VM boot is completed, though). See for instance the following output (a couple of second separated) for the process with PID 47716 running an instance of qemu-system-x86_64 executable:
Code: Select all
root@unl01:~# ps -p 47716 -o min_flt,maj_flt,cmd
MINFL MAJFL CMD
222142654 69 /opt/qemu/bin/qemu-system-x86_64 -device e1000,netdev=net0,mac=50:01:00:1a:00:00 -netdev tap,id=ne
root@unl01:~#
root@unl01:~#
root@unl01:~# ps -p 47716 -o min_flt,maj_flt,cmd
MINFL MAJFL CMD
222148030 69 /opt/qemu/bin/qemu-system-x86_64 -device e1000,netdev=net0,mac=50:01:00:1a:00:00 -netdev tap,id=ne
root@unl01:~#
As you can see, the number of major page faults is stable (69) whereas the number of minor page faults keeps incrementing.
Memory (RAM) is available (free) in a large amount, thus why basically kernel memory manager continuously try to shrink down the working set for the process running the qemu/kvm VM instance (resulting in minor page faults when guest code accesses memory pages again) ?
Googling for it I found
http://kneuro.net/linux-mm/index.php?fi ... cache.html Reading it, as far as I can understand, Linux memory manager subsystem always try to move pages from active_list to inactive_list unmapping them from process virtual memory (basically clearing process' PTE entries for them). Upon process' attempt to access one of those, page fault handler can find it in memory and simply restore process' PTE entry pointing to it (basically this is a minor page fault event tracked by linux kernel)
What do you think about, it could be a valid reason for it ?