Re: Performance worse than with plain HDD for some workloads

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

 



Hi!

Am Sa., 9. März 2019 um 20:01 Uhr schrieb Nikolaus Rath <Nikolaus@xxxxxxxx>:
>
> Hello,
>
> I've had good results with bcache in the past, so I recently tried to
> use it to accelerate loading times of Steam games.
>
> Tthe results I got were rather surprising. When using bcache, in several
> cases performance was up to 1.5 worse than when using only the HDD and
> up to 4 times worse than when running only from SSD. Results were
> consistent over 10 sequential runs (less than 10% deviation in load
> times), so the cache should be hot.

It works fine here with btrfs (4 disks) and bcache (1 disk, 400G).


> I used the same harddrives for bcache, plain HDD and plain SSD
> (though different partitions).

Partitions in the upper half of the HDD can be easily up to 30%
slower. You should use one more partition and put the data there
(maybe by cloning a prepared partition to that space) to make
reproducible tests.


> I also enabled writeback and set the sequential_cutoff to zero
> (expecting this to be almost equivalent to using the SSD directly).

You probably don't want to disable sequential_cutoff. It's not the raw
throughput speed of the SSD that makes the vast amount of better
performance but the lower latency, modern HDDs are pretty good a
sequential read speeds (150+ MB/s), so you want to convert random IO
to mostly sequential with bcache. Thus, especially with a small
bcache, you probably want to cache random IO only. Because you want to
accelerate Steam games, it may be most beneficial to use write_around
caching so Steam downloads won't ruin your performance when running
the same games over and over again.

I'm gaining an acceleration factor of 2-3 in loading times for some
games (not all, tho). But I also noticed that previous bcache and/or
btrfs versions worked faster.


> The cache size is 32 G, and the backing device is 128 G. However, I am
> pretty sure that all the data that is read fits into the cache
> completely (but I'm not sure how to confirm this).

Maybe you enabled discard... If it is not "queued trim", it may
perform bad. Try turning discard off completely (use fstrim instead if
you use your SSD for regular filesystems).


Regards,
Kai


> Does anyone have any insight what could cause this? I'm not expecting
> bcache to always match performance of using plain SSD, but I would have
> expected it to not make things worse than using a plain HDD....
>
> Tested on Ubuntu cosmic with kernel 4.18.
>
> Best,
> -Nikolaus




[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