mbox series

[0/2] dm-zoned: improve cache performance

Message ID 20200513070729.71461-1-hare@suse.de (mailing list archive)
Headers show
Series dm-zoned: improve cache performance | expand

Message

Hannes Reinecke May 13, 2020, 7:07 a.m. UTC
Hi all,

here are two patches to improve performance when a regular device
is specified for dm-zoned.
Damien noted that we have a performance drop after the zones on the
regular device are used up, as then the random zones on the zoned
device are being used, _and_ reclaim is running on the same disk.
This slows down I/O whle using random zones, increasing again after
the random zones are used up.
This patchset fixes this by not allowing random zones for caching
if a regular device is present.

Patch is relative to the dm-5.8 branch from
git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git

As usual, comments and reviews are welcome.


Hannes Reinecke (2):
  dm-zoned: invert zone check in dmz_reset_zone()
  dm-zoned: split off random and cache zones

 .../admin-guide/device-mapper/dm-zoned.rst    |  17 +-
 drivers/md/dm-zoned-metadata.c                | 157 +++++++++++++-----
 drivers/md/dm-zoned-reclaim.c                 |  70 ++++----
 drivers/md/dm-zoned-target.c                  |  19 ++-
 drivers/md/dm-zoned.h                         |   7 +-
 5 files changed, 189 insertions(+), 81 deletions(-)

Comments

Damien Le Moal May 13, 2020, 9:44 a.m. UTC | #1
On 2020/05/13 16:07, Hannes Reinecke wrote:
> Hi all,
> 
> here are two patches to improve performance when a regular device
> is specified for dm-zoned.
> Damien noted that we have a performance drop after the zones on the
> regular device are used up, as then the random zones on the zoned
> device are being used, _and_ reclaim is running on the same disk.
> This slows down I/O whle using random zones, increasing again after
> the random zones are used up.
> This patchset fixes this by not allowing random zones for caching
> if a regular device is present.

Awesome ! I will run this overnight to see how it compares with the previous
results I sent.

And I need to send something to fix the setup warning I am seeing, but that is a
block or scsi patch I think. Had no time to dig.

> 
> Patch is relative to the dm-5.8 branch from
> git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git
> 
> As usual, comments and reviews are welcome.
> 
> 
> Hannes Reinecke (2):
>   dm-zoned: invert zone check in dmz_reset_zone()
>   dm-zoned: split off random and cache zones
> 
>  .../admin-guide/device-mapper/dm-zoned.rst    |  17 +-
>  drivers/md/dm-zoned-metadata.c                | 157 +++++++++++++-----
>  drivers/md/dm-zoned-reclaim.c                 |  70 ++++----
>  drivers/md/dm-zoned-target.c                  |  19 ++-
>  drivers/md/dm-zoned.h                         |   7 +-
>  5 files changed, 189 insertions(+), 81 deletions(-)
>
Damien Le Moal May 13, 2020, 2:02 p.m. UTC | #2
On 2020/05/13 16:07, Hannes Reinecke wrote:
> Hi all,
> 
> here are two patches to improve performance when a regular device
> is specified for dm-zoned.
> Damien noted that we have a performance drop after the zones on the
> regular device are used up, as then the random zones on the zoned
> device are being used, _and_ reclaim is running on the same disk.
> This slows down I/O whle using random zones, increasing again after
> the random zones are used up.
> This patchset fixes this by not allowing random zones for caching
> if a regular device is present.
> 
> Patch is relative to the dm-5.8 branch from
> git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git
> 
> As usual, comments and reviews are welcome.

Ran this for 2 hours, result plot attached. Same workload as before, 2 hours
run. This looks much better. No drop to near nothing as there is now no
HDD-to-HDD reclaim. The HDD is exercised at drive speed (150MB/s, which is about
what I get with ext4 on a similar regular drive without dm-zoned).

If anything, it looks like reclaim is starting too early. The initial peak
performance at SSD speed is now very very short. We need to check the
dmz_should_reclaim() changes.

> 
> 
> Hannes Reinecke (2):
>   dm-zoned: invert zone check in dmz_reset_zone()
>   dm-zoned: split off random and cache zones
> 
>  .../admin-guide/device-mapper/dm-zoned.rst    |  17 +-
>  drivers/md/dm-zoned-metadata.c                | 157 +++++++++++++-----
>  drivers/md/dm-zoned-reclaim.c                 |  70 ++++----
>  drivers/md/dm-zoned-target.c                  |  19 ++-
>  drivers/md/dm-zoned.h                         |   7 +-
>  5 files changed, 189 insertions(+), 81 deletions(-)
>