diff options
author | Nick Mathewson <nickm@torproject.org> | 2014-04-03 12:06:44 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-04-24 10:26:14 -0400 |
commit | 17ecd04fde2fd98b0cca3afb251b7173e22d3f42 (patch) | |
tree | 5e353b035c9506a47021c760b1dbe0a1b3ebafee /src/or/or.h | |
parent | aca05fc5c08d6296c4f93850a0256bfd96890b18 (diff) | |
download | tor-17ecd04fde2fd98b0cca3afb251b7173e22d3f42.tar.gz tor-17ecd04fde2fd98b0cca3afb251b7173e22d3f42.zip |
Change the logic for the default for MaxMemInQueues
If we can't detect the physical memory, the new default is 8 GB on
64-bit architectures, and 1 GB on 32-bit architectures.
If we *can* detect the physical memory, the new default is
CLAMP(256 MB, phys_mem * 0.75, MAX_DFLT)
where MAX_DFLT is 8 GB on 64-bit architectures and 2 GB on 32-bit
architectures.
You can still override the default by hand. The logic here is simply
trying to choose a lower default value on systems with less than 12 GB
of physical RAM.
Diffstat (limited to 'src/or/or.h')
-rw-r--r-- | src/or/or.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/or/or.h b/src/or/or.h index 38ab1767e0..fa5a3232a0 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -3474,7 +3474,10 @@ typedef struct { config_line_t *DirPort_lines; config_line_t *DNSPort_lines; /**< Ports to listen on for DNS requests. */ - uint64_t MaxMemInQueues; /**< If we have more memory than this allocated + /* MaxMemInQueues value as input by the user. We clean this up to be + * MaxMemInQueues. */ + uint64_t MaxMemInQueues_raw; + uint64_t MaxMemInQueues;/**< If we have more memory than this allocated * for queues and buffers, run the OOM handler */ /** @name port booleans |