* [Qemu-devel] [Bug 1701449] [NEW] high memory usage when using rbd with client caching
@ 2017-06-30 6:09 Nick
2017-07-03 8:12 ` [Qemu-devel] [Bug 1701449] " Markus Schade
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: Nick @ 2017-06-30 6:09 UTC (permalink / raw)
To: qemu-devel
Public bug reported:
Hi,
we are experiencing a quite high memory usage of a single qemu (used with KVM) process when using RBD with client caching as a disk backend. We are testing with 3GB memory qemu virtual machines and 128MB RBD client cache. When running 'fio' in the virtual machine you can see that after some time the machine uses a lot more memory (RSS) on the hypervisor than she should. We have seen values (in real production machines, no artificially fio tests) of 250% memory overhead. I reproduced this with qemu version 2.9 as well.
Here the contents of our ceph.conf on the hypervisor:
"""
[client]
rbd cache writethrough until flush = False
rbd cache max dirty = 100663296
rbd cache size = 134217728
rbd cache target dirty = 50331648
"""
How to reproduce:
* create a virtual machine with a RBD backed disk (100GB or so)
* install a linux distribution on it (we are using Ubuntu)
* install fio (apt-get install fio)
* run fio multiple times with (e.g.) the following test file:
"""
# This job file tries to mimic the Intel IOMeter File Server Access Pattern
[global]
description=Emulation of Intel IOmeter File Server Access Pattern
randrepeat=0
filename=/root/test.dat
# IOMeter defines the server loads as the following:
# iodepth=1 Linear
# iodepth=4 Very Light
# iodepth=8 Light
# iodepth=64 Moderate
# iodepth=256 Heavy
iodepth=8
size=80g
direct=0
ioengine=libaio
[iometer]
stonewall
bs=4M
rw=randrw
[iometer_just_write]
stonewall
bs=4M
rw=write
[iometer_just_read]
stonewall
bs=4M
rw=read
"""
You can measure the virtual machine RSS usage on the hypervisor with:
virsh dommemstat <machine name> | grep rss
or if you are not using libvirt:
grep RSS /proc/<PID of qemu process>/status
When switching off the RBD client cache, all is ok again, as the process
does not use so much memory anymore.
There is already a ticket on the ceph bug tracker for this ([1]).
However I can reproduce that memory behaviour only when using qemu
(maybe it is using librbd in a special way?). Running directly 'fio'
with the rbd engine does not result in that high memory usage.
[1] http://tracker.ceph.com/issues/20054
** Affects: qemu
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1701449
Title:
high memory usage when using rbd with client caching
Status in QEMU:
New
Bug description:
Hi,
we are experiencing a quite high memory usage of a single qemu (used with KVM) process when using RBD with client caching as a disk backend. We are testing with 3GB memory qemu virtual machines and 128MB RBD client cache. When running 'fio' in the virtual machine you can see that after some time the machine uses a lot more memory (RSS) on the hypervisor than she should. We have seen values (in real production machines, no artificially fio tests) of 250% memory overhead. I reproduced this with qemu version 2.9 as well.
Here the contents of our ceph.conf on the hypervisor:
"""
[client]
rbd cache writethrough until flush = False
rbd cache max dirty = 100663296
rbd cache size = 134217728
rbd cache target dirty = 50331648
"""
How to reproduce:
* create a virtual machine with a RBD backed disk (100GB or so)
* install a linux distribution on it (we are using Ubuntu)
* install fio (apt-get install fio)
* run fio multiple times with (e.g.) the following test file:
"""
# This job file tries to mimic the Intel IOMeter File Server Access Pattern
[global]
description=Emulation of Intel IOmeter File Server Access Pattern
randrepeat=0
filename=/root/test.dat
# IOMeter defines the server loads as the following:
# iodepth=1 Linear
# iodepth=4 Very Light
# iodepth=8 Light
# iodepth=64 Moderate
# iodepth=256 Heavy
iodepth=8
size=80g
direct=0
ioengine=libaio
[iometer]
stonewall
bs=4M
rw=randrw
[iometer_just_write]
stonewall
bs=4M
rw=write
[iometer_just_read]
stonewall
bs=4M
rw=read
"""
You can measure the virtual machine RSS usage on the hypervisor with:
virsh dommemstat <machine name> | grep rss
or if you are not using libvirt:
grep RSS /proc/<PID of qemu process>/status
When switching off the RBD client cache, all is ok again, as the
process does not use so much memory anymore.
There is already a ticket on the ceph bug tracker for this ([1]).
However I can reproduce that memory behaviour only when using qemu
(maybe it is using librbd in a special way?). Running directly 'fio'
with the rbd engine does not result in that high memory usage.
[1] http://tracker.ceph.com/issues/20054
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1701449/+subscriptions
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Qemu-devel] [Bug 1701449] Re: high memory usage when using rbd with client caching
2017-06-30 6:09 [Qemu-devel] [Bug 1701449] [NEW] high memory usage when using rbd with client caching Nick
@ 2017-07-03 8:12 ` Markus Schade
2017-07-20 9:48 ` joconcepts
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Markus Schade @ 2017-07-03 8:12 UTC (permalink / raw)
To: qemu-devel
We are seeing pretty much the same issue with even small (1G mem)
virtual instances using 2-3GB of RSS after running I/O intensive
applications. Live migrating the instance to another machine pushes the
memory usage back, but it will grow back again once I/O is back.
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1701449
Title:
high memory usage when using rbd with client caching
Status in QEMU:
New
Bug description:
Hi,
we are experiencing a quite high memory usage of a single qemu (used with KVM) process when using RBD with client caching as a disk backend. We are testing with 3GB memory qemu virtual machines and 128MB RBD client cache. When running 'fio' in the virtual machine you can see that after some time the machine uses a lot more memory (RSS) on the hypervisor than she should. We have seen values (in real production machines, no artificially fio tests) of 250% memory overhead. I reproduced this with qemu version 2.9 as well.
Here the contents of our ceph.conf on the hypervisor:
"""
[client]
rbd cache writethrough until flush = False
rbd cache max dirty = 100663296
rbd cache size = 134217728
rbd cache target dirty = 50331648
"""
How to reproduce:
* create a virtual machine with a RBD backed disk (100GB or so)
* install a linux distribution on it (we are using Ubuntu)
* install fio (apt-get install fio)
* run fio multiple times with (e.g.) the following test file:
"""
# This job file tries to mimic the Intel IOMeter File Server Access Pattern
[global]
description=Emulation of Intel IOmeter File Server Access Pattern
randrepeat=0
filename=/root/test.dat
# IOMeter defines the server loads as the following:
# iodepth=1 Linear
# iodepth=4 Very Light
# iodepth=8 Light
# iodepth=64 Moderate
# iodepth=256 Heavy
iodepth=8
size=80g
direct=0
ioengine=libaio
[iometer]
stonewall
bs=4M
rw=randrw
[iometer_just_write]
stonewall
bs=4M
rw=write
[iometer_just_read]
stonewall
bs=4M
rw=read
"""
You can measure the virtual machine RSS usage on the hypervisor with:
virsh dommemstat <machine name> | grep rss
or if you are not using libvirt:
grep RSS /proc/<PID of qemu process>/status
When switching off the RBD client cache, all is ok again, as the
process does not use so much memory anymore.
There is already a ticket on the ceph bug tracker for this ([1]).
However I can reproduce that memory behaviour only when using qemu
(maybe it is using librbd in a special way?). Running directly 'fio'
with the rbd engine does not result in that high memory usage.
[1] http://tracker.ceph.com/issues/20054
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1701449/+subscriptions
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Qemu-devel] [Bug 1701449] Re: high memory usage when using rbd with client caching
2017-06-30 6:09 [Qemu-devel] [Bug 1701449] [NEW] high memory usage when using rbd with client caching Nick
2017-07-03 8:12 ` [Qemu-devel] [Bug 1701449] " Markus Schade
@ 2017-07-20 9:48 ` joconcepts
2017-09-29 8:55 ` James Page
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: joconcepts @ 2017-07-20 9:48 UTC (permalink / raw)
To: qemu-devel
Any update on this?
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1701449
Title:
high memory usage when using rbd with client caching
Status in QEMU:
New
Bug description:
Hi,
we are experiencing a quite high memory usage of a single qemu (used with KVM) process when using RBD with client caching as a disk backend. We are testing with 3GB memory qemu virtual machines and 128MB RBD client cache. When running 'fio' in the virtual machine you can see that after some time the machine uses a lot more memory (RSS) on the hypervisor than she should. We have seen values (in real production machines, no artificially fio tests) of 250% memory overhead. I reproduced this with qemu version 2.9 as well.
Here the contents of our ceph.conf on the hypervisor:
"""
[client]
rbd cache writethrough until flush = False
rbd cache max dirty = 100663296
rbd cache size = 134217728
rbd cache target dirty = 50331648
"""
How to reproduce:
* create a virtual machine with a RBD backed disk (100GB or so)
* install a linux distribution on it (we are using Ubuntu)
* install fio (apt-get install fio)
* run fio multiple times with (e.g.) the following test file:
"""
# This job file tries to mimic the Intel IOMeter File Server Access Pattern
[global]
description=Emulation of Intel IOmeter File Server Access Pattern
randrepeat=0
filename=/root/test.dat
# IOMeter defines the server loads as the following:
# iodepth=1 Linear
# iodepth=4 Very Light
# iodepth=8 Light
# iodepth=64 Moderate
# iodepth=256 Heavy
iodepth=8
size=80g
direct=0
ioengine=libaio
[iometer]
stonewall
bs=4M
rw=randrw
[iometer_just_write]
stonewall
bs=4M
rw=write
[iometer_just_read]
stonewall
bs=4M
rw=read
"""
You can measure the virtual machine RSS usage on the hypervisor with:
virsh dommemstat <machine name> | grep rss
or if you are not using libvirt:
grep RSS /proc/<PID of qemu process>/status
When switching off the RBD client cache, all is ok again, as the
process does not use so much memory anymore.
There is already a ticket on the ceph bug tracker for this ([1]).
However I can reproduce that memory behaviour only when using qemu
(maybe it is using librbd in a special way?). Running directly 'fio'
with the rbd engine does not result in that high memory usage.
[1] http://tracker.ceph.com/issues/20054
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1701449/+subscriptions
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Qemu-devel] [Bug 1701449] Re: high memory usage when using rbd with client caching
2017-06-30 6:09 [Qemu-devel] [Bug 1701449] [NEW] high memory usage when using rbd with client caching Nick
2017-07-03 8:12 ` [Qemu-devel] [Bug 1701449] " Markus Schade
2017-07-20 9:48 ` joconcepts
@ 2017-09-29 8:55 ` James Page
2017-09-29 10:18 ` Nick
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: James Page @ 2017-09-29 8:55 UTC (permalink / raw)
To: qemu-devel
Linking back to bug 1674481 which I think is the same issue seen in
Ubuntu
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1701449
Title:
high memory usage when using rbd with client caching
Status in QEMU:
New
Bug description:
Hi,
we are experiencing a quite high memory usage of a single qemu (used with KVM) process when using RBD with client caching as a disk backend. We are testing with 3GB memory qemu virtual machines and 128MB RBD client cache. When running 'fio' in the virtual machine you can see that after some time the machine uses a lot more memory (RSS) on the hypervisor than she should. We have seen values (in real production machines, no artificially fio tests) of 250% memory overhead. I reproduced this with qemu version 2.9 as well.
Here the contents of our ceph.conf on the hypervisor:
"""
[client]
rbd cache writethrough until flush = False
rbd cache max dirty = 100663296
rbd cache size = 134217728
rbd cache target dirty = 50331648
"""
How to reproduce:
* create a virtual machine with a RBD backed disk (100GB or so)
* install a linux distribution on it (we are using Ubuntu)
* install fio (apt-get install fio)
* run fio multiple times with (e.g.) the following test file:
"""
# This job file tries to mimic the Intel IOMeter File Server Access Pattern
[global]
description=Emulation of Intel IOmeter File Server Access Pattern
randrepeat=0
filename=/root/test.dat
# IOMeter defines the server loads as the following:
# iodepth=1 Linear
# iodepth=4 Very Light
# iodepth=8 Light
# iodepth=64 Moderate
# iodepth=256 Heavy
iodepth=8
size=80g
direct=0
ioengine=libaio
[iometer]
stonewall
bs=4M
rw=randrw
[iometer_just_write]
stonewall
bs=4M
rw=write
[iometer_just_read]
stonewall
bs=4M
rw=read
"""
You can measure the virtual machine RSS usage on the hypervisor with:
virsh dommemstat <machine name> | grep rss
or if you are not using libvirt:
grep RSS /proc/<PID of qemu process>/status
When switching off the RBD client cache, all is ok again, as the
process does not use so much memory anymore.
There is already a ticket on the ceph bug tracker for this ([1]).
However I can reproduce that memory behaviour only when using qemu
(maybe it is using librbd in a special way?). Running directly 'fio'
with the rbd engine does not result in that high memory usage.
[1] http://tracker.ceph.com/issues/20054
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1701449/+subscriptions
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Qemu-devel] [Bug 1701449] Re: high memory usage when using rbd with client caching
2017-06-30 6:09 [Qemu-devel] [Bug 1701449] [NEW] high memory usage when using rbd with client caching Nick
` (2 preceding siblings ...)
2017-09-29 8:55 ` James Page
@ 2017-09-29 10:18 ` Nick
2018-10-01 19:23 ` Andreas Hasenack
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Nick @ 2017-09-29 10:18 UTC (permalink / raw)
To: qemu-devel
Is there any progress on solving this or does anyone has an idea how to
further debug this? I think we are kinda stuck in the ceph bug tracker
issue as well [1].
[1] http://tracker.ceph.com/issues/20054
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1701449
Title:
high memory usage when using rbd with client caching
Status in QEMU:
New
Bug description:
Hi,
we are experiencing a quite high memory usage of a single qemu (used with KVM) process when using RBD with client caching as a disk backend. We are testing with 3GB memory qemu virtual machines and 128MB RBD client cache. When running 'fio' in the virtual machine you can see that after some time the machine uses a lot more memory (RSS) on the hypervisor than she should. We have seen values (in real production machines, no artificially fio tests) of 250% memory overhead. I reproduced this with qemu version 2.9 as well.
Here the contents of our ceph.conf on the hypervisor:
"""
[client]
rbd cache writethrough until flush = False
rbd cache max dirty = 100663296
rbd cache size = 134217728
rbd cache target dirty = 50331648
"""
How to reproduce:
* create a virtual machine with a RBD backed disk (100GB or so)
* install a linux distribution on it (we are using Ubuntu)
* install fio (apt-get install fio)
* run fio multiple times with (e.g.) the following test file:
"""
# This job file tries to mimic the Intel IOMeter File Server Access Pattern
[global]
description=Emulation of Intel IOmeter File Server Access Pattern
randrepeat=0
filename=/root/test.dat
# IOMeter defines the server loads as the following:
# iodepth=1 Linear
# iodepth=4 Very Light
# iodepth=8 Light
# iodepth=64 Moderate
# iodepth=256 Heavy
iodepth=8
size=80g
direct=0
ioengine=libaio
[iometer]
stonewall
bs=4M
rw=randrw
[iometer_just_write]
stonewall
bs=4M
rw=write
[iometer_just_read]
stonewall
bs=4M
rw=read
"""
You can measure the virtual machine RSS usage on the hypervisor with:
virsh dommemstat <machine name> | grep rss
or if you are not using libvirt:
grep RSS /proc/<PID of qemu process>/status
When switching off the RBD client cache, all is ok again, as the
process does not use so much memory anymore.
There is already a ticket on the ceph bug tracker for this ([1]).
However I can reproduce that memory behaviour only when using qemu
(maybe it is using librbd in a special way?). Running directly 'fio'
with the rbd engine does not result in that high memory usage.
[1] http://tracker.ceph.com/issues/20054
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1701449/+subscriptions
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Qemu-devel] [Bug 1701449] Re: high memory usage when using rbd with client caching
2017-06-30 6:09 [Qemu-devel] [Bug 1701449] [NEW] high memory usage when using rbd with client caching Nick
` (3 preceding siblings ...)
2017-09-29 10:18 ` Nick
@ 2018-10-01 19:23 ` Andreas Hasenack
2018-10-01 19:44 ` Jason Dillaman
2020-11-09 18:02 ` Thomas Huth
6 siblings, 0 replies; 8+ messages in thread
From: Andreas Hasenack @ 2018-10-01 19:23 UTC (permalink / raw)
To: qemu-devel
Any reason we are keeping this bug and #1674481 separate? We are not
sure?
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1701449
Title:
high memory usage when using rbd with client caching
Status in QEMU:
New
Bug description:
Hi,
we are experiencing a quite high memory usage of a single qemu (used with KVM) process when using RBD with client caching as a disk backend. We are testing with 3GB memory qemu virtual machines and 128MB RBD client cache. When running 'fio' in the virtual machine you can see that after some time the machine uses a lot more memory (RSS) on the hypervisor than she should. We have seen values (in real production machines, no artificially fio tests) of 250% memory overhead. I reproduced this with qemu version 2.9 as well.
Here the contents of our ceph.conf on the hypervisor:
"""
[client]
rbd cache writethrough until flush = False
rbd cache max dirty = 100663296
rbd cache size = 134217728
rbd cache target dirty = 50331648
"""
How to reproduce:
* create a virtual machine with a RBD backed disk (100GB or so)
* install a linux distribution on it (we are using Ubuntu)
* install fio (apt-get install fio)
* run fio multiple times with (e.g.) the following test file:
"""
# This job file tries to mimic the Intel IOMeter File Server Access Pattern
[global]
description=Emulation of Intel IOmeter File Server Access Pattern
randrepeat=0
filename=/root/test.dat
# IOMeter defines the server loads as the following:
# iodepth=1 Linear
# iodepth=4 Very Light
# iodepth=8 Light
# iodepth=64 Moderate
# iodepth=256 Heavy
iodepth=8
size=80g
direct=0
ioengine=libaio
[iometer]
stonewall
bs=4M
rw=randrw
[iometer_just_write]
stonewall
bs=4M
rw=write
[iometer_just_read]
stonewall
bs=4M
rw=read
"""
You can measure the virtual machine RSS usage on the hypervisor with:
virsh dommemstat <machine name> | grep rss
or if you are not using libvirt:
grep RSS /proc/<PID of qemu process>/status
When switching off the RBD client cache, all is ok again, as the
process does not use so much memory anymore.
There is already a ticket on the ceph bug tracker for this ([1]).
However I can reproduce that memory behaviour only when using qemu
(maybe it is using librbd in a special way?). Running directly 'fio'
with the rbd engine does not result in that high memory usage.
[1] http://tracker.ceph.com/issues/20054
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1701449/+subscriptions
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Qemu-devel] [Bug 1701449] Re: high memory usage when using rbd with client caching
2017-06-30 6:09 [Qemu-devel] [Bug 1701449] [NEW] high memory usage when using rbd with client caching Nick
` (4 preceding siblings ...)
2018-10-01 19:23 ` Andreas Hasenack
@ 2018-10-01 19:44 ` Jason Dillaman
2020-11-09 18:02 ` Thomas Huth
6 siblings, 0 replies; 8+ messages in thread
From: Jason Dillaman @ 2018-10-01 19:44 UTC (permalink / raw)
To: qemu-devel
@Nick: if you can recreate the librbd memory growth, any chance you can
help test a potential fix [1]?
[1] https://github.com/ceph/ceph/pull/24297
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1701449
Title:
high memory usage when using rbd with client caching
Status in QEMU:
New
Bug description:
Hi,
we are experiencing a quite high memory usage of a single qemu (used with KVM) process when using RBD with client caching as a disk backend. We are testing with 3GB memory qemu virtual machines and 128MB RBD client cache. When running 'fio' in the virtual machine you can see that after some time the machine uses a lot more memory (RSS) on the hypervisor than she should. We have seen values (in real production machines, no artificially fio tests) of 250% memory overhead. I reproduced this with qemu version 2.9 as well.
Here the contents of our ceph.conf on the hypervisor:
"""
[client]
rbd cache writethrough until flush = False
rbd cache max dirty = 100663296
rbd cache size = 134217728
rbd cache target dirty = 50331648
"""
How to reproduce:
* create a virtual machine with a RBD backed disk (100GB or so)
* install a linux distribution on it (we are using Ubuntu)
* install fio (apt-get install fio)
* run fio multiple times with (e.g.) the following test file:
"""
# This job file tries to mimic the Intel IOMeter File Server Access Pattern
[global]
description=Emulation of Intel IOmeter File Server Access Pattern
randrepeat=0
filename=/root/test.dat
# IOMeter defines the server loads as the following:
# iodepth=1 Linear
# iodepth=4 Very Light
# iodepth=8 Light
# iodepth=64 Moderate
# iodepth=256 Heavy
iodepth=8
size=80g
direct=0
ioengine=libaio
[iometer]
stonewall
bs=4M
rw=randrw
[iometer_just_write]
stonewall
bs=4M
rw=write
[iometer_just_read]
stonewall
bs=4M
rw=read
"""
You can measure the virtual machine RSS usage on the hypervisor with:
virsh dommemstat <machine name> | grep rss
or if you are not using libvirt:
grep RSS /proc/<PID of qemu process>/status
When switching off the RBD client cache, all is ok again, as the
process does not use so much memory anymore.
There is already a ticket on the ceph bug tracker for this ([1]).
However I can reproduce that memory behaviour only when using qemu
(maybe it is using librbd in a special way?). Running directly 'fio'
with the rbd engine does not result in that high memory usage.
[1] http://tracker.ceph.com/issues/20054
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1701449/+subscriptions
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug 1701449] Re: high memory usage when using rbd with client caching
2017-06-30 6:09 [Qemu-devel] [Bug 1701449] [NEW] high memory usage when using rbd with client caching Nick
` (5 preceding siblings ...)
2018-10-01 19:44 ` Jason Dillaman
@ 2020-11-09 18:02 ` Thomas Huth
6 siblings, 0 replies; 8+ messages in thread
From: Thomas Huth @ 2020-11-09 18:02 UTC (permalink / raw)
To: qemu-devel
*** This bug is a duplicate of bug 1674481 ***
https://bugs.launchpad.net/bugs/1674481
** This bug has been marked a duplicate of bug 1674481
memory overhead of qemu-kvm with ceph rbd and ram-allocation-ratio=0.9 leads to memory starvation
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1701449
Title:
high memory usage when using rbd with client caching
Status in QEMU:
New
Bug description:
Hi,
we are experiencing a quite high memory usage of a single qemu (used with KVM) process when using RBD with client caching as a disk backend. We are testing with 3GB memory qemu virtual machines and 128MB RBD client cache. When running 'fio' in the virtual machine you can see that after some time the machine uses a lot more memory (RSS) on the hypervisor than she should. We have seen values (in real production machines, no artificially fio tests) of 250% memory overhead. I reproduced this with qemu version 2.9 as well.
Here the contents of our ceph.conf on the hypervisor:
"""
[client]
rbd cache writethrough until flush = False
rbd cache max dirty = 100663296
rbd cache size = 134217728
rbd cache target dirty = 50331648
"""
How to reproduce:
* create a virtual machine with a RBD backed disk (100GB or so)
* install a linux distribution on it (we are using Ubuntu)
* install fio (apt-get install fio)
* run fio multiple times with (e.g.) the following test file:
"""
# This job file tries to mimic the Intel IOMeter File Server Access Pattern
[global]
description=Emulation of Intel IOmeter File Server Access Pattern
randrepeat=0
filename=/root/test.dat
# IOMeter defines the server loads as the following:
# iodepth=1 Linear
# iodepth=4 Very Light
# iodepth=8 Light
# iodepth=64 Moderate
# iodepth=256 Heavy
iodepth=8
size=80g
direct=0
ioengine=libaio
[iometer]
stonewall
bs=4M
rw=randrw
[iometer_just_write]
stonewall
bs=4M
rw=write
[iometer_just_read]
stonewall
bs=4M
rw=read
"""
You can measure the virtual machine RSS usage on the hypervisor with:
virsh dommemstat <machine name> | grep rss
or if you are not using libvirt:
grep RSS /proc/<PID of qemu process>/status
When switching off the RBD client cache, all is ok again, as the
process does not use so much memory anymore.
There is already a ticket on the ceph bug tracker for this ([1]).
However I can reproduce that memory behaviour only when using qemu
(maybe it is using librbd in a special way?). Running directly 'fio'
with the rbd engine does not result in that high memory usage.
[1] http://tracker.ceph.com/issues/20054
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1701449/+subscriptions
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2020-11-09 18:12 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-30 6:09 [Qemu-devel] [Bug 1701449] [NEW] high memory usage when using rbd with client caching Nick
2017-07-03 8:12 ` [Qemu-devel] [Bug 1701449] " Markus Schade
2017-07-20 9:48 ` joconcepts
2017-09-29 8:55 ` James Page
2017-09-29 10:18 ` Nick
2018-10-01 19:23 ` Andreas Hasenack
2018-10-01 19:44 ` Jason Dillaman
2020-11-09 18:02 ` Thomas Huth
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.