Kernel Log: Linux 3.3 goes into testing
|
|
|
Comments (22)
2 earlier comments in the full thread.
As CR says a lot of stuff is run by cron on a daily basis by most distros such as mlocate, makewhatis their is a reasonable chance it might be those causing the disk to go like the clappers.
It may or may not be "swapping" as we understand the term. It may also be over-buffering disk writes. This was a known problem in a recent 2.6.something kernel, supposedly fixed by 3.0.
My first suggestion would be to remount everything with the "sync" option, so that no writes get buffered. It will slow the machine down, but if over-buffering is the issue, you should see no more total system stalls.
If you do see more total stalling, then over-buffering isn't the problem.
My first suggestion would be to remount everything with the "sync" option, so that no writes get buffered. It will slow the machine down, but if over-buffering is the issue, you should see no more total system stalls.
If you do see more total stalling, then over-buffering isn't the problem.
One other thing to check, if you've got a LAN, is network activity. Etherape is my tool of choice for this: I leave it up on one virtual-desktop 24/7 on a machine that's on the same hubbed segment as the gateway, so I can see who in my house is hogging DSL bandwidth and for what. In your case, it could reveal something as innocuous as apt pulling in fresh package lists from the repos, or as pernicious as somebody getting into your WAP and nosing around where they shouldn't. Or something you set up and then forgot; my nightly rsync sure lights up the network here when it starts backing up machines outside the office switch, and that causes a lot of disk activity too.
gus3: that is interesting. i did not hear about over-buffering before, it's worth checking out.
i don't think it is any background stuff as it does happen mostly when i do overload the machine by having to many tabs open in the browser or running to many programs. when that happens i expect the kernel to start killing processes or i wish the browser would just tell me: "sorry, not enough memory to open more tabs" or something like that.
one may argue that killing processes is not nice, but locking up the machine usually costs me more time than having to restart a program.
greetings, eMBee.
i don't think it is any background stuff as it does happen mostly when i do overload the machine by having to many tabs open in the browser or running to many programs. when that happens i expect the kernel to start killing processes or i wish the browser would just tell me: "sorry, not enough memory to open more tabs" or something like that.
one may argue that killing processes is not nice, but locking up the machine usually costs me more time than having to restart a program.
greetings, eMBee.
Is it too late to suggest that you throw some swap in there? That way you get a gradual slowdown as your warning that you're pushing the machine's resources. If not a swap partition, then a swap file.
https://help.ubuntu.com/community/SwapFaq has instructions if you need it. Slightly more in depth: http://www.xenotime.net/linux/doc/swap-mini-howto.txt
https://help.ubuntu.com/community/SwapFaq has instructions if you need it. Slightly more in depth: http://www.xenotime.net/linux/doc/swap-mini-howto.txt
well, if the answer is that swap prevents this problem then yes,, but i was actually hoping to prevent it by not having swap. the machines have plenty of ram. except for the OLPC XO, but that one also doesn't have enough diskspace to add swap. sofor that one i'd need another solution.
greetings, eMBee.
greetings, eMBee.
You are aware that you can adjust the swappiness setting, correct?!?! Most distros set it to between 60 and 100, which is fine for a server,... But you can set it to 10 or even as low as 5, with little ill effect. Setting it lower with a small swap partition is preferable to not having swap at all. Some programs will crash if there is no swap available. Just Google for Linux and swappiness.
Or, look here: http://en.wikipedia.org/wiki/Swappiness
Or, look here: http://en.wikipedia.org/wiki/Swappiness
oh if they only would crash, that at least i'd understand :-)
i remember having read about swappiness,but as i have swap off i didn't keep it in mind. so thanks, i'll try that too.
greetings, eMBee.
i remember having read about swappiness,but as i have swap off i didn't keep it in mind. so thanks, i'll try that too.
greetings, eMBee.
I dramatically lowered swappiness on my machine when I had this problem. That solved it.
Why on Earth does Ubuntu set the default to 60 anyway? It's not like it's normally used for servers.
60 is (or was) the default in the kernel. Ubuntu didn't change anything.
Still doesn't quite answer the question. The kernel sets a default because the kernel can be used for all kinds of things: servers, workstations, etc. Distros are supposed to change defaults when they can get better performance or functionality for specific uses where they specialize. Ubuntu is a desktop distro, not a server distro (they also have a server distro, but I believe that's a separate download). So are they just too dumb or lazy to set a single parameter that makes this big a difference in interactive applications? They sure don't have any trouble wasting tons of resources on a dumbed-down UI for tablets.
First, you criticize them for changing it, then you criticize them for not changing it?
@gus3: When did I criticize Ubuntu for changing the swappiness setting?
Khamul, at 12:45 AM UTC.
"Why on Earth does Ubuntu set the default..."
"Why on Earth does Ubuntu set the default..."
When I decreased my swappiness, I don't think it was in response to an actual performance issue. I had just arrived back in Linux from a long time running OpenBSD on the same hardware. OpenBSD never swapped on this configuration, and Linux did.
But it was all a bunch of numbers -- me looking at the output of top and htop.
I bet the machine performed the same on my Linux desktop tasks no matter what the swappiness was set at.
But it was all a bunch of numbers -- me looking at the output of top and htop.
I bet the machine performed the same on my Linux desktop tasks no matter what the swappiness was set at.
Optimal swappiness settings are highly dependent on what you are running. If you run services that do better with a lot if free RAM, sometimes pegging it to 100 is actually better. If you run a desktop with a bunch of smaller apps, then a low setting is better. If you run off an SSD instead of an HD, you are better with a lower setting (as well as limiting the more unnecessary writes to the "disk"). SSDs have limited write/rewrite cycles, although modern ones are better. So, a little experimentation is sometimes in order.
Running off an SSD?
Disable swap, and spread out the pain over time. Better to suffer with slow, weak programs than to lose data to a failing SSD.
Disable swap, and spread out the pain over time. Better to suffer with slow, weak programs than to lose data to a failing SSD.
@gus3:
No need to totally disable swap. Most modern SSD have plenty of write/rewrite cycles for a nice long life with a low swappiness swap partition or file, provided that you're not otherwise abusing the drive. But it's the things like excessive logging that'll hurt it. The average life cycle of a modern SSD is about equal to the life cycle of the average hard drive these days,... again, provided you make adjustments...
No need to totally disable swap. Most modern SSD have plenty of write/rewrite cycles for a nice long life with a low swappiness swap partition or file, provided that you're not otherwise abusing the drive. But it's the things like excessive logging that'll hurt it. The average life cycle of a modern SSD is about equal to the life cycle of the average hard drive these days,... again, provided you make adjustments...
Post a comment
A free account is needed to post. Write your comment here first: your text is kept in this browser while you sign up or log in, and is waiting for you when you come back.
Your message:Markdown: **bold**, *italic*, [text](https://link), - lists, > quotes, $x^2$ for math. Formatting help
Sign up and post (it is free) or Log in and post
