[libvirt] [PATCH] daemon: Allow overriding NOFILES ulimit for the daemon as well

Daniel P. Berrange berrange at redhat.com
Tue Jan 10 14:11:57 UTC 2012


On Thu, Jan 05, 2012 at 12:23:14PM +0100, Michal Privoznik wrote:
> On 05.01.2012 11:50, Daniel P. Berrange wrote:
> > On Thu, Jan 05, 2012 at 11:16:32AM +0100, Michal Privoznik wrote:
> >> One of my latest patches (d8db0f9690) created support for setting
> >> the limit for the maximum of opened files by qemu user. However,
> >> since libvirtd keeps one FD opened per domain (well, for qemu at least)
> >> it will likely hit this limit on huge scenarios.
> >> ---
> >>  daemon/libvirtd.aug  |    1 +
> >>  daemon/libvirtd.c    |   37 +++++++++++++++++++++++++++++++++++++
> >>  daemon/libvirtd.conf |    9 +++++++++
> >>  3 files changed, 47 insertions(+), 0 deletions(-)
> > 
> > IMHO, this is the kind of thing that should be done by the
> > system init scripts.
> > 
> > Daniel
> 
> In that case, can you give me a hint how to change that limit on RHEL-6?
> Esp. when I am not running libvirtd service by hand but via Upstart
> init? Because all my attempts to change /etc/security/limits.conf were
> not successful.

For SysV init, the /etc/init.d/libvirtd and /etc/sysconfig/libvirt
scripts will need to explicitly call ulimit to set this.

For SystemD, you can just add LimitNOFILE=NNNN to the libvirtd.service
definition


Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|




More information about the libvir-list mailing list