New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nss-myhostname doesn't scale when using a large main routing table #11384
Comments
What makes you think resolved is at fault? can you provide a stacktrace of the "hang"? i.e. use "pstack" (from the gdb package) on the tool when it hangs. What do you mean by "eats all memory"? is this still an issue with current systemd-resolved versions? |
First I thought it's resolved's fault because it seemed to appear with resolved. But it seems it's somehow related to "myhostname mymachines". When running mtr, each resolving of a hop takes about 100MB, so there are 6-7 mtr processes consuming all memory of a 1GB box. |
if you turn off one of the two, and leave the other in, what happens then? |
how do you determine "consume all memory"? what tool do you use? |
Do you have a particular complex network setup? Millions of routes or interfaces or so? |
5 interfaces and a kernel routing table with currently 98120 routes. |
I figure the huge routing table is the problem... nss-myhostname synthesizes a special hostname |
Also see, #13199 |
Actually, let's close this one as duplicate of #13199 |
Sorry for replying to an old issue. But the fix in #13199 didn't fix this for me, unfortunately. If I understand this correctly, #13199 optimizes it to dump only the main routing table. However, I do have ~40k routes in the main routing table, and it costs 20+s for libnss_myhostname to do an unsuccessful rDNS lookup on my J4125 (should not be that low-end). A simple "ping" command to an IP address without rDNS takes ~25s in both CPU time and user time, and perf shows most time was consumed in I believe Is it possible to fix this properly by, for example, make the resource consuming |
Obviously the mentioned fix doesn't cover the case when the main table itself is huge. Let's hijack the thread here. |
systemd version the issue has been seen with
Used distribution
Expected behaviour you didn't see
Unexpected behaviour you saw
Steps to reproduce the problem
The text was updated successfully, but these errors were encountered: