SheepIt Renderfarm on Linux Server

Convert unused CPU time to future render time at night with Systemd and SheepIt

SheepIt Sheppy

SheepIt Advantages

It’s Open Source (mostly)! You can use it on Windows, Linux and Mac. It has an easy to use UI for beginners and comprehensive command line interface for more advanced users. It’s completely free and the community support, for example in the Blender Discord is very helpful and admins are active as well.

SheepIt Disadvantages

By it’s very design, SheepIt is a Blender-only rendering farm. You cannot use it to render project files of other projects. Secondly, your files will be distributed to untrusted 3rd-party computers and servers, which could, theoretically, scrape your content.

Running the client in command line

Download the client. You only need Java installed. Create an Account on the SheepIt-Renderfarm, go to your Settings and create a new render key, you can also login using your password instead of a token though.

Render-key generation in settings
SheepIt client command line

Setting up a systemd-unit

A systemd-unit will take care of starting the client for us and limit it’s resource-usage on the server. The options are in order of the example below:

  • We want the service to start after the network is available.
  • It’s a type simple, meaning the script starts and is not expected to return until it fails or is stopped.
  • We want it to run as a specified user, not root, which would be the default if no user is specified.
  • We want the unit to have a valid working directory, so the executed script may write caching-files. (You can also just set this to the home directory of the specified user if you want to be lazy.)
  • The start command is the absolute path to the executable script we just created.
  • We want to limit the memory usage to the value we set in the client’s parameter plus some buffer. If the client goes above this limit, systemd will kill any process associated, with an out-of-memory error (noted in the log as an OOM-kill).
  • We want to limit the CPU usage. 100% equals one logical core, I have 8 logical CPU-cores on my server and limit it to 600%, aka 6 logical cores.
  • The client already sets a “nice”-value of 19, but it doesn’t hurt also setting it here.
  • The client may still crash for some reason, but most notably this happens, because the SheepIt master server misjudged the memory usage and the process is terminated by the OOM-killer. For this reason we use Restart=Always, to always restart the service. We then use StartLimitBurst and RestartSec to set limits on how often and how fast the service should attempt to restart.
  • Finally we add a WantedBy=multiuser.target.multiuser-target to tell the systems to start this unit as part of the normal boot. (Or more precisely: The system wants to reach this target and to reach this target it tries to start all services, which are “wanted” by this target.)
Sheep It systemd service

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Yannik Schmidt

Python programmer at heart, Linux Expert at work, GameDev on my good days, web developer on the bad days.