Assign program its own swap drive
About swapping
A USB stick does not work well for swapping. The hardware (memory cells) is slow, and sensitive to wear (the expected lifetime in number of write cycles is low compared to other hardware). An HDD or SSD is better, but if you need fairly fast processing, increased RAM is the solution.
Renice the Blender process(es)
If you want to use the computer for other tasks while rendering, you can renice Blender (a high niceness
value will give it low priority, so that other application programs will get priority to use the CPU and RAM).
The command line tool renice
can manage the niceness
between -20 and 19, where 19 is the 'nicest' value visavi the other tasks alias lowest priority. You need elevated permissions (use sudo
for text mode programs and sudo -H
for GUI programs) to decrease the niceness
. See
man renice
Users other than the superuser may only alter the priority of processes they own, and can only monotonically increase their 'nice value' (for security reasons) within the range 0 to 19, unless a nice resource limit is set (Linux 2.6.12 and higher). The superuser may alter the priority of any process and set the priority to any value in the range -20 to 19. Useful priorities are: 19 (the affected processes will run only when nothing else in the system wants to), 0 (the ``base'' scheduling priority), anything negative (to make things go very fast).
It may be more convenient to install and use htop
to increase the niceness
of your blender process(es),
sudo apt install htop
The screenshot shows how I have reniced the htop
process itself (from 0) to 5.
Select process (in your case Blender process)
Renice to a suitable value in the range 0–19
The current niceness is shown in the 'NI' column