Web Images Videos Maps News Shopping Gmail more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Issue 182 in google-perftools: pprof results are low compared with top
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
codesite-nore...@google.com  
View profile  
 More options Oct 29, 1:01 pm
From: codesite-nore...@google.com
Date: Thu, 29 Oct 2009 17:01:57 +0000
Local: Thurs, Oct 29 2009 1:01 pm
Subject: Issue 182 in google-perftools: pprof results are low compared with top
Status: New
Owner: ----

New issue 182 by petef4: pprof results are low compared with top
http://code.google.com/p/google-perftools/issues/detail?id=182

What steps will reproduce the problem?
1. Profile a program (with HEAP_PROFILE_MMAP=true)
2. Compare results with /usr/bin/top
3.

What is the expected output? What do you see instead?
The inuse space reported using pprof is about half of that in the DATA
reported by top.

What version of the product are you using? On what operating system?
1.3 and 1.4.
2.6.24-etchnhalf.1-amd64 #1 SMP Sat Aug 15 20:38:41 UTC 2009 x86_64 GNU/
Linux
export CFLAGS="-m32 -g"
export CXXFLAGS="-m32 -g"
configure --enable-static --enable-frame-pointers --host=i686

Please provide any additional information below.
Top was configured to show extra columns for SWAP, CODE and DATA. Added
columns with f  p r s <enter> and then W to write to .toprc.

Some disparity is expected.
1. TCmalloc does not report usage by stack, initialized data and BSS.
2. TCMalloc has overheads of a few MB
3. TCMalloc reports bytes allocated, top will see these rounded up to
pages
4. TCMalloc does not return freed memory

I'm requesting an enhancement. Add counters for low level calls from
TCMalloc to sbrk, mmap, etc. which can then be reported along with the
program totals.  These new counter results should tally better with top
and provide more confidence that TCMalloc is logging all program usage.

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
codesite-nore...@google.com  
View profile  
 More options Nov 2, 10:35 pm
From: codesite-nore...@google.com
Date: Tue, 03 Nov 2009 03:35:53 +0000
Local: Mon, Nov 2 2009 10:35 pm
Subject: Re: Issue 182 in google-perftools: pprof results are low compared with top

Comment #1 on issue 182 by csilvers: pprof results are low compared with top
http://code.google.com/p/google-perftools/issues/detail?id=182

In our experience, (4) is often the reason for discrepancies with top.
Occassionally, you'll also see discrepancies due to internal fragmentation  
within
tcmalloc.

The way to diagnose these is to emit the output of
MallocExtension::instance()->GetStats() (from malloc_extension.h).  This  
will return
a lot of details about memory use, and should cover all the cases you're  
suggesting
counters for.  In any case, give it a try and see how well it works for you.

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
codesite-nore...@google.com  
View profile  
 More options Nov 2, 10:39 pm
From: codesite-nore...@google.com
Date: Tue, 03 Nov 2009 03:39:54 +0000
Local: Mon, Nov 2 2009 10:39 pm
Subject: Re: Issue 182 in google-perftools: pprof results are low compared with top
Updates:
        Labels: Type-Defect Priority-Medium

Comment #2 on issue 182 by csilvers: pprof results are low compared with top
http://code.google.com/p/google-perftools/issues/detail?id=182

(No comment was entered for this change.)

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mark Rabkin  
View profile  
 More options Nov 4, 2:19 pm
From: Mark Rabkin <mrab...@gmail.com>
Date: Wed, 4 Nov 2009 11:19:43 -0800
Local: Wed, Nov 4 2009 2:19 pm
Subject: Re: Issue 182 in google-perftools: pprof results are low compared with top

Craig,

We're getting a lot of situations in production where TCMalloc/pprof appears
to "leak", whereas if we link in another allocator, the memory usage does
not go up.  The "leak" rate appears to be something like 4-5 GB a day on our
server.

Unfortunately, for us, the MallocExtension::getStats() appear to be missing
GBs of data -- a typical situation is that it reports something like 1.9GB
used by heap, another 1.0-1.2GB used by pagecache; meanwhile, 'top' and
other tools report the VIRT and RSS to be >7.5GB.  Similarly,
getHeapSample() analyzed via pprof matches the getStats() and only shows the
1.9GB used.

Some analysis has shown that there are large mmap() blocks found in
/proc/####/maps that are not listed at all on the getStats() information.

I'm not sure if it's the same problem, but we've reproduced this on 4 or 5
binaries in production and the symptoms are always the same, and go away if
we switch to another malloc.

I think this may be the same problem as this ticket -- I can try to provide
more information.

This is the latest perftools with fc4 linux.

- Mark


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Craig Silverstein  
View profile  
 More options Nov 4, 7:34 pm
From: Craig Silverstein <csilv...@google.com>
Date: Wed, 04 Nov 2009 16:34:41 -0800
Local: Wed, Nov 4 2009 7:34 pm
Subject: Re: Issue 182 in google-perftools: pprof results are low compared with top

} We're getting a lot of situations in production where TCMalloc/pprof
} appears to "leak", whereas if we link in another allocator, the
} memory usage does not go up.  The "leak" rate appears to be
} something like 4-5 GB a day on our server.

That's disappointing to hear.  I'd like to figure out what's going on.

} Some analysis has shown that there are large mmap() blocks found in
} /proc/####/ maps that are not listed at all on the getStats()
} information.

These are not maps you made, I presume?  They're probably from
tcmalloc.

I would expect GetStats() to show this memory.  GetStats() has weird
behavior that the bigger the buffer you pass in, the more info it
gives you.  Maybe pass in a really big buffer (like 1M) and see if it
gives you more info that might describe where memory is going?

I know it's unlikely, but if you have a simple app that reproduces
this problem (even if it takes a long time to run), I'd love to take a
look at it.

craig


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google