[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: Tor takes too much RAM



     On Sat, 21 Jul 2007 00:33:28 -0700 Ben Wilhelm <zorba-tor@xxxxxxxxxxxxx>
wrote:

>Here's some docs for you to look over, since you clearly don't know the 
>free command.
>
     Thanks.

>http://swoolley.org/man.cgi/1/free

     Ah.  So free(1) is a LINUX thing...
     
>http://rimuhosting.com/howto/memory.jsp (look at "interpreting free".)

...as is /proc/meminfo.
>
>Also, running it on a system and comparing the output to /proc/meminfo 
>can be enlightening. I find it gives a good overview of what the system 
>is doing - "top" might say "hey this program is using a lot of memory", 
>but "free" can tell you "this entire system is struggling" on the 
>commandline, which is occasionally much nicer than opening up top. I 

     Does LINUX have vmstat(8)?  Or swapinfo(8)/pstat(8)?  In any case,
it must have ps(1), which should give some sort of breakdown of what tor
is using.

>would have included top output except that I didn't think of posting to 
>the list before doing this, and I suspect that starting tor cleanly 
>would not have demonstrated the memory usage as well.
>
>Essentially, it's telling me that before I killed tor, I had 7m of 
>swapfile and 1.7m of RAM free. Deducting buffers and cache, I had a 
>whopping 10mb of RAM free. After I killed tor, that changed to 43mb of 

     So how was your system affected?  Was there heavy paging going on?
Or worse, swapping?  Those are what one would expect when there is a lot
of contention for the available page frames.

>swap and 57mb of main memory free, with 11m used by buffers and cache. 
>Note that the former was after I'd killed apache and mysql in an attempt 
>to have a usable command-line - I imagine it would have looked worse if 
>I hadn't already done that.
>
>So, essentially, tor was eating 90mb or so of RAM at that point. 
>Considering Olaf's hilarious 1.5gb example, I guess I was getting off 
>lightly.
>
     Yes, that did look like a pretty bad memory leak.  I'm running 0.1.2.14
on a FreeBSD 6.2-STABLE system and have yet to observe any such problem, so
I guess I've gotten off even easier.  Right now it's using ~33.5 MB, though
I've sometimes seen it using as much as ~47 MB.  I don't see it climb higher
than that, though, and those sizes don't cause a problem on a 1 GB system.
Right now, Xorg is using 190 MB virtual, but the working set is only 83.4 MB.
     Maybe some option is active in tor when it's compiled under LINUX that has
a memory leak bug.  If that option is not used under other operating systems,
then users of other systems wouldn't see the problem.  I know the memory
leak(s) in Firefox cause me a lot of grief.  Maybe it has been fixed in the
new version (0.1.2.15)?
     Best of luck with it.


                                  Scott Bennett, Comm. ASMELG, CFIAG
**********************************************************************
* Internet:       bennett at cs.niu.edu                              *
*--------------------------------------------------------------------*
* "A well regulated and disciplined militia, is at all times a good  *
* objection to the introduction of that bane of all free governments *
* -- a standing army."                                               *
*    -- Gov. John Hancock, New York Journal, 28 January 1790         *
**********************************************************************