[linux-lvm] writeback cache not promoting writes

Max Power maillists at ferienwohnung-altenbeken.de
Mon Jan 12 21:03:47 UTC 2015


Hi,

Am 12.01.2015 um 01:35 schrieb Linda A. Walsh:
>    I don't know how it interacts in the case you have setup, but
> oflag=direct usually has 'dd' writing to the physical device -- not any
> system
> cache.  I don't know if lvm's cache changes that behavior, but you might
> try it w/o the direct flag?

I tried it without the flag but now its even worse. I got ~33MB/s (slow
drive normally performs 100MB/s and fast drive ~450MB/s).

I understand that 'dd' is not the normal use scenario of a disk. But why
does the caching (with the tunables I set) is making a difference here?
I would expect that with x_threshold and x_adjustment set to 0 there is
no difference between normal fs use and dd.

I read this written by Joe Thornber in this mailing list a few days ago:
> In writeback mode:
>
>    if block is on ssd
>       write to ssd, complete bio once written
>       increment write hit counter
>    else
>       write to origin and complete
>       increment write miss counter

This would explain why I do not see any write hits. I only got
increasing write misses by writing to the drive (even when writing again
to the same blocks). Is there an option to influence the algorithm?




More information about the linux-lvm mailing list