-
Notifications
You must be signed in to change notification settings - Fork 24
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
Mempool usage becomes 100% over time #73
Comments
Two questions:
|
Yes the pcap file is a capture and has incomplete connections, and it is a naive loop of the same pcap with no modifications. Do the cut-off connections remain indefinitely in the ram? And what happens when a single connection has huge data, like a big download? Would it remain in the ram until it is finished? |
Can you say more about how you have modified the basic example? Are you storing packets, connection records, something else? |
I just changed the config part. That is, removed the line: let config = default_config(); and replaced it with something like let config = load_config("config.toml"); |
One thing to add -- there would also be spikes in mempool utilization if there are a number of out-of-order packets that need to be stored for later TCP reassembly. The lightweight stream reassembly (section 5.2) doesn't release mbufs back to the DPDK mempool until gaps are filled or the connection times out. In addition to toggling the TCP inactivity timeout, could you try reducing the Flagging this as a documentation need for now. (It may require a fix in the future.) |
Reducing the So I can control the memory usage by tuning the config. Is it possible to see how many connections are dropped/failed due these settings? |
You could enable warn logs to get a sense of the # of overflows that cause a connection to be dropped:
|
I'm replaying a ~5GB pcap file in a nic and using a modified
basic
example which uses online configuration. In that setup, I see after each iteration of the replay, mempool usage goes up around ~14%, and so after 7 or 8 replays it becomes 100% and then retina drops everything.I'm using a mempool with capacity 655350 so it gets ~1.3GB of ram I think. I can increase the amount of mempool, but it just delays the failure,
I can easily reproduce the problem and add logs and monitor configs in retina, or analyze the pcap file and look for things such as unfinished connections.
The text was updated successfully, but these errors were encountered: