Bug 1048820

Summary: max_clients should be bigger than 20 by default
Product: [Community] Virtualization Tools Reporter: Richard W.M. Jones <rjones>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED UPSTREAM QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: acathrow, mprivozn
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-05-29 13:36:32 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 910269    

Description Richard W.M. Jones 2014-01-06 11:49:45 UTC
Description of problem:

The current setting of max_clients = 20 in libvirtd.conf
prevents libguestfs from running more than 20 backends, more
than 20 virt-builder/virt-resize/... instances from running,
virt-df from creating more than 20 work threads globally and so on.

This setting should be (a) much bigger and (b) justified in terms
of the resources that each connection can use.  eg. If libvirt
needs 10 MB / connection[*] then you could calculate this based
on available memory.

[*] Made up number.

Version-Release number of selected component (if applicable):

libvirt from git

How reproducible:

100%

Steps to Reproduce:
1. Start > 20 guestfish instances.  21st instance will hang.

Comment 1 Michal Privoznik 2014-01-08 16:00:33 UTC
Rich, I think that this addresses the same problem that Dan reported in bug 981729. After the bug is fixed I don't see any reason why the default can't be sized up.

Comment 2 Michal Privoznik 2014-05-29 13:36:32 UTC
This has been fixed upstream for a while (since v1.2.3-rc1~196):

commit 68f60f669c566e53904ce39c95a57853f7f23638
Author:     Michal Privoznik <mprivozn>
AuthorDate: Tue Mar 4 18:55:24 2014 +0100
Commit:     Michal Privoznik <mprivozn>
CommitDate: Mon Mar 17 17:45:13 2014 +0100

    daemon: Introduce max_anonymous_clients
    
    https://bugzilla.redhat.com/show_bug.cgi?id=992980
    
    This config tunable allows users to determine the maximum number of
    accepted but yet not authenticated users.
    
    Signed-off-by: Michal Privoznik <mprivozn>

commit 4015396b2cf9f43ff77d24e3a4d3e1372f5352a3
Author:     Michal Privoznik <mprivozn>
AuthorDate: Tue Mar 4 15:37:27 2014 +0100
Commit:     Michal Privoznik <mprivozn>
CommitDate: Mon Mar 17 17:37:42 2014 +0100

    virNetServer: Introduce unauth clients counter
    
    The counter gets incremented on each unauthenticated client added to the
    server and decremented whenever the client authenticates.
    
    Signed-off-by: Michal Privoznik <mprivozn>

However, I forgot to update this bug. Doing so now.