Re: lvm cache on debian 8, missing cache information

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dne 21.3.2016 v 14:30 Manuel Bernal Llinares napsal(a):
Hi guys,

I’m trying to set up lvmcache for a backup volume I use for time machine.

I’ve seen there is quite a lot of very good documentation about this, but also out of sync between different linux systems, e.g. I can’t get those cache* attributes when running lvs on debian 8.

As you can see under this lines, “tmachine” is a cached LVM volume
# lvs -a
   LV                     VG          Attr       LSize   Pool           Origin           Data%  Meta%  Move Log Cpy%Sync Convert
   backups                blackhole   -wi-ao----   5,00t
   clasificador           blackhole   -wi-ao----   1,00t
   [lvol0_pmspare]        blackhole   ewi------- 592,00m
   nfs_home               blackhole   -wi-ao----   1,00t
   tmachine               blackhole   Cwi-aoC---   3,00t tmachine_cache [tmachine_corig]
   tmachine_cache         blackhole   Cwi---C--- 231,67g
   [tmachine_cache_cdata] blackhole   Cwi-ao---- 231,67g
[tmachine_cache_cmeta] blackhole   ewi-ao---- 592,00m
   [tmachine_corig]       blackhole   owi-aoC---   3,00t

Even with a couple of mac computers sending its time machine data for a while, the cache seems to not be working.

This are the parameters described by “dmsetup status” when run on that volume:

# dmsetup status /dev/blackhole/tmachine
0 6442450944 cache 8 12849/151552 128 11886/3795648 17772 177033 2798405 1620326 0 3856 1 1 writeback 2 migration_threshold 2048 mq 10 random_threshold 4 sequential_threshold 512 discard_promote_adjustment 1 read_promote_adjustment 4 write_promote_adjustment 8

I’ve tested another cache alternative (flashcache) before, and the parameter "sequential_threshold” sounds familiar to me, I suspect it is the one making the cache flag the data transfer as “sequential”, passing it through to the backend (slow) device, instead of using the cache to absorb the writing traffic, and clean dirty blocks later, behavior I saw when using flashcache.

“sequential_threshold” is configured, by default, with a value of 512, but I haven’t been able to find what’s that 512, maybe extents, bytes, kb, mb? Unfortunately, I haven’t been able to find a way, at least in Debian, to change those parameters, neither creating the cache nor once it’s already been created.

Any ideas?


'mq' policy is rather obsoleted.

Now it's suggested to use  'smq' which should be better in all aspects.
So please try usage of new 'smq' first (which happens to have no configurables ATM - it's auto-tunning and consumes less memory).

You also need relatively new lvm2 to show all cache settings via lvm2 'lvs' attrs.

Regards

Zdenek




_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/




[Index of Archives]     [Gluster Users]     [Kernel Development]     [Linux Clusters]     [Device Mapper]     [Security]     [Bugtraq]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]

  Powered by Linux