# Deciphering objects.log

**URL:** <https://www.ruby-forum.com/t/deciphering-objects-log/117088>\
**Category:** Mongrel\
**Created:** [October 12, 2007, 8:31pm UTC](https://www.ruby-forum.com/t/deciphering-objects-log/117088 "2007-10-12T20:31:07Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![carlos](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ecae2f/32.png) [@carlos](https://www.ruby-forum.com/u/carlos)\
**Post date:** [October 12, 2007, 8:31pm UTC](https://www.ruby-forum.com/t/deciphering-objects-log/117088/1 "2007-10-12T20:31:07Z")

</div>

Howdy – I’ve been tracking down mem leaks (oh, the fun…), and I think  
there is a clue in objects.log. There are a few mentions of this file,  
but  
usually Zed saying “look at this file and it will help you”. Can anyone  
clue  
me in to what the actual columns mean?

18,Float,143952,256821,112869,  
18,String,39543,41693,2150,24.727076,55.526376,2308.000000  
18,Array,3014,4232,1218,4.445888,23.633335,612.000000  
18,Proc,1699,1750,51,  
18,Regexp,1300,1310,10,  
18,Hash,691,730,39,8.008219,36.218131,519.000000  
18,Time,134,168,34,  
18,YAML::Syck::Scalar,60,108,48,  
18,Mongrel::Stats,44,57,13,  
18,MatchData,14,24,10,1.416667,1.138904,5.000000  
18,StringIO,9,12,3,166.833333,178.322401,408.000000  
19,Float,256821,107916,-148905,  
19,String,41693,39700,-1993,23.864257,52.626340,2308.000000  
19,Array,4232,3086,-1146,5.254051,27.529250,612.000000  
19,Proc,1750,1697,-53,  
19,Regexp,1310,1298,-12,  
19,Hash,730,702,-28,8.056980,36.770207,519.000000  
19,Time,168,122,-46,  
19,YAML::Syck::Scalar,108,46,-62,  
19,Mongrel::Stats,57,31,-26,  
19,MatchData,24,12,-12,1.333333,1.154701,5.000000

TIA,  
Carlos

---

<div class="post-metadata">

**Author:** ![carlos](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ecae2f/32.png) [@carlos](https://www.ruby-forum.com/u/carlos)\
**Post date:** [October 12, 2007, 8:39pm UTC](https://www.ruby-forum.com/t/deciphering-objects-log/117088/2 "2007-10-12T20:39:55Z")

</div>

I RTFCd and got this:

```
$objects_out.puts 

```

“run,classname,last,count,delta,lenmean,lensd,lenmax”

So,  
run: a serial number of the request  
classname: obvious  
last: number of object from previous run  
count: number of objects in this run  
delta: last - count  
lenmean: average length of object  
lensd: std deviation  
lenmax: largest-seen (or maybe largest-existing?) object of this class

Right?

---

<div class="post-metadata">

**Author:** ![carlos](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ecae2f/32.png) [@carlos](https://www.ruby-forum.com/u/carlos)\
**Post date:** [October 13, 2007, 4:43am UTC](https://www.ruby-forum.com/t/deciphering-objects-log/117088/3 "2007-10-13T04:43:03Z")

</div>

On Fri, 12 Oct 2007 11:39:20 -0700  
Carlos [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> lenmean: average length of object  
> lensd: std deviation  
> lenmax: largest-seen (or maybe largest-existing?) object of this class
> 
> Right?

Yep, except len(mean|sd|max) are used for objects that report a length,  
and that header should be created if the file is first created. You  
must have truncated it at some point.

How you use this file is you run a _sequential_ number of hits and do it  
in _production_ mode. When it’s done you load it into a spreadsheet or  
R or some Ruby and you look for the following:

1. Any class which seems to have a count who’s delta mean isn’t close to  
0 for all runs. A leak can actually be defined in a GC language as: any  
class who’s object count delta over time do not have a mean of 0.
2. Any class who’s average length or sd.dev length is gigantic  
(send\_file anyone?).
3. Any classes who have a mean of 0, but have a sd.dev that’s massive.  
This shows poor GC management since it’s a huge number of object being  
created and destroyed.
4. Any other column that for any class seems to be not like the others.

Also look at bleakhouse.

–  
Zed A. Shaw

- Hate: [http://savingtheinternetwithhate.com/](http://savingtheinternetwithhate.com/)
- Good: [http://www.zedshaw.com/](http://www.zedshaw.com/)
- Evil: [http://yearofevil.com/](http://yearofevil.com/)

---

<div class="post-metadata">

**Author:** ![carlos](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ecae2f/32.png) [@carlos](https://www.ruby-forum.com/u/carlos)\
**Post date:** [October 13, 2007, 5:52am UTC](https://www.ruby-forum.com/t/deciphering-objects-log/117088/4 "2007-10-13T05:52:37Z")

</div>

Bleakhouse isn’t as detailed as it could be, but it’s better than  
using Objectspace.

Zed, do you think we should remove the object.log? My guess is that it  
leads people astray as much as it helps.

Ara Howard has some good ideas in his leak checker “Dike”, but again,  
it uses Objectspace.

Evan

---

<div class="post-metadata">

**Author:** ![carlos](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ecae2f/32.png) [@carlos](https://www.ruby-forum.com/u/carlos)\
**Post date:** [October 13, 2007, 5:58am UTC](https://www.ruby-forum.com/t/deciphering-objects-log/117088/5 "2007-10-13T05:58:27Z")

</div>

On 10/13/07, Evan W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Bleakhouse isn’t as detailed as it could be, but it’s better than  
> using Objectspace.
> 
> Zed, do you think we should remove the object.log? My guess is that it  
> leads people astray as much as it helps.
> 
> Ara Howard has some good ideas in his leak checker “Dike”, but again,  
> it uses Objectspace.

Objectspace is like Heisenberg principle [1], you cannot touch it  
without altering the results.

Maybe Dike and Bleak could merge and get something more powerful? 😉

[1] [Uncertainty principle - Wikipedia](http://en.wikipedia.org/wiki/Uncertainty_principle)

## – Luis L. Multimedia systems

Leaders are made, they are not born. They are made by hard effort,  
which is the price which all of us must pay to achieve any goal that  
is worthwhile.  
Vince Lombardi

---

<div class="post-metadata">

**Author:** ![carlos](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ecae2f/32.png) [@carlos](https://www.ruby-forum.com/u/carlos)\
**Post date:** [October 14, 2007, 2:48am UTC](https://www.ruby-forum.com/t/deciphering-objects-log/117088/6 "2007-10-14T02:48:27Z")

</div>

On Fri, 12 Oct 2007 23:52:24 -0400  
“Evan W.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Zed, do you think we should remove the object.log? My guess is that it  
> leads people astray as much as it helps.

I don’t hear anyone complaining it leads them astray. I’ve used it to  
find plenty of leaks.

If you could improve it that’d be better than just removing it.

–  
Zed A. Shaw

- Hate: [http://savingtheinternetwithhate.com/](http://savingtheinternetwithhate.com/)
- Good: [http://www.zedshaw.com/](http://www.zedshaw.com/)
- Evil: [http://yearofevil.com/](http://yearofevil.com/)
