Re: Low hit ratio and cache usage

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

 



On 6/4/21 7:07 PM, Santiago Castillo Oli wrote:
> 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.
>
>

What is the kernel version and where do you have the kernel ?  And what
is the workload on your machine ?

Most of the read requests are missing, so they will read from backing
device and refilled into cache device as used-and-clean data. Once there
is no enough space to hold more read-cached data, garbage colleague may
retire the used-and-clean data very fast and make available room for new
refilling read data. The 19GB data might be existing data from last time gc.

Coly Li



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux ARM Kernel]     [Linux Filesystem Development]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux