RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1059518 - [Doc] Configuring the host to allow many containers
Summary: [Doc] Configuring the host to allow many containers
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: doc-Resource_Management_Guide
Version: 7.0
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Peter Ondrejka
QA Contact: ecs-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-30 04:28 UTC by Alex Jia
Modified: 2019-03-06 00:44 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-23 11:45:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Alex Jia 2014-01-30 04:28:57 UTC
Description of problem:
For example, if users want ro run more than 1000 containers, they must explicitly increase max open files for running libvirt daemon rather than just modify 'max_clients' and 'max_workers' in  libvirtd.conf, it's hard to know concrete numbers for users, so we require a document to introduce it.

Version-Release number of selected component (if applicable):
# rpm -q libvirt libvirt-sandbox
libvirt-1.1.1-21.el7.x86_64
libvirt-sandbox-0.5.0-8.el7.x86_64


How reproducible:
Always

Steps to Reproduce:
 sysctl fs.file-nr
fs.file-nr = 82944	0	3245263

# ulimit -n
65536

# tail -2 /etc/libvirt/libvirtd.conf
max_clients = 10000
max_workers = 10000

# grep 'open files' /proc/`pidof libvirtd`/limits
Max open files            1024                 4096                 files

Notes, it seems we should successfully start 1024 containers, but in fact, we only started 332 containers.

# systemctl restart libvirtd.service
# for i in {1..1001}; do virt-sandbox-service create -C -u httpd.service apache$i; done
# for i in {1..1001}; do virsh -c lxc:/// start apache$i; done

Only successfully start 332 containers.

# virsh -c lxc:/// -q list|wc -l
332

# virsh -c lxc:/// start apache333
Failed to start domain apache333
annot open /dev/null: Too many open files

Actual results:
Pease see above.

Expected results:
Fix it.

Additional info:

# lsof|grep `pidof libvirtd`|wc -l
12294

Notes, in fact, there is 12294 open files.

To increase max open files for running libvirt daemon.
# prlimit --nofile=65535:65535 --pid `pidof libvirtd`

# grep 'open files' /proc/`pidof libvirtd`/limits
Max open files            65535                65535                files

Try again.
# virsh -c lxc:/// start apache333
Domain apache333 started

Now, continue to start the rest of containers.
# for i in {334..1001}; do virsh -c lxc:/// start apache$i; done

Everything is okay now.
# virsh -c lxc:/// -q list|wc -l
1001

The current open files.
# lsof|grep `pidof libvirtd`|wc -l
34345


For more, please see https://bugzilla.redhat.com/show_bug.cgi?id=980743#c4.


Note You need to log in before you can comment on or make changes to this bug.