LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-08-2014, 11:16 PM   #1
bkk
LQ Newbie
 
Registered: Nov 2014
Posts: 1

Rep: Reputation: Disabled
VmRSS for memory leak


I am working on a multi-threaded process written in C running on Linux OS.

When I do some churn activity for several hours, I see continuous increase in VmRSS, VmData and VmSize.

I used Valgrind to verify if there is any memory leak but the Valgrind shows NO leak.

My test team uses VmRSS as memory footprint of the process and since this is continuously increasing, they claim that there is memory leak.

My questions are:

1) How can I check who is contributing in the increase of VmRSS?

2) Should VmRSS be used for checking memory footprint?

3) Does increase in VmRSS indicate memory leak (even if Valgrind does not show that)?

Thanks in advance!
 
Old 11-11-2014, 07:22 PM   #2
dijetlo
Senior Member
 
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,307
Blog Entries: 2

Rep: Reputation: Disabled
Quote:
I am working on a multi-threaded process written in C running on Linux OS.
BK, you posted this in the Newbie Forum.
Quote:
1) How can I check who is contributing in the increase of VmRSS?
From the command line of the VM
Code:
ps -eo pid,comm,sz,pmem >> ~/memlog
Will give you the core process size (sz) and the current allocated size as a percentage of total memory (pmem) for every process running that your credentials grant you access to (actual mileage may vary...). You can check it at startup (baseline) and again at whatever intervals you choose. It creates a text file in your home directory called memlog containing the output.
Quote:
2) Should VmRSS be used for checking memory footprint?
Yeah... if your checking a virtual servers memory footprint, however you're running a process on the guest so you're going to want to use the guests environment to check for memory leaks.
Quote:
3) Does increase in VmRSS indicate memory leak (even if Valgrind does not show that)?
No. The server instance is creating and storing data unrelated to your process, just as a function of operating. Depending on it's environment, the growth rate can be...occasionally alarming.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] why VMrss is larger than the physical memory? koshihaku Linux - Server 10 09-01-2010 08:42 AM
[SOLVED] Memory leak: How risky not to free allocated memory. kaz2100 Linux - General 1 12-24-2008 01:00 AM
Inactive memory issue, Freebsd (memory leak?) JasperB *BSD 7 08-12-2008 04:19 AM
Virtual Memory: What does VmRSS actually stand for in English fancypiper Linux - General 2 06-05-2004 04:09 AM
Memory Leak when using memory debugging C program on SuSE SLES8 babalina Linux - Distributions 0 10-06-2003 10:39 AM


All times are GMT -5. The time now is 09:07 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration