-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configuration for systems using ZRAM and/or SSD swap #27
Comments
Currently some of the configuration can be tuned through environment variables. Check the code. Eventually I should implement support for argparse and config file. |
OK, thanks. |
Hey @hakavlad do you still use thrash-protect? I'm wondering if you managed to find any better settings. I'm in a very similar situation: I use ZRAM and have fast (SSD) swap, and every minute or two I'm getting multi-second hangs even though I have 3-4 GB of memory free. Not sure if I should just give up on thrash-protect or not. |
Perhaps thrash-protect simply doesn't make sense on systems with swap on SSD. Thrashing situations should not be that bad when the swap storage isn't orders of magnitudes slower than the memory. (Well, rumors had it early SSDs would simply wear out if there were too many write operations - if that's true, then thrash-protect may be important anyway). That said, it's a bug if you really have gigabytes of memory free and you experience the whole system is frozen up for several seconds. What version do you use? What does the log say? |
I don't have any experience with ZRAM. I read on Wikipedia that one common usage pattern is to set up compressed memory space as a swap device. Perhaps unused space on that swap device will show up as free memory on your system, but yet the amount of swapping may be much higher than on a normal system. If you want to try tuning, then the environment variable THRASH_PROTECT_INTERVAL (default 0.5 - amount is in seconds) should be tuned down, and 'THRASH_PROTECT_SWAP_PAGE_THRESHOLD (default 4) should be tuned up. If I've understood it right, swapping in such a scenario actually means compressing/decompressing of the memory going in/out of "swap", so it will cause CPU load but not a lot of IO. One may end up with the machine being "thrashed out" with every context switch causing a lot of CPU load. |
Reopening the ticket. Proper research should be done to see if thrash-protect can be tuned to actually be useful on such systems, or if it's not useful at all. This should also be documented in the README. |
The default settings are bad for me: TP often stops multiple processes. How do I configure TP?
How to limit the number of stopped processes? How to change the threshold at which TP starts to stop the processes? How to make TP less sensitive? (Perhaps the fact is that I use ZRAM and have a fast swap.)
The text was updated successfully, but these errors were encountered: