Bug 1689876
| Summary: | Huge testpmd startup time when realtime-virtual-host profile is enabled | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | Maxime Coquelin <maxime.coquelin> |
| Component: | tuned | Assignee: | Peter Xu <peterx> |
| Status: | CLOSED DUPLICATE | QA Contact: | qe-baseos-daemons |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 8.0 | CC: | bhu, echaudro, jeder, jskarvad, lcapitulino, olysonek, peterx, thozza |
| Target Milestone: | rc | Flags: | pm-rhel:
mirror+
|
| Target Release: | 8.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | No Doc Update | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2020-02-13 22:26:14 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: | 1755139 | ||
|
Description
Maxime Coquelin
2019-03-18 10:51:11 UTC
Ok sorry for the late update... Here's something I got.
I noticed that even if I start a simplest testpmd program ("testpmd -m 1024"), the process will try to lock ~200GB memory. I'm trying with the latest DPDK, which is 19.11.0-rc2:
xz-x1:~ # pgrep -fa testpmd
26679 sudo ./testpmd -m 1024
26681 ./testpmd -m 1024
xz-x1:~ # grep VmLck /proc/26681/status
VmLck: 200376752 kB
Here's the mapping that may relevant to such huge memory usage:
100033000-100034000 rw-s 00000000 00:19 140686 /run/dpdk/rte/fbarray_memseg-1048576k-0-0
140000000-180000000 rw-s 00000000 00:45 583071 /mnt/hugepages-1G/rtemap_0
180000000-940000000 r--p 00000000 00:00 0 [~32G]
940000000-940001000 rw-s 00000000 00:19 140687 /run/dpdk/rte/fbarray_memseg-1048576k-0-1
980000000-1180000000 r--p 00000000 00:00 0 [~32G]
1180000000-1180001000 rw-s 00000000 00:19 140688 /run/dpdk/rte/fbarray_memseg-1048576k-0-2
11c0000000-19c0000000 r--p 00000000 00:00 0 [~32G]
19c0000000-19c0001000 rw-s 00000000 00:19 140689 /run/dpdk/rte/fbarray_memseg-1048576k-0-3
1a00000000-2200000000 r--p 00000000 00:00 0 [~32G]
2200000000-2200061000 rw-s 00000000 00:19 131690 /run/dpdk/rte/fbarray_memseg-2048k-0-0
2200200000-2600200000 r--p 00000000 00:00 0 [~16G]
2600200000-2600261000 rw-s 00000000 00:19 131691 /run/dpdk/rte/fbarray_memseg-2048k-0-1
2600400000-2a00400000 r--p 00000000 00:00 0 [~16G]
2a00400000-2a00461000 rw-s 00000000 00:19 131692 /run/dpdk/rte/fbarray_memseg-2048k-0-2
2a00600000-2e00600000 r--p 00000000 00:00 0 [~16G]
2e00600000-2e00661000 rw-s 00000000 00:19 131693 /run/dpdk/rte/fbarray_memseg-2048k-0-3
2e00800000-3200800000 r--p 00000000 00:00 0 [~16G]
If we add these big chunks up... 32G*4 + 16G*4 = 192G. That mostly matches. All these are 4K private anonymous mappings.
IMHO it didn't eat up the system simply because when we try to populate most of the 200G pages they're filled with the zero page so it didn't really consume the host memory (until written, but they seem to be mapped as RO which is even more strange...). However it's a bit scary, and it also explains on why mlockall() is slow because it'll still need to traverse the whole 4K mappings and build everything up, and, do that for 200G mem took a few seconds.
And why it's fast on RHEL7 and old hosts? I didn't look very deep into the RHEL7 code, but my wild guess could be that the GUP code changed quite a bit between RHEL7 and RHEL8/upstream so when we used it on RHEL7 before mm_populate() of mlockall() simply failed far earlier, and because mm_populate() does ignores all errors we didn't notice the fact.
Further look into DPDK, it's memseg_primary_init() that calls alloc_va_space() that malloced all these tons of memories. I've no idea on why they're needed. Maxime, do you know why it needs such huge memory even if with the simplest testpmd?
Peter
Peter, Should this BZ be closed as a dupe of bug 1786923. (In reply to Luiz Capitulino from comment #14) > Peter, > > Should this BZ be closed as a dupe of bug 1786923. Agreed. Closing as a dupe as per comment 14 and comment 15. *** This bug has been marked as a duplicate of bug 1786923 *** The needinfo request[s] on this closed bug have been removed as they have been unresolved for 500 days |