5 ms·
In env without swap, the binary size should/might block relative amount of ram. Might it be possible to stream binaries or to detect junks which could be unloa
by hatuio 5y ago
In env without swap, the binary size should/might block relative amount of ram.
Might it be possible to stream binaries or to detect junks which could be unloaded like an json parser which is only needed when reading json
- remram 5y agoWithout swap, you mean without virtual memory or without a swap partition/file? Because even without a swap partition/file, the whole executable will not block physical memory, but will page in/out as needed. And whole sections of it will never be loaded at all.
- hatuio 5y agoWithout swap. You have to disable it for k8s
- remram 5y agoSo you did mean partition/file, and you are misinformed.
- hatuio 5y agoSo it is getting loaded as file and can be swapped out due to this?
- remram 5y agoYes, any mmap'd file will be swapped in on demand, when a page is first accessed, it will not all be copied in physical memory at once. In case of memory pressure, pages will be removed from physical memory ("swapped out"), since they can be loaded back from the file again when needed. Since the executable is mapped read-only, the pages loaded in physical memory can also be shared between multiple instances of the process.