linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Zdenek Kabelac <zdenek.kabelac@gmail.com>
To: Jonas.Degrave@ugent.be
Cc: LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] Caching policy in machine learning context
Date: Mon, 13 Feb 2017 15:33:53 +0100	[thread overview]
Message-ID: <a7ce046a-ec7f-f2fd-0ce4-8b76da0b2d95@gmail.com> (raw)
In-Reply-To: <CAPWV3hunUyuPY2UMPQS_2OSenEMt4Ygb2Kn1+q00_+e5BOyR4Q@mail.gmail.com>

Dne 13.2.2017 v 15:19 Jonas Degrave napsal(a):
> I am on kernel version 4.4.0-62-generic. I cannot upgrade to kernel 4.9, as it
> did not play nice with
> CUDA-drivers: https://devtalk.nvidia.com/default/topic/974733/nvidia-linux-driver-367-57-and-up-do-not-install-on-kernel-4-9-0-rc2-and-higher/
> <https://devtalk.nvidia.com/default/topic/974733/nvidia-linux-driver-367-57-and-up-do-not-install-on-kernel-4-9-0-rc2-and-higher/>
>
> Yes, I understand the cache needs repeated usage of blocks, but my question is
> basically how many? And if I can lower that number?
>
> In our use case, you basically read a certain group of 100GB of data
> completely about 100 times. Then another user logs in, and reads a different
> group of data about 100 times. But after a couple of such users, I observe
> that only 20GB in total has been promoted to the cache. Even though the cache
> is 450GB big, and could easily fit all the data one user would need.
>
> So, I come to the conclusion that I need a more aggressive policy.
>
> I now have a reported hit rate of 19.0%, when there is so few data on the
> volume that 73% of the data would fit in the cache. I could probably solve
> this issue by making the caching policy more aggressive. I am looking for a
> way to do that.

There are 2 'knobs' - one is 'sequential_threshold' where cache tries
to avoid promoting 'long' continuous reads into cache  - so if
you do 100G reads then these likely meet the criteria and are avoided from
being promoted (and I think this one is not configurable for smq.

Other is 'migration_threshold' which limit bandwidth load on cache device.

You can try to change its value:

lvchange --cachesettings migration_threshold=10000000  vg/cachedlv

(check with dmsetup status)

Not sure thought how are there things configurable with smq cache policy.

Regards

Zdenek

  reply	other threads:[~2017-02-13 14:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-13 10:58 [linux-lvm] Caching policy in machine learning context Jonas Degrave
2017-02-13 12:55 ` Zdenek Kabelac
2017-02-13 14:19   ` Jonas Degrave
2017-02-13 14:33     ` Zdenek Kabelac [this message]
2017-02-15 13:30       ` Jonas Degrave
2017-02-16 10:29         ` Zdenek Kabelac

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a7ce046a-ec7f-f2fd-0ce4-8b76da0b2d95@gmail.com \
    --to=zdenek.kabelac@gmail.com \
    --cc=Jonas.Degrave@ugent.be \
    --cc=linux-lvm@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).