[tor-bugs] #11396 [Tor]: Detect maximum memory at runtime to allow lower default than 8GB

Tor Bug Tracker & Wiki blackhole at torproject.org
Fri Apr 4 08:45:50 UTC 2014


#11396: Detect maximum memory at runtime to allow lower default than 8GB
-----------------------------+---------------------------------------
     Reporter:  nickm        |      Owner:
         Type:  enhancement  |     Status:  needs_review
     Priority:  normal       |  Milestone:  Tor: 0.2.5.x-final
    Component:  Tor          |    Version:
   Resolution:               |   Keywords:  tor-relay oom 025-triaged
Actual Points:               |  Parent ID:
       Points:               |
-----------------------------+---------------------------------------

Comment (by andrea):

 Begin code review:

 7f36ab4bebd6b36622d30eb56a0816e869ba5db0:
  - I think the code for determining the memory size is correct, at least,
 but we should also test it on Windows and the *BSDs.
  - Slight concern about caching the value; it is possible for it to change
 at runtime [1] and the cached value never expires and there's no manual
 way to force a recheck here AFAICT.

 c2d2d53b4195077ce83bf18e165da3db9ef4be7c:
  - Does changing the value in options from options_validate() mean if we
 write out the config, we'll lose track of it having originally been
 unspecified and emit a computed value instead?
  - Should we support saying MaxMemInQueues <nn>% as well as MaxMemInQueues
 <n> GB perhaps?

 1a8299df65461ddde7034ff18ad2dfdbb6bf25ac:
  - Yes I like this version with CLOEXEC better :)

 End code review

 [1] Most typically in a VM, but systems with physically hotpluggable
 memory do exist.  Running into OOM conditions on a relay running in a VM
 and then growing its memory allocation seems like a perfectly ordinary and
 reasonable thing for a relay admin to do.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/11396#comment:4>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list