NetXMS Support Forum

English Support => General Support => Topic started by: lindeamon on January 17, 2012, 10:30:47 AM

Title: server memory consumption
Post by: lindeamon on January 17, 2012, 10:30:47 AM
hi,

i have a weired situation.
on my linux server the memory consumption of the server is steady,although memory consumption is rising over time it is done without unnecessary jumps.
on my windows server i can see big jumps and not a straight line and even when it is stabilized i do not see a clean straight line.

any ideas ?
Lindeamon
Title: Re: server memory consumption
Post by: Victor Kirhenshtein on January 17, 2012, 10:34:53 AM
Hi!

Could you please post graphs of memory consumption and results of "show stat" server console command (it will show number of nodes and DCIs)?

Best regards,
Victor
Title: Re: server memory consumption
Post by: lindeamon on January 17, 2012, 12:56:15 PM
hi victor,

i have attached the requested screenshots.
the 1st shot {not numbered file name} was taken about 1.5 hours ago and the rest were taken just now

Best Regards,
Lindeamon
Title: Re: server memory consumption
Post by: Victor Kirhenshtein on January 18, 2012, 12:11:11 PM
As memory usage is not growing, but just going up and down, this is nit caused by memory leak. Most likely this difference caused by different memory management algorithms in Windows and Linux, and/or different database drivers. Also, what parameter you are using - Process.VMSize or Process.WkSet?

Best regards,
Victor
Title: Re: server memory consumption
Post by: lindeamon on January 18, 2012, 01:16:59 PM
hi victor,

both servers are using postgreSQL v9.1 and i use the Process.WkSet for both of them and i also have to point out that the linux server is doing the sampling for both servers,the windows server does not sample the memory usage of the process.

Best Regards,
Lindeamon
Title: Re: server memory consumption
Post by: Victor Kirhenshtein on January 18, 2012, 01:49:44 PM
Process.WkSet represents amount of physical memory taken by the process (it's called RSS - Resident Set Size - on Linux). It is a decision of OS memory management on when remove unused pages from physical memory to swap and if they should be removed at all. For example, active work with dynamic memory allocation and release (and NetXMS do a lot of malloc/free operations) may cause heap to grow and allocate new pages and physical memory, and then after release memory in process heap shrinks and some pages may become unused. If those pages stay untouched for some time, OS memory manager may decide to remove them from physical memory. Or, process memory manager may releases some pages because of heap shrink - then those pages will be removed from process RSS. So, we have two layers of memory management with different implementations - OS memory manager and process heap (malloc, free, and company). They both can affect number of resident pages. You can also monitor Process.VMSize - it gives total amount of memory consumed by process, even if some of that memory is untouched for long time and swapped out. Will be interesting to see if there will be same difference on Windows and on Linux in this parameter.

Best regards,
Victor
Title: Re: server memory consumption
Post by: lindeamon on January 18, 2012, 01:53:11 PM
hi victor,

thanks for explaining.do you want me to do the test ?

Best Regards,
Lindeamon