Hacker News new | past | comments | ask | show | jobs | submit login

Yes I had swap fully disabled on Windows since there was 64G of ram and the system was still swapping by default which was creating a lot of unnecessary disk activity and writes. In modern windows (10+) the swappiness is much more sane and that doesn't happen as much but if you have a ton of ram you can safely turn off swapping and force the OS to manage memory more aggressively.



Disabling swap on windows means all of your applications virtual memory has to fit in your physical memory. In Windows any unused virtual memory still needs space in RAM or, it has to have space in the page files.

Right now if I look at my Firefox processes, they take more (10-20%, sometimes a lot more) more commit size (virtual memory) than their private working set. With page files the unused virtual memory portion is simply reserved on the page file with minimal overhead. Without any page files, you will be just wasting memory.

RE: unnecessary writes, it might be windows proactively dumping the contents of the memory (I think this happens but I cannot confirm right now). But in general that's very low priority and it should affect your performance.


Firefox does not request private working sets beyond what is required. There are memory request mechanisms available to applications for MANY generations of windows that specify whether it is high-priority private working set (generally "uninterruptable") or opportunistic commit that is needed. The understanding is that commit can be removed by notification but private working cannot and instead you will be OOM killed if that happens. It is totally fine to have 80% of your system ram "used" but it should not be 80% private working set unless some processes are leaking or legitimately using it. There are also priority flags for memory use and the kernel memory manager will notify and kill in that order.

Check out RAMMap from the absolutely excellent system internals to see how your system memory is allocated currently, even per-process.

As an example, I have 64G of ram, showing ~40GB "used" as per task manager. Of that however only 22GB is private process active. The rest is memory-mapped files, standby, paged pool, nonpaged pool, shared etc.

The issue with pagefile - say there is also a 64GB pagefile - is that windows is notifying processes and the memory manager is considering that the system has "128GB" of ram, which many processes will take as a sign they can reserve more memory and causing an inflation of reserved actual ram.

It is less of an issue now that the memory manager is tier aware and applications have ABIs to check and request memory in a more informed way.

Writes on an SSD are always an issue unless you're running SLC or similar high endurance flash.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: