Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slow simulation on headless machine with xvfb #61

Closed
quantumiracle opened this issue Oct 18, 2019 · 7 comments
Closed

Slow simulation on headless machine with xvfb #61

quantumiracle opened this issue Oct 18, 2019 · 7 comments

Comments

@quantumiracle
Copy link

Hi Stephen,

I found that the speed of learning program with PyRep environments to be significantly lower on headless machine using 'xvfg-run' as you suggested, compared with running on PC with screen. (5-10 times slower)

Do you have any idea to speed it up? Thanks.

Best,
Zihan

@stepjam
Copy link
Owner

stepjam commented Oct 19, 2019

Hi Zihan,

Yes Xvfb does not use the gpu to render, which is probably why you are getting the slowdown (I should update the readme).
Try using TigerVNC instead for the virtual framebuffer.

Best,
Stephen

@quantumiracle
Copy link
Author

Thanks, Stephen!

@quantumiracle
Copy link
Author

Hi Stephen,

I've tried with using TigerVNC instead of Xvfb, but it seems the process is still slow. I compare the launching logs for headless mode on my PC and on server, there is only one difference about the 'Image' plugin saying:

Plugin 'Image': loading...
Error with plugin 'Image': load failed (could not load). The plugin probably couldn't load dependency libraries. For additional infos, modify the script 'libLoadErrorCheck.sh', run it and inspect the output.

which does not affect the program to successfully launch but may be the reason of the slow process.
I'm not sure if this is the reason, or I may not use tigervnc correctly. What I did was using a local client to display the virtual desktop of the server with tigervnc, and then run the script normally with python **.py. Do you have any idea on solving that?

Best regards,
Zihan

@stepjam
Copy link
Owner

stepjam commented Oct 31, 2019

Hi Zihan,

I'm currently away, so can't look in to this at the moment. Perhaps take a look at how CARLA (driving simulator) does this. Looks like they use turbovnc. See here:
https://github.com/carla-simulator/carla/blob/master/Docs/carla_headless.md
carla-simulator/carla#225

Let me know how you get on.

@stepjam
Copy link
Owner

stepjam commented Dec 14, 2019

Hi Zihan, were you able to get anywhere with this?

@quantumiracle
Copy link
Author

Hi Stephen,

Sorry I haven't noticed your reply before.

I didn't keep tracking this problem since last reply, but I managed to install the 'Image' package.

Recently I tested PyRep on the server again, and it seems there is no more problem regarding the speed of simulation (the server is still a little bit slower, but not that significant anymore, considering the different configurations of server and my PC, I would say there should be no problem). And I tested with both TigerVNC and 'xvfb-run', the speeds are similar.

I guess it may be caused by some package dependence problem (maybe I changed some packages version in later usage) or the server itself, but I don't know exactly what happened. But thanks for your patience and replies!

Best,
Zihan

@stepjam
Copy link
Owner

stepjam commented Jul 1, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants