{"action":"created","issue":{"url":"https://api.github.com/repos/tobixen/thrash-protect/issues/2","labels_url":"https://api.github.com/repos/tobixen/thrash-protect/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/tobixen/thrash-protect/issues/2/comments","events_url":"https://api.github.com/repos/tobixen/thrash-protect/issues/2/events","html_url":"https://github.com/tobixen/thrash-protect/issues/2","id":90291857,"number":2,"title":"protect against thrashing not caused by swapping?","user":{"login":"duanyao","id":1684137,"avatar_url":"https://avatars.githubusercontent.com/u/1684137?v=3","gravatar_id":"","url":"https://api.github.com/users/duanyao","html_url":"https://github.com/duanyao","followers_url":"https://api.github.com/users/duanyao/followers","following_url":"https://api.github.com/users/duanyao/following{/other_user}","gists_url":"https://api.github.com/users/duanyao/gists{/gist_id}","starred_url":"https://api.github.com/users/duanyao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duanyao/subscriptions","organizations_url":"https://api.github.com/users/duanyao/orgs","repos_url":"https://api.github.com/users/duanyao/repos","events_url":"https://api.github.com/users/duanyao/events{/privacy}","received_events_url":"https://api.github.com/users/duanyao/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-06-23T05:28:51Z","updated_at":"2015-06-23T08:58:18Z","closed_at":"2015-06-23T07:51:25Z","body":"I had heard from multiple sources(including your README) that turning off swap can prevent thrashing, but this is not true. Executable files (and some data files) of processes have to be cached by OS to allow them to run. If there is not enough physical memory and swap is off, OS has to discard and refill huge amount of caches during process scheduling, which can cause thrashing.\r\n\r\nI did oberseved this issue on my laptop with 4GB memory and swap is off. I monitored IO by atop/iotop during the thrashing, and found that firefox, thunderbird, eclipse, amule etc. generated enoumous amount of reading, and the disk kept 100% busy.\r\n\r\nCurrently thrash-protect seems not able to handle this situation. I suggest `kill -STOP` some processes if the disk has been 100% busy for a while.\r\n"},"comment":{"url":"https://api.github.com/repos/tobixen/thrash-protect/issues/comments/114411523","html_url":"https://github.com/tobixen/thrash-protect/issues/2#issuecomment-114411523","issue_url":"https://api.github.com/repos/tobixen/thrash-protect/issues/2","id":114411523,"user":{"login":"duanyao","id":1684137,"avatar_url":"https://avatars.githubusercontent.com/u/1684137?v=3","gravatar_id":"","url":"https://api.github.com/users/duanyao","html_url":"https://github.com/duanyao","followers_url":"https://api.github.com/users/duanyao/followers","following_url":"https://api.github.com/users/duanyao/following{/other_user}","gists_url":"https://api.github.com/users/duanyao/gists{/gist_id}","starred_url":"https://api.github.com/users/duanyao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duanyao/subscriptions","organizations_url":"https://api.github.com/users/duanyao/orgs","repos_url":"https://api.github.com/users/duanyao/repos","events_url":"https://api.github.com/users/duanyao/events{/privacy}","received_events_url":"https://api.github.com/users/duanyao/received_events","type":"User","site_admin":false},"created_at":"2015-06-23T08:58:18Z","updated_at":"2015-06-23T08:58:18Z","body":"> 1) It is perfectly OK if one process causes 100% IO-utilization, for instance a backup script running every night. \r\n\r\nSo it depends on the role of the computer: batch or interactive processing. I think my suggestion is useful for the latter. Maybe it is better to opt-in? I have experienced that some IO-intensive programs (dpkg, svn, updatedb) may also freeze the system, even if there are enough memory.\r\n\r\n> 3) I think that thrash-protect should be used together with \"enough\" swap\r\n\r\nI'm ok with this requirement. However as I pointed above, it may be valuable to also protect against 100% disk usage in general for interactive system.\r\n"}}