-
Notifications
You must be signed in to change notification settings - Fork 2
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
Memory leak #125
Comments
Hi, thank you for the report! I have an idea about where this comes from, at least the growing log and the set of left over datagram sockets, though fixing this won't be super simple. The information about port status is exposed via OpenFlow via the Port Table, and on userspace via
where the lowest bit in config means "port set down", and the bit in state means "no link" (so all zero means it does have a link). These are eqivalent to the OpenFlow config and state fields of ports. But So the only way of obtaining that info without triggering the issue currently will be via OpenFlow from ofagent. |
As a simple workaround against the log file growing, you can mark it as read only
The side effect of that is that it will start logging to stderr instead of stdout:
But as it is |
Hi, thank you for your swift response.
By python bindings do you mean the OFDPA bindings for python? This is what we use for our custom controller running on the SDN. It has not been causing any memory issues so far even though we query packet counters through it (we migrated from Ryu to OFDPA_python maybe a year or two ago already and had no issues until we introduced the Given the above, I think I will try to query the port status using the bindings and hope it works. Once we migrated away from Ryu we also stopped using ofagent and I'd prefer not to reintroduce it again if not necessary.
This seems to do the trick, the log file itself is not growing anymore. I hope a fix can be found for the leak. If not closely monitored, running out of memory on the SDN becomes very costly. The switch becomes inaccessible through ssh and serial console, meaning that someone has to physically go to the site to reboot it; not to mention the interruption to customer's network traffic... |
Yes, though I think there isn't much logged by default apart from startup, so if you controller has a persistent connection, then the log file doesn't grow apart from the first few lines. AFAICT the issue is that on every new connection to OF-DPA, a few lines are written to the log, which eventually accumulates. And since the logfile is in /tmp, and /tmp is a ramdisk, it slowly eats up memory. |
Both issues are fixed internally, and upcoming nightlies will include the fixes. |
We found a steady memory leak while repeatedly calling the command
client_drivshell ps
.Hardware: Agema ag7648
OS: issue found on both BISDN 4.7.0 and 5.2.0
Steps to reproduce:
sudo watch -n1 "client_drivshell ps"
in ascreen
for a longer period of timefree -m
every hour and compareNotes:
/tmp/ofdpa_client.log
is constantly growing (and thus might be contributing to the memory usage) I will attach this file here for investigation (truncated to fit within github upload limits)client_drivshell ps
opens a new datagram socket, but those socket files are not removed after the command is finished. Indeedls -l /tmp/ | grep fpc. | wc -l
returns a big number 167391 on our SDN after a few days of running. I'm not sure if this is related to the memory leak though.onlpdump -S
, but it seems that at least this command is not leaking memoryofdpa_client.log
I hope this is helpful. Let me know if you have any other questions.
Our use case is to find ports' status (up or down) so that we can report it in our metrics. We do not run
baseboxd
and so the ports are not visible to the kernel. Do you know of any alternatives that can be used to get this information?The text was updated successfully, but these errors were encountered: