Per-entity load tracking
Per-entity load tracking
Posted Jan 12, 2013 14:53 UTC (Sat) by hummassa (subscriber, #307)In reply to: Per-entity load tracking by jospoortvliet
Parent article: Per-entity load tracking
Posted Jan 12, 2013 19:29 UTC (Sat)
by giraffedata (guest, #1954)
[Link] (8 responses)
Posted Jan 12, 2013 22:01 UTC (Sat)
by man_ls (guest, #15091)
[Link] (7 responses)
Posted Jan 12, 2013 23:24 UTC (Sat)
by nix (subscriber, #2304)
[Link] (6 responses)
(It used to be much worse: it used to stall basically all I/O to *any* block device due to, IIRC from vague faded memory, everything sharing a single queue. That's not true anymore. So this has got better, though I can't tell whether I don't see it these days because the problem has improved or because machines just have huge amounts of memory these days...)
Posted Jan 13, 2013 0:14 UTC (Sun)
by man_ls (guest, #15091)
[Link] (4 responses)
The solution for the problem you describe should be, as usual, in several places: stop cp from dirtying more pages than it can move to their destination, and make the kernel avoid this behavior in any process. I really don't know how in the general case. To avoid this kind of problem I don't use swap any more, so that a misbehaving process cannot page everything else to disk. I still get severe slowdowns when memory runs out though; I am still trying to figure out how to avoid them.
Posted Jan 13, 2013 0:22 UTC (Sun)
by nybble41 (subscriber, #55106)
[Link]
vm.dirty_bytes = 201326592
This limits total dirty memory to 192MB before the kernel forces processes to work on writing data to disk rather than dirtying new pages. The default is something like 10% of total RAM. It seems to help.
Posted Jan 13, 2013 1:12 UTC (Sun)
by cmccabe (guest, #60281)
[Link] (2 responses)
Posted Jan 13, 2013 1:59 UTC (Sun)
by hummassa (subscriber, #307)
[Link] (1 responses)
Posted Apr 11, 2013 20:28 UTC (Thu)
by serzan (subscriber, #8155)
[Link]
have you tried ionice -c 3? though not sure it'd have much of an impact, if thrashing memory is the cause
You can't blame 'cp'. It's the kernel's job to divide up the resources and 'cp' should selfishly concentrate on getting its own work done. If there is code in the alternative copying software which is specifically designed to leave CPU time slots or whatever for other processes it thinks are more important, I'm against that.
stalls caused by USB drive copy
I have never seen this. Have you tried with CONFIG_PREEMPT? The kernel does a much better job of not letting random tasks hoard the CPU (or even CPUs these days), interactivity does not suffer even under arbitrary IO load.
stalls caused by USB drive copy
stalls caused by USB drive copy
Ah, the old "a process paged all my memory" problem. Looks like bad design in cp then. But to trigger it nowadays you would have to copy a file bigger than free memory (which can be a few GB) to a USB key; I am not sure that this is what jospoortvliet and hummassa were reporting above.
stalls caused by USB drive copy
stalls caused by USB drive copy
stalls caused by USB drive copy
stalls caused by USB drive copy
Trying to backup my VMs (20G each file) to a USB drive is a nightmare. Usually I do "nice -20 cp" or, more commonly, "kde-cp".
stalls caused by USB drive copy