Xvfb可以并行处理多个显示器吗? [英] Xvfb multiple displays for parallel processing?
问题描述
对运行多个xvfb显示器感到好奇:我有10-50个并行运行的脚本实例,这些实例连接到xvfb显示器.运行相同数量的xvfb显示器并以1对1连接是否有利?还是多个进程可以共享同一显示器? RAM不是问题,处理能力也不是问题.
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.
推荐答案
一个Xvfb服务器应该能够很好地处理许多连接.您要确保做的一件事是使用-noreset
选项运行服务器.没有它,每次客户端断开连接时都会发生内存泄漏.
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.
多个Xvfb服务器唯一有用的时间是,如果计算机中有多个处理器(例如8核),并且脚本中包含大量图形.若要查看是否是这种情况,请连接脚本的许多实例,然后检查top
以查看Xvfb的CPU使用率是多少.如果百分比为100%,您可能会从其他Xvfb实例中受益.
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.
这篇关于Xvfb可以并行处理多个显示器吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!