Linux

Parent Previous Next


Executable file flag


Executables on Linux require a special "Executable flag".

If you have installed RR via Windows, it might be the case that this flag was not set on your fileserver.

In this case use the RR setup application and start it on any Linux machine. 

Browse to the RR folder and use the button "Apply executable rights only".



Which Linux version?


RR applications require GLIBCXX 3.4.15. 

(e.g. CentOS 7+, Ubuntu 16+).


GLIBCXX can be checked with one of these commandlines 

if you want to check the library versions supported by your distribution:
strings /usr/lib64/libstdc++.so.6 | grep GLIBCXX
strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCXX



See Dependencies for required libraries.

Which Linux Distribution?


Recommended distributions are all the "redhat-style" linux distros (same as most other 3D and comp software manufactures recommend).
Like CentOS (discontinued, but version 8 is still used)  or Rocky or Alma Linux.


Note Linux Mint: We had a report that dependency libxcb-xinput was not available. It is required for UI applications only.




You should read your render applications documentation for supported Linux distributions.

E.g. the Foundry recommended CentOS.


Maya 2020 had some limitations on Ubuntu, but they can be solved.

From the readme file for /usr/autodesk/maya2020/support/python/2.7.11:

To work around this, one can exchange the RHEL 6.x build of _hashlib.so with a version built on Ubuntu 14.04.4

Copy your unbuntu _hashlib.so and _ssl.so into /usr/autodesk/mayaxxxx/support/python/2.7.11/ and replace the Redhat/CentOS file.




Memory management


SWAP size


You do not want that your renderer uses SWAP for rendering, but you want that all other apps beside the renderer get into SWAP.


Especially the memory that apps have reserved, but never use.
Please close all apps that do not run when you render.
Open a terminal and execute 
cat /proc/meminfo

Find the line
Committed_AS:    3996124 kB

This is the minimum size for your SWAP that you should use.








OOM Killer (Out Of Memory Killer)


The Out Of Memory Killer is enabled by default now.
If the system detects that an application might want to/is about to use more memory that the system has, the application is killed by the OOM Killer.
BUT instead of killing just the render application (e.g. Maya) which tries to use 300GB of RAM, it kills Maya and all parent processes.
Which means the rrClient and the rrAutostartservice is killed as well.

The rrClient has a function build in to detect if the available memory is getting low (less than 400MB) and aborts the render application only.
But the OOM killer is often faster than the rrClient.

You may disable the OOM killer:


systemctl disable --now systemd-oomd

Verify that it is offline:
systemctl is-enabled systemd-oomd

Note that it might be restarted by other apps.
For that case you can mask the daemon:
systemctl mask systemd-oomd




Memory Overcommit



This is a Linux (...uhm....) feature.

Example how it works:
An application uses right now 5 GB and asks the OS to get for example 60GB of memory.
Your machine has 30GB left.
So theoretically, the OS should not grant your app this memory.
But because of some bad development practice in the past, the OS grants the application 60GB of RAM.
This kernel heuristically determines if the application will really use this amount of memory.
In this case: "It has used 5GB only so far, so I do not think that it will really increase that much and use these 60GB in the future"


Once the app tried to use more than your 30GB of available RAM, the app is killed by the OS.


