Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
Trac
Trac
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar

GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

  • Legacy
  • TracTrac
  • Issues
  • #24501

Closed (moved)
Open
Opened Dec 03, 2017 by Roger Dingledine@arma

When we hit MaxMemInQueues, make the log message more quantitative

A relay operator on #tor shared these log lines, on a fast exit relay running with 1GByte of memory (so maxmeminqueues is 768MBytes):

Nov 30 03:13:52.000 [notice] We're low on memory.  Killing circuits with over-long queues. (This behavior is controlled by MaxMemInQueues.)
Nov 30 03:13:52.000 [notice] Removed 118288 bytes by killing 124 circuits; 0 circuits remain alive. Also killed 0 non-linked directory connections.
Nov 30 03:13:52.000 [notice] We're low on memory.  Killing circuits with over-long queues. (This behavior is controlled by MaxMemInQueues.)
Nov 30 03:13:52.000 [notice] Removed 25940496 bytes by killing 125 circuits; 0 circuits remain alive. Also killed 0 non-linked directory connections.
Nov 30 03:13:53.000 [notice] We're low on memory.  Killing circuits with over-long queues. (This behavior is controlled by MaxMemInQueues.)
Nov 30 03:13:53.000 [notice] Removed 528 bytes by killing 1 circuits; 0 circuits remain alive. Also killed 0 non-linked directory connections.
Nov 30 03:13:53.000 [notice] We're low on memory.  Killing circuits with over-long queues. (This behavior is controlled by MaxMemInQueues.)
Nov 30 03:13:53.000 [notice] Removed 528 bytes by killing 2 circuits; 0 circuits remain alive. Also killed 0 non-linked directory connections.
Nov 30 03:13:54.000 [notice] We're low on memory.  Killing circuits with over-long queues. (This behavior is controlled by MaxMemInQueues.)
Nov 30 03:13:54.000 [notice] Removed 528 bytes by killing 1 circuits; 0 circuits remain alive. Also killed 0 non-linked directory connections.
Nov 30 03:13:54.000 [notice] We're low on memory.  Killing circuits with over-long queues. (This behavior is controlled by MaxMemInQueues.)
Nov 30 03:13:54.000 [notice] Removed 528 bytes by killing 2 circuits; 0 circuits remain alive. Also killed 0 non-linked directory connections.

I notice in cell_queues_check_size() that we sum up four things to compute alloc:

  size_t alloc = cell_queues_get_total_allocation();
  alloc += buf_get_total_allocation();
  alloc += tor_compress_get_total_allocation();
  const size_t rend_cache_total = rend_cache_get_total_allocation();
  alloc += rend_cache_total;

For operators who are debugging their memory use, and for us poor people trying to help diagnose, it would seem smart for us to expose these four numbers when we say "We're low on memory".

(I thought about this idea in particular because of the tor_compress_get_total_allocation() call and #24368 (moved).)

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Tor: 0.3.3.x-final
Milestone
Tor: 0.3.3.x-final
Assign milestone
Time tracking
None
Due date
None
Reference: legacy/trac#24501