NetTalk Central

Author Topic: AWS's ELB and memory usage using a NTWS  (Read 2468 times)

astahl

  • Sr. Member
  • ****
  • Posts: 308
    • View Profile
    • Email
AWS's ELB and memory usage using a NTWS
« on: December 16, 2019, 03:00:28 AM »
Hi All,
Two things of interest.

1.)
We are using the AWS Elastic Load Balancer (ELB) on three different sites for 3 years now and have been seeing huge climbs in memory usage.  When app was started the memory usage started at 17.1 meg, and within a 24 hour period increased to approx. 300 meg. Our NTWS within a 24 to 48 hour period could and would hang and a restart of the NTWS was needed. We also were rebooting the server on a weekly basis to try and extend our uptime of our NTWS.

We decided to remove the ELB's and get LE certificates one at a time to see if that would help the situation. The ELB was hitting the site every 2 seconds which created a session instance.
I can report that within the same time period the memory usage went from 17.1 meg at startup to 29.5 meg which was a huge win for us.

2.)
Bruce, as sessions are deleted from the session queue should I not see a relative decline in memory usage? Is there something else going on under the hood that I don't understand?
I kinda was expecting the memory usage growth to decline to almost the starting value. Could this be a memory leak when deleting a session?

Also a shout out to Don Ridley for helping us through the certificate stage. I must say that NT 11 certificate acquisition made it easy peasy to get a certificate!! Great job Bruce!!!!!!!


Ashley

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11191
    • View Profile
Re: AWS's ELB and memory usage using a NTWS
« Reply #1 on: December 17, 2019, 01:15:48 AM »
Hi Ashley,

>> as sessions are deleted from the session queue should I not see a relative decline in memory usage?

yes. Although the way Windows "displays" memory is complicated. In other words if the OS has ram to burn it may leave it with your app for a while. (so you won't necessarily see an immediate drop-off).

The key thing to be paying attention to is a program that just keeps consuming forever, and does not find a "stable" working set of memory. Keeping an eye on the "current number of sessions" would be a good place for that. Obviously starting a new session every 2 seconds means 450 sessions in 15 minutes, but that's no extreme. That's assuming your session timeout was set to 15 minutes. (450 sessions will consume very little ram - well, well, less than 1 meg.)

>> Is there something else going on under the hood that I don't understand?

probably many things <g> - but memory leaks should not be part of it. You may indeed have a memory leak, which is now being hidden by "much less traffic". You should try using WebStrain on the site to see if you still leak over time.

>>I kinda was expecting the memory usage growth to decline to almost the starting value. Could this be a memory leak when deleting a session?

probably not in my code, but if you are using Memeory tables to cache things, and not cleaning that up, that could be an issue.

cheers
Bruce


astahl

  • Sr. Member
  • ****
  • Posts: 308
    • View Profile
    • Email
Re: AWS's ELB and memory usage using a NTWS
« Reply #2 on: December 17, 2019, 02:00:28 AM »
Thanks Bruce


Ashley