Mailinglist Archive: opensuse (982 mails)

< Previous Next >
Re: [opensuse] disk cache
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

В Mon, 22 Sep 2014 13:18:19 +0200 (CEST)
"Carlos E. R." <carlos.e.r@xxxxxxxxxxxx> пишет:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



On Monday, 2014-09-22 at 12:50 +0400, Andrei Borzenkov wrote:
On Mon, Sep 22, 2014 at 12:10 PM, Bernhard Voelker <> wrote:
On 09/22/2014 09:20 AM, Andrei Borzenkov wrote:
On Mon, Sep 22, 2014 at 11:07 AM, Bernhard Voelker <> wrote:
On 09/22/2014 08:31 AM, Roger Oberholtzer wrote:

The cache seems to be filling up

That is GOOD!

It depends. It is good when cache is filled up with data waiting to be
read. It is bad when it is filled up with data waiting to be written
out to slow device.


Well, in that case, you'll have to wait for the data to be sync'ed to
disk anyway. ;-)


Yes, but currently single application is able to fill in RAM with
unwritten data, so that the whole system (every other application) has
to wait while data is drained. And that blocks not only write-out, but
also reading of data. Resulting in very long delays and non-responsive
system.

AHHHHH!!!!!!!

SO THAT'S WHY!!

That's why writing big files, or many files, to slow usb flash devices
makes the entire system crawl!


So while every single application will never write faster, each
application could be more responsive with smaller amount of cached
data.

What Linux still lacks is rate-limiting of program writes to match
output device speed.


Can we limit, externally, the amount of cache an application can use?


Memory control group looks like it can limit total amount of
filesystem cache used by CG. Of course, this needs some way to start
process in own control group and set its values ...

Otherwise sysctl vm.dirty_bytes or vm.dirty_ratio may help.

Unfortunately, in both cases they are just workaround with obvious
drawbacks. They limit amount of dirty data globally, while in ideal
world process writing to fast device should be able to dirty much more
memory than process writing to slow device. I have seen discussion of
patches floating around but do not know if anything was completed.

Say I want to start a large file copy to usb stick, like a dd to create an
usb installation media. How do I tell it not to use a big write cache?

Or a many file copy to a usb device, using, say, mc.


Or instead of limiting the cache per application, do so per device. If the
usb is on /dev/sdh, limit the cache on /dev/sdh.


Yes, I think last patch I have seen did something similar.


Is this possible at all?


- --
Cheers,
Carlos E. R.
(from 13.1 x86_64 "Bottle" at Telcontar)

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)

iEYEARECAAYFAlQgBXsACgkQtTMYHG2NR9UMiQCfafHNXMhYFVc/H/CyKbQtWoPU
kikAn0WQHPj/3j9zS7PTDfovyZQq3VTb
=lLCJ
-----END PGP SIGNATURE-----

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)

iEYEARECAAYFAlQg4wcACgkQR6LMutpd94yjLQCffUyXT7siGYwJC3GHzbtfgXNv
t2QAoIA+01ETxmGMGw6t9yd7PC+a6fWf
=gecl
-----END PGP SIGNATURE-----
< Previous Next >