transcribe the RelayMemory faq entry
Roger Dingledine

Roger Dingledine commited on 2010-02-24 06:59:32
Zeige 1 geänderte Dateien mit 49 Einfügungen und 0 Löschungen.

... ...
@@ -53,6 +53,7 @@ have a virus or spyware?</a></li>
53 53
 with abuse issues.</a></li>
54 54
 <li><a href="#RelayOrBridge">Should I be a normal relay or bridge
55 55
 relay?</a></li>
56
+<li><a href="#RelayMemory">Why is my Tor relay using so much memory?</a></li>
56 57
 <li><a href="#WhyNotNamed">Why is my Tor relay not named?</a></li>
57 58
 </ul>
58 59
 
... ...
@@ -742,7 +743,7 @@ or specified on the command line:
742 743
 </dl>
743 744
 <p>
744 745
 <em>We recommend you do not use these</em> 
746
+&mdash; they are intended for testing and may disappear in future versions. 
745 747
 You get the best security that Tor can provide when you leave the route selection to Tor; 
746 748
 overriding the entry / exit nodes can mess up your anonymity in ways we don't understand.
747 749
 </p>
... ...
@@ -751,7 +752,7 @@ The <tt>EntryNodes</tt> and <tt>ExitNodes</tt> config options are treated as a r
751 752
 meaning if the nodes are down or seem slow, Tor will still avoid them. 
752 753
 You can make the option mandatory by setting 
753 754
 <tt>StrictExitNodes 1</tt> or <tt>StrictEntryNodes 1</tt> 
755
+&mdash; but if you do, your Tor connections will stop working 
754 756
 if all of the nodes you have specified become unreachable. 
755 757
 See the <a href="https://www.torproject.org/documentation.html.en#NeatLinks">Tor status pages</a> 
756 758
 for some nodes you might pick.
... ...
@@ -899,6 +900,52 @@ a little bit of bandwidth, then flip a coin. Thanks for volunteering!
899 900
 
900 901
 <hr />
901 902
 
903
+<a id="RelayMemory"></a>
904
+<h3><a class="anchor" href="#RelayMemory">Why is my Tor relay using so
905
+much memory?</a></h3>
906
+
907
+<p>There are three reasons for this.
908
+</p>
909
+
910
+<p>The first is that Tor uses threads, so many of the measurements (such
911
+as the output of top or ps) are inaccurate: they add up all the library
912
+memory used by each thread, so the total "virtual" memory size will be
913
+much larger than the actual amount of ram Tor is using. So this isn't
914
+actually a problem &mdash; looking at the "resident" memory size instead should
915
+be much more accurate (unless you're swapping a lot). (Note that on <a
916
+href="https://wiki.torproject.org/noreply/TheOnionRouter/TorFAQ#RelayOS">OpenBSD,
917
+NetBSD, and old FreeBSD</a>, Tor uses a separate process for each thread,
918
+since threading is broken on these platforms, so in these cases it
919
+actually <i>is</i> using this much memory!)
920
+</p>
921
+
922
+<p>The second reason is that Tor relays really do use quite a bit of
923
+memory. Each connection that you hold open has a pair of memory buffers
924
+that it uses for reading and writing from the network, and when many
925
+connections are active at once, these buffers might grow quite large. We
926
+used to have them shrink again immediately once they weren't full, but we
927
+found that was using too much CPU &mdash; so now they stick around for a short
928
+amount of time in case we need to use them again soon after. It is not
929
+unusual for a fast exit relay to use several hundred megabytes of memory
930
+(i.e.: you need about 768 MB RAM for a 10 MBit connected dedicated exit
931
+node on Linux with Tor 0.1.2.14).
932
+</p>
933
+
934
+<p>The third reason is that we may have some bugs somewhere. They fall
935
+into the categories of "things we keep around in memory that are big
936
+and we should probably get rid of", and "actual memory leaks". We're
937
+working on these, but we'd love some help. We believe the 0.1.1.x stable
938
+release was pretty good about this, but 0.1.2.x and 0.2.0.x are so far
939
+quite bad. Please help!
940
+</p>
941
+
942
+<p>Many linux users have found that in the 0.2.0.x series, <tt>configure
943
+--enable-openbsd-malloc</tt> fixes many of the linux malloc fragmentation
944
+bugs.
945
+</p>
946
+
947
+<hr />
948
+
902 949
 <a id="WhyNotNamed"></a>
903 950
 <h3><a class="anchor" href="#WhyNotNamed">Why is my Tor relay not named?</a></h3>
904 951
 
905 952