Bug 980839 - To improve performance for listing running sandbox containers
To improve performance for listing running sandbox containers
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt-sandbox (Show other bugs)
x86_64 Linux
high Severity high
: rc
: ---
Assigned To: Daniel Berrange
Depends On:
  Show dependency treegraph
Reported: 2013-07-03 06:32 EDT by Alex Jia
Modified: 2013-08-01 10:58 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-08-01 10:58:36 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Alex Jia 2013-07-03 06:32:44 EDT
Description of problem:

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

How reproducible:

Steps to Reproduce:
1. # for i in {1..1000}; do virt-sandbox-service create -C -u httpd.service apache$i; done
2. # for i in {1..100}; do virt-sandbox-service start apache$i & done
3. # time virt-sandbox-service list -r |wc -l

Actual results:

# time virt-sandbox-service list|wc -l

real	0m0.877s
user	0m0.847s
sys	0m0.026s

# time virsh -c lxc:/// list |wc -l

real	0m0.196s
user	0m0.018s
sys	0m0.009s

Notes, need to minus 2 title line nd 1 end line , so total containers are 74-2-1=71.

# time virt-sandbox-service list -r |wc -l

real	3m20.606s
user	0m11.730s
sys	0m1.394s

Notes, it's more slow than 'virsh list', in addition, the result is inconsistent with above, in other words, the result(73 running containers) is incorrect.

# ps -ef|grep virt-sandbox-service-util|grep -v grep|wc -l

Notes, it indeed has 71 running containers not 73.

Expected results:
To improve performance for listing running sandbox containers, and make sure the result is correct.

Additional info:
Comment 2 Alex Jia 2013-07-08 02:13:25 EDT
(In reply to Alex Jia from comment #0)
> Description of problem:
To create 1000 containers then start some containers, and executing 'virt-sandbox-service list -r' to check running container number, you will need to wait more than 1m, and running number is inconsistent with real case.

> Version-Release number of selected component (if applicable):
# rpm -q selinux-policy libvirt-sandbox libvirt systemd
> How reproducible:

> Additional info:
Comment 3 Daniel Berrange 2013-08-01 10:58:36 EDT
In libvirt-sandbox >= 0.5.0, the 'virt-sandbox-service list' command has been deleted. Now that configurations are loaded into libvirt, a regular 'virsh list' will show them. If there are any problems with performance of virsh, please file a bug against libvirt.

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