linux-bcache.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Santiago Castillo Oli <scastillo@aragon.es>
To: linux-bcache@vger.kernel.org
Subject: Low hit ratio and cache usage
Date: Fri, 4 Jun 2021 13:07:48 +0200	[thread overview]
Message-ID: <5b01087b-6e56-0396-774a-1c1a71fe50df@aragon.es> (raw)

Hi all!


I'm using bcache and I think I have a rather low hit ratio and cache 
occupation.


My setup is:

- Cache device: 82 GiB partition on a SSD drive. Bucket size=4M. The 
partition is aligned on a Gigabyte boundary.

- Backing device: 3.6 TiB partition on a HDD drive. There is 732 GiB of 
data usage on this partition. This 732 GiB are used by 9 qcow2 files 
assigned to 3 VMs running on the host.

- Neither the SDD nor HDD drives have another partitions in use.

- After 24 hours of use, according to priority_stats the cache is 75% 
Unused (63 GiB Unused - 19 GiB used), but...

- ... according to "smartctl -a" in those 24 hours "Writes to Flash" has 
increased in 160 GiB and "GB written from host" has increased in 90 GiB

- cache_hit_ratio is 10 %



- I'm using maximum bucket size (4M) trying to minimize write 
amplification. With this bucket size, "Writes to Flash" (160) to "GB 
written from host"(90) ratio is 1,78. Previously, some days ago, I was 
using default bucket size. The write amplification ratio then was 2,01.

- Isn't the cache_hit_ratio (10%) a bit low?

- Is it normal that, after 24 hours running, the cache occupation is 
that low (82-63 = 19GiB, 25%)  when the host has written 90 GiB to the 
cache device in the same period? I don´t understand why 90 GiB of data 
has been written to fill 19 GiB of cache.


Any ideas?


Thank you and regards.


-- 
___________________________________________________________


             reply	other threads:[~2021-06-04 11:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-04 11:07 Santiago Castillo Oli [this message]
2021-06-04 12:05 ` Low hit ratio and cache usage Coly Li
2021-06-04 12:35   ` Santiago Castillo Oli
2021-06-04 12:59     ` Coly Li
2021-06-04 15:56     ` Kai Krakow
     [not found] ` <f25c7f91-433e-d699-c1f6-7e828023167f@orange.fr>
2021-06-04 12:12   ` Santiago Castillo Oli

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=5b01087b-6e56-0396-774a-1c1a71fe50df@aragon.es \
    --to=scastillo@aragon.es \
    --cc=linux-bcache@vger.kernel.org \
    /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).