Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xvfb multiple displays for parallel processing?

Curious about running multiple xvfb displays: I have between 10-50 instances of a script running in parallel that connect to an xvfb display. Is is advantageous to run the same number of xvfb displays and connect 1 to 1? Or can multiple processes share the same display? RAM is not an issue, neither is processing power.

like image 749
nathancahill Avatar asked Jun 11 '12 20:06

nathancahill


1 Answers

One Xvfb server should be able to handle lots of connections quite well. One thing you want to make sure you do is run the server with the -noreset option. Without it, it has a memory leak every time a client disconnects.

The only time multiple Xvfb servers is helpful is if you have more than one processor available in the machine (e.g. 8 cores) and your script is graphics-heavy. To see if this is the case, connect many instances of your script and check top to see what the CPU usage of Xvfb is. If it's at 100%, you might benefit from additional Xvfb instances.

like image 63
jterrace Avatar answered Oct 08 '22 14:10

jterrace