4 ms·
The point was not to complain about how bad the Docker is but rather to highlight that a lot of unexpected things may come from the fact that the kernel is shar
by pacavaca 9y ago
The point was not to complain about how bad the Docker is but rather to highlight that a lot of unexpected things may come from the fact that the kernel is shared.
"Logging too much" was just a reason for the posix_fadvise being called too often but this becomes a problem ONLY when the kernel is shared. In case of virtualization, everyone gets its own version of fadvise (the kernel) and the conflict doesn't happen.
- cjhanks 9y agoIf your VM call to `fadvise` is not calling the underlying host kernel operation, is it even working?
- pacavaca 9y agoHmm. I'm definitely not an expert in hypervisor implementations but I would guess that it should not proxy any calls to the host kernel...
- dullgiulio 9y agoBut as fadvise can reliably only be implemented in the host kernel, the one in hypervisor is basically a noop.
- fulafel 9y agoIn the case under discussion, the dontneed fadvise would tell the guest kernel page cache to discard written data after write. So it is useful without the host kernel knowing about it.
- asdbffg 9y agoVM certainly does "call underlying host kernel operation", it just does so indirectly — the guest userspace calls fadvise(), kernel implementation of fadvise() asks the virtio disk driver to perform particular read/writes, the virtio driver asks underlying kernel disk driver to read/write individual disk sectors (without knowing, that they are related to specific file in guest filesystem). This specific bug was caused by putting high load on "kernel dentry cache", e.g. a contention for memory structure, present in kernel memory. Guests normally don't share memory, so contending for it was avoided. Incidentally, there are situations, when different guests can compete for same memory — when VM uses so-called "memory deduplication" techniques. Which is why enabling that stuff on production systems may be a bad idea.
- cjhanks 9y agoThanks for explanation. I've seen the damage of KSMD as well.