Extremely high RAM usage when running a CONGA implementation

42 views
Skip to first unread message

Hemadri Shekhar Das

unread,
Feb 20, 2026, 12:54:14 AM (3 days ago) Feb 20
to ns-3-users
Hi everyone,

this is my first post here so sorry if I am missing any details.

I am currently trying to implement the CONGA Load Balancing Algorithm in ns3 to do some modifications to it and then evaluate it.

So rather writing it from scratch I decided to use this github repo I came across which not only has CONGA but many other Load Balancers implemented.
https://github.com/snowzjx/ns3-load-balance

Since it is an older version of ns3 from 2016, I assumed it was ns3.25 and have set it up in a docker container with python3.8 and gcc-5/g++-5.

But when i try to run it using the following command:

./waf --run "conga-simulation-large --ID=1 --randomSeed=1 --EndTime=1 --FlowLaunchEndTime=0.5 --runMode=Conga --serverCount=4 --spineCount=2 --leafCount=2 --spineLeafCapacity=0.04 --leafServerCapacity=0.01 --cdfFileName=examples/load-balance/DCTCP_CDF.txt --load=0.1 --congaFlowletTimeout=250000"


the code starts executing, but it starts consuming memory going up to ~13GB and then crashing my laptop(it has 16GB RAM).

For comparison, I have run some simulations in ns3.45(although not as complex as this) and they hardly crossed 700MB of RAM.

So my questions are:

1. Is this much memory consumption normal even though it is such simple parameters? I have tried with various combinations of the parameters all of them with the same behavior.
2. I understand that it is trying to generate flows from a given CDF. Can that be the cause for the memory consumption?
3. Could there be a memory leak?
4. Has anyone else been able to run this repo? If so what was ther setup?

Charles Pandian

unread,
Feb 20, 2026, 1:28:31 AM (3 days ago) Feb 20
to ns-3-users
(If it is not a memory leak,)
Theoretically, in a high-speed,  high data rate simulations, (high bandwidth links usually defined in such load balancing scenarios), ns-3 may generate millions of "Packet" objects in seconds. If the simulation is configured to record every packet event (Pcap, Ascii traces, or FlowMonitor), the memory usage will explode.

Try to downsize the simulation "conga-simulation-large" in all aspects and try to run it again.
Disable all traces (if any).
Reduce the number of flows and their data rates.
Reduce the simulation time as minimally as possible.

And if it works now, then try to upscale it one by one - you will catch the culprit who is consuming the memory.

Hemadri Shekhar Das

unread,
Feb 20, 2026, 1:37:42 AM (3 days ago) Feb 20
to ns-3-users
The parameters   --spineLeafCapacity=0.04 --leafServerCapacity=0.01    essentially mean a link capacity of 0.04Gbps and 0.01Gbps. So I don't think that is causing any issues.

But yeah the ASCII traces , Flowmonitor and logs may be the culprit. I will try disabling them.

Thanks for the input. 

Charles Pandian

unread,
Feb 20, 2026, 1:40:00 AM (3 days ago) Feb 20
to ns-3-users
If possible, disable the flowMonitor and linkMonitor, and try that again.

On Friday, February 20, 2026 at 11:58:31 AM UTC+5:30 Charles Pandian wrote:
Message has been deleted

Hemadri Shekhar Das

unread,
Feb 20, 2026, 5:30:19 AM (2 days ago) Feb 20
to ns-3-users
Disabled both flowmonitor and linkmonitor. There is no ascii or pcap enabled.

The issue persists.

Gabriel Ferreira

unread,
Feb 20, 2026, 5:45:39 AM (2 days ago) Feb 20
to ns-3-users
Best thing you can do is run with Heaptrack. It will help diagnose around where the memory is allocated, and if it is actually leaked or held by something else.
Look at the manual for how to do that.

https://www.nsnam.org/docs/release/3.47/manual/html/profiling.html#id3

Tom Henderson

unread,
Feb 20, 2026, 8:32:31 AM (2 days ago) Feb 20
to ns-3-...@googlegroups.com

This behavior usually indicates that there is a memory leak.  I typically use valgrind to debug such problems (a HOWTO is here: https://www.nsnam.org/wiki/HOWTO_use_Valgrind_to_debug_memory_problems).  Gabriel favors sanitizers, which are documented here: https://www.nsnam.org/docs/release/3.47/manual/html/profiling.html

--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/ns-3-users/e8882939-4113-45bb-8006-46fc40501454n%40googlegroups.com.

Hemadri Shekhar Das

unread,
Feb 20, 2026, 11:37:26 PM (2 days ago) Feb 20
to ns-3-users
Thanks for all the help. I am looking into them right now.

Tommaso Pecorella

unread,
Feb 21, 2026, 3:29:20 AM (yesterday) Feb 21
to ns-3-users
Note that for Valgrind and sanitizers you don't need a large simulation, a very small one usually is enough.

Furthermore, you might want to check if the memory is used in a big spike or it accumulates over time. 
Sometimes, even w/o memory leaks, the memory gets eaten up because memory is used but never freed until the simulation ends.
Reply all
Reply to author
Forward
0 new messages