<div dir="ltr">I think the advice to create swap will get George kicked of VPS, as it goes right against the wishes of hosting company, and directly affects their hardware.<div><br></div><div>A better advice is to tune tor process to work within memory boundaries. The "<span style="color:rgb(33,33,33)">MaxMemInQueues 512 MB</span>" is right direction, but from personal experience, I don't think it goes "far" enough. Will need to be limited further I think, but you could adjust further based on your observations.</div><div><br></div><div>Seb</div><br><div class="gmail_quote"><div dir="ltr">On Sun, 28 Jan 2018 at 07:14 tor <<a href="mailto:tor@anondroid.com">tor@anondroid.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I think running on 1 GB of RAM with no swap is going to be difficult, especially if you have decent bandwidth and your node is busy.<br>
<br>
You can create a small swap file on the existing file-system like so:<br>
<br>
  sudo fallocate -l 1G /swapfile<br>
  sudo chmod 600 /swapfile<br>
  sudo mkswap /swapfile<br>
  sudo swapon /swapfile<br>
<br>
and to make permanent:<br>
<br>
  echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab<br>
<br>
The swap file won't get used often, but will prevent your relay from going OOM and crashing. You can further reduce the likelihood of the swap getting used by setting something like "vm.swappiness = 10" in /etc/sysctl.conf.<br>
<br>
Also these two entries in your torrc might help:<br>
<br>
  DisableOOSCheck 0<br>
  MaxMemInQueues 512 MB<br>
<br>
​The first line will enable the "out of sockets" check, and although it aggressively drops connections, tends to prevent the node from falling over instead. The second reduces the amount of memory used.<br>
<br>
_______________________________________________<br>
tor-relays mailing list<br>
<a href="mailto:tor-relays@lists.torproject.org" target="_blank">tor-relays@lists.torproject.org</a><br>
<a href="https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-relays" rel="noreferrer" target="_blank">https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-relays</a><br>
</blockquote></div></div>