celeryd 100% cpu when large dhcpd lease file
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
Critical
|
Gavin Panella | ||
1.5 |
Fix Released
|
Critical
|
Gavin Panella | ||
maas (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Trusty |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
maas-cluster-celery service eats CPU time, as one or more celeryd processes consumes 100% of the cpu. This looks to be due to the dhcpd.lease file being very large, as the time it takes to complete the upload_dhcp_leases file is excessive.
[2014-04-09 14:05:28,405: INFO/MainProcess] Task provisioningser
ubuntu@
total 18M
-rw-r--r-- 1 root root 17M Apr 9 14:06 dhcpd.leases
-rw-r--r-- 1 root root 366K Apr 3 19:39 dhcpd.leases~
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
34283 maas 20 0 1646232 1.464g 1896 R 99.9 18.9 12:15.58 celeryd
34284 maas 20 0 1970464 1.773g 1896 R 99.9 22.9 14:49.22 celeryd
34259 maas 20 0 140572 17980 1912 R 99.5 0.2 3:32.11 celeryd
36722 maas 20 0 1592204 1.414g 2444 R 99.5 18.2 4:25.09 celeryd
37773 maas 20 0 591952 482116 2380 R 99.2 5.9 0:43.97 celeryd
This was noticed in an environment that is running 4 parallel deployments with 3 to 4 LXC containers per deployment in a constant loop, 24/7.
[Impact]
* More efficient lease parser to work on larger deployments -- previously would be CPU bound in these cases and sometimes causing timeouts
[Testcase]
* Install maas; ensure new lease parser works by detecting nodes ip addresses correctly for the maas managed dhcp provider
[Regression Potential]
* Large at first blush, but this has had lots of testing; both from unittests as well as maasCI and Openstack Interoperability Lab
Related branches
- Raphaël Badin (community): Approve
-
Diff: 773 lines (+407/-212)2 files modifiedsrc/provisioningserver/dhcp/leases_parser_fast.py (+87/-0)
src/provisioningserver/dhcp/tests/test_leases_parser.py (+320/-212)
- Gavin Panella (community): Approve
-
Diff: 12 lines (+1/-1)1 file modifiedsrc/provisioningserver/dhcp/leases.py (+1/-1)
- Gavin Panella (community): Approve
-
Diff: 773 lines (+407/-212)2 files modifiedsrc/provisioningserver/dhcp/leases_parser_fast.py (+87/-0)
src/provisioningserver/dhcp/tests/test_leases_parser.py (+320/-212)
- Gavin Panella (community): Approve
-
Diff: 12 lines (+1/-1)1 file modifiedsrc/provisioningserver/dhcp/leases.py (+1/-1)
description: | updated |
Changed in maas: | |
status: | Triaged → In Progress |
assignee: | nobody → Gavin Panella (allenap) |
Changed in maas (Ubuntu): | |
status: | New → Fix Released |
tags: |
added: verification-done removed: verification-needed |
tags: |
added: verification-done removed: verification-needed |
Number of unique entries in the dhcpd.lease file.
ubuntu@ maas-trusty: ~$ grep hardware /var/lib/ maas/dhcp/ dhcpd.leases | awk '{print $3}' | sort | uniq | wc -l
3931