Re: Low hit ratio and cache usage

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

 



Hello!

Am Fr., 4. Juni 2021 um 14:36 Uhr schrieb Santiago Castillo Oli
<scastillo@xxxxxxxxx>:
>
> Hi Coli!
>
>
> El 04/06/2021 a las 14:05, Coly Li escribió:
> > What is the kernel version and where do you have the kernel ?  And what
> > is the workload on your machine ?
>
> I'm using debian 10 with default debian kernel (4.19.0-16-amd64) in host
> and guests.
>
> For virtualization I'm using KVM.
>
>
> There is a host, where bcache is running. The filesystem over bcache
> device is ext4. In that filesystem there is only 9 qcow2 files user by
> three VM guests. Two VM are running small nextcloud instances, another
> one is running transmission (bittorrent) for feeding debian and other
> distro iso files (30 files - 60 GiB approx.)

Besides Coly recommending to use a newer kernel, I think there may be
some misunderstanding of how bcache works:

* bcache is mostly about reducing latency so it skips sequential
access, you should measure block access latency instead of throughput
or fill rate

* thus, it probably fills your cache very slowly if a lot of patterns
are sequential

* ext4 has a write journal which turns many random write patterns into
sequential write patterns, YMMV if you disable ordered data mode or
journalling

* qcow2 is copy-on-write: new blocks are appended, resulting in
possible write amplification in bcache, it also creates sequential
write patterns

* kvm/qemu probably use directio / uncached IO by default which may
bypass bcache or caching completely, you should try a different IO
mode in kvm (e.g. unsafe cached)


Regards,
Kai




[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