This feature was implemented because many older Linux applications have been so badly programmed that they just request a huge amount of memory at start.
A huge amount the app might perhaps use in the future if the app is used at fully capacity on a larg server. 
It is called the "Linux Memory Overcommit" (e.g. http://www.etalabs.net/overcommit.html )



Therefore you should configure this feature right.

•Edit the file  /etc/sysctl.conf and add/change the lines
vm.overcommit_memory=2
vm.overcommit_ratio = 99

"overcommit_memory=2" means that an application gets RAM only if it is really available..

"99" means that all applications may use the total SWAP and up to 99% of your RAM.
Which means the kernel and other system apps gets at least 3% of your RAM (3% of 32GB are about 1 GB).
Of course this setting depends on the amount of RAM you have and the memory usage of your kernel.
(Using for example a setting of 150 would allow 50% overcommit again)



•At last, run the command 
sysctl -p




rrWorkstationInstaller Note: 
The rrWorkstationInstaller has an option to change the /etc/sysctl.conf  file for you.

A reboot or running "sysctl -p" is required afterwards.


Save memory



Of course you should remove the apps you do not use, but that use RAM.


Important:
If you have disabled the "Memory Overcommit", then you must not only take a look at the memory usage of an application, you should take a look at the committed size of an application as well.
Execute this command to show the apps that allocated the most memory.
Even if it is not used yet, Linux has reserved memory for the app. Either in SWAP or RAM.

ps -eo user,pid,%mem,vsz:8,rss:8,args --sort=-vsz | head -20 | cut -c1-160



RSS is the memory that is actually used.
VSZ is an indicator for the memory that was reserved for the app. (See Committed_AS in the section SWAP above).


Paste the result into e.g. Claude AI and ask it which apps you can disable/uninstall.


Example:
root       1175  0.1  1008764    18664 /usr/sbin/libvirtd
libvirtd uses 18MB of RAM. The indicator VSZ is 1GB. The real reserved (Committed_AS) size in this example was 0.5 GB.



Some collected recommendations:

App

Description

Deinstall instructions

/usr/sbin/libvirtd

Required if you start VMs inside this Linux system. 
Does not affect docker.
Does not matter if this Linux is a VM.

sudo systemctl stop libvirtd

sudo systemctl disable libvirtd

sudo systemctl stop libvirtd.socket libvirtd-ro.socket libvirtd-admin.socket libvirtd-tcp.socket libvirtd-tls.socket 2>/dev/null

sudo systemctl disable libvirtd.socket libvirtd-ro.socket libvirtd-admin.socket libvirtd-tcp.socket libvirtd-tls.socket 2>/dev/null

evolution-source-registry
evolution-calendar-factory
evolution-addressbook-factory
goa-daemon
gnome-shell-calendar-server

Used for Online Accounts, GNOME Calendar, Contacts and To Do.

To Verify if you use online accounts, start the system settings app with 
gnome-control-center online-accounts

sudo mkdir -p /root/disabled-dbus-services/evo

sudo mv -v /usr/share/dbus-1/services/org.gnome.OnlineAccounts.service /root/disabled-dbus-services/evo

sudo mv -v /usr/share/dbus-1/services/*evolution* /root/disabled-dbus-services/evo


reboot now

/usr/libexec/tracker-extract

/usr/libexec/tracker-miner-fs

/usr/libexec/tracker-miner-apps

/usr/libexec/tracker-miner-user-guides


Tracker is used for the file search in the Nautilus/FIles app.

sudo mkdir -p /root/disabled-tracker/dbus-services /root/disabled-tracker/autostart /root/disabled-tracker/systemd-user


sudo mv -v /usr/share/dbus-1/services/org.freedesktop.Tracker1*.service /root/disabled-tracker/dbus-services/


sudo mv -v /etc/xdg/autostart/tracker-*.desktop /root/disabled-tracker/autostart/


sudo mv -v /usr/lib/systemd/user/tracker-*.service /root/disabled-tracker/systemd-user/



Bash/CSH environment

You can change the shell interpretor that the rrClient should use in rrConfig, menu clients, per client.

By default it is set to BASH, older RR version had the default set to CSH.



If you want to dublicate your BASH environment for CSH, please add these commands to your \render_apps\_setenv\lx\_global.sh


bash$ env > /tmp/bash.env

csh$ env /tmp/bash.env



Error:  qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.


If you get this error message, then the libxcb packages are probably not installed.
(E.g. on Ubuntu 20)

You can verify that the libs are missing by executing the commandline
ldd [RR]/bin/lx64/platforms/libqxcb.so 


It should state:

libxcb-xinerama.so.0 => not found

libxcb-xinput.so.0 => not found




Daemon terminal commands

Please use the default Linux commands to control the daemon/service if required:


systemctl is-enabled rrAutostartservice.service

systemctl status rrAutostartservice.service

systemctl start rrAutostartservice.service

systemctl restart rrAutostartservice.service

systemctl stop  rrAutostartservice.service

systemctl enable rrAutostartservice.service

systemctl disable rrAutostartservice.service



 Mount Fileserver shares


You have 2 options to mount your file shares:

1) You tell the rrClient to mount shares.

Please open rrConfig, tab "paths and drives" and add your fileserver share.


2) You let the system mount all shares via fstab.

Please see next section.




 Mount Samba Share


If your RR files are on a samba or windows fileserver, then you have to mount the fileserver share to a local directory.


1.Create a mount point/directory, for example create the folder /mnt/RoyalRender.

2.Test to mount the share via commandline


3.Edit the file /etc/fstab, add a line:
//192.168.0.15/RRShare /mnt/RoyalRender cifs username=myShareUser,password=myPassword,noperm,uid=myRRUser,gid=users,file_mode=0777,dir_mode=0777,vers=3.0 0 0
You have to replace some variables to match your environment:

//192.168.0.15/RRShare

Set this to the fileserver IP and share name.

myShareUser,myPassword

Add a user that is able to access the fileserver.

You do not need to have this user on linux, the user+password is send to the server. 

myRRUser

The user you use for running RoyalRender.


Important: Do not forget an empty line at the end of the fstab file!!

4.After you have edited the file, execute the command
mount -a
If there is any problem with the fstab, it will be printed.



XSAN:

One customer had to add more flags to connect to a XSAN server, his fstab setting was:

//10.0.100.200/media/ cifs credentials=/home/parallels /.smbcredentials,noperm,iocharset=utf8,uid=thankyou,thankyouall,file_mode=0777,dir_mode=0777,nounix,noserverinfo,sec=ntlmssp 0 0




Newer Windows fileserver:

You might need to add ntlmssp for Windows 10/11:

//192.168.0.15/RRShare /mnt/RRender cifs username=myShareUser,password=myPassword,noperm,uid=myRRUser,gid=users,file_mode=0777,dir_mode=0777,vers=3.0,sec=ntlmssp  0 0





Docker (rrAutostartService replacement)

You should always try to use the rrAutostart deamon as it watches over the execution of the rrClient/rrServer all the time.

If you really need to use Docker instead of a local deamon to run the RR applications, 

then you have to create a Docker config file for RoyalRender.



Initlialize 


RR should not run as root, so you need to create a user:

RUN useradd -m -s /bin/bash renderUser


The rrClient requires to write onto a local cache folder:

RUN mkdir -p /usr/local/RR_localdata/

RUN chmod -R 777 /usr/local/RR_localdata/



RR runs on most Linux distributions without the requirement to install any additional library packages.
Please see Linux/Dependencies for more information.
If your OS is missing some library packages, then you have to install them as well with 

RUN yum -y install   packageX packageY packageZ



Start rrClientconsole


Please use this commandline to start the rrClientconsole (Replace "RR" with the path to your RR installation):

CMD ["RR/bin/lx64/rrStartLocal", "rrClientconsole", "-service"]


If you want to change the UMask for the process to 0002, please add "-umask 0002" (see next help section about UMask)

CMD ["RR/bin/lx64/rrStartLocal", "-umask",  "0002", "rrClientconsole", "-service"]


If the docker is running as root and you want to change the user that starts the rrClientconsole, please add "-switchUser renderUser"

CMD ["RR/bin/lx64/rrStartLocal", "-switchUser",  "renderUser", "rrClientconsole", "-service"]




Nothing else is required. 

The above command does not require any files to be installed into the docker image.

rrStartLocal caches the rrClient app locally in /tmp. This way you always use the latest RR version from your network share.


Folder/File access rights


UMask



On Linux, it is sometimes more complicated with the access rights of the output frames and folders if they are created by RR.

There is the UMask which can be set 

•in the mount commandline (file_mode=0777,dir_mode=0777)  

•or  for a user/application in its environment (~/.bashrc).

•And you can override the UMask for the rrClient when you install the daemon via rrWorkstationInstaller.



Royal Render folders



There is a setting in rrConfig, tab "Other" to tell RR to set Read+Write+Browse (777) permissions on these folders:
[RR]/ rrJobData/   
[RR]/ sub/ stats/  

[RR]/ _debugInfo/




Job output folders and files


First, it depends on the application that creates the folder.

a) Submission

If they do not exist, then there is the rrSubmitter that creates the main and all AOV/framebuffer/channel output folders. (Only known AOV folders as shown in the job info )


In addition, the rrSubmitter supports two commandline flags and a config option

•-NoOutFolderCreation:      Does not create folders at submission

•-SetOutFolderUserRights:  Sets 777 on folders (read+write+browse)

•rrConfig, tab Other:  Same option as commandline -SetOutFolderUserRight via a checkbox.


If you do not use any flag, then the output folder is created with this UMask:

•if it was set: mount option on the artists machine

•otherwise the artists environment setting



b) Job queue receive/job check

•The rrServer creates the main output folder if it does not exist (any more).

Please see "c) Rendering" for more information about the UMask.



c) Rendering
It is possible that either the rrClient or the render application creates folders and files

With job option "Local Render Out" enabled:

•The rrClient creates output files and additional AOV folders that do not exist (but not the main output folder).

Without job option "Local Render Out":

•The render application creates output files and additional AOV folders that do not exist.





Now it depends on how you start the RR applications (which is inherited to the render application)


Application mode:

If you have started the rrServer or rrClient in application mode, then output files and folder are created with this UMask:

•if it was set:  mount option on the machine

•otherwise the current users environment setting


Service mode:

If you have started rrServer or rrClient in service mode (should be default for a permanent installation), then output files and folder are created with this UMask:

•if it was set:  mount option on the machine

•if it was set:  otherwise UMask override of the RR service/daemon (change via rrWorkstationInstaller) 

•otherwise the system default