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.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
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.