Need help to stress test a tcp server memory usage

Just starting out? Need help? Post your questions and find answers here.
tatanas
Enthusiast
Enthusiast
Posts: 261
Joined: Wed Nov 06, 2019 10:28 am
Location: France

Need help to stress test a tcp server memory usage

Post by tatanas »

Hi,

I have developed a Windows server application that approximately 400 clients connect to simultaneously.
However, I believe there is a memory leak. Memory usage keeps increasing, even though it’s quite small (around 20 MB per day). I’ve checked threads, mutexes, memory allocation, JSON creation, and so on, but I haven’t found anything.
Therefore, I want to test how an extremely simple TCP server behaves under a large number of connections/disconnections, both with and without TLS. Maybe my way of monitoring memory usage isn’t accurate, so I’m reaching out to you.
Could you provide me with very simple code for:

A client that creates a large number of connections/disconnections in a short time
A server that accepts these connections and displays real-time memory usage

(Regarding TLS, I already have a certificate and a private key.)

Thank you in advance
Windows 10 Pro x64
PureBasic 6.20 x64
miskox
Enthusiast
Enthusiast
Posts: 108
Joined: Sun Aug 27, 2017 7:37 pm
Location: Slovenia

Re: Need help to stress test a tcp server memory usage

Post by miskox »

Not really an answer to your question but might help you to locate the file (.dll?) that causes memory leak. See https://www.dostips.com/forum/viewtopic.php?t=5495

In 2014 I found a memory leak in ESET antivirus.

Saso
Post Reply