V-REP on Ubuntu runs 2x slower than on Mac or Windows

Typically: "How do I... ", "How can I... " questions
Post Reply
symlee18
Posts: 2
Joined: 30 Nov 2018, 18:09

V-REP on Ubuntu runs 2x slower than on Mac or Windows

Post by symlee18 »

Hi, I'm observing that identical code runs with a real-time factor of 0.90 on a Mac Sierra and 0.41 on Ubuntu 16.04. I expected similar simulation speeds as both are high performance computers (Mac Pro with i5 4 cores 3.1 Ghz, and Dell with i7 8 cores 2.8 GHz). Would you know why this may be happening and how to increase the simulation speed on Ubuntu?

I've included links to relevant V-REP screenshots below and can also provide a link to the code if it would be helpful.

V-REP on Mac: https://www.pastepic.xyz/image/0fWrr
V-REP on Ubuntu: https://www.pastepic.xyz/image/0ftlw

I observed a real-time factor of around 0.90 on a Microsoft Surface Pro 4, i7 2017 as well.

coppelia
Site Admin
Posts: 7838
Joined: 14 Dec 2012, 00:25

Re: V-REP on Ubuntu runs 2x slower than on Mac or Windows

Post by coppelia »

Hello,

I suspect that rendering is the culprit. You can see the rendering time in the Window bar.

Cheers

symlee18
Posts: 2
Joined: 30 Nov 2018, 18:09

Re: V-REP on Ubuntu runs 2x slower than on Mac or Windows

Post by symlee18 »

I think you're right. When I use the embedded video recorder in V-REP, the simulation is recorded in real-time (which is much faster than the simulation time which is slowed down by rendering).

I've tried following the suggestions found here viewtopic.php?t=19 and turned off vsync (by editing /etc/X11/xorg.conf on Ubuntu) and experimented with the useGlFinish, vsync, and debugOpenGl parameters in V-REP's usrset.txt. I've also tried to tuning my Intel graphics card by editing /etc/X11/xorg.conf to match the configuration suggested here: https://www.techzim.co.zw/2017/06/tunin ... ntu-16-04/.

Unfortunately, the slow rendering persists. a) Is there anything else that I can do to try and speed up the rendering?

And I've also tried running the simulation in headless mode on Ubuntu but it only seems to provide around a 15% reduction in simulation time, which is lower than I expected. b) Is there anything that you suggest I do to increase the simulation speed in headless mode apart from the suggestions posted here: viewtopic.php?f=9&t=2247?

coppelia
Site Admin
Posts: 7838
Joined: 14 Dec 2012, 00:25

Re: V-REP on Ubuntu runs 2x slower than on Mac or Windows

Post by coppelia »

Did you try to install a better driver for your graphic card?
The headless mode you are talking about is still generating vision sensor images, thus the small speed gain you see (you have 4 vision sensors in your scene from your screenshots). You could also try to play with the OpenGl settings such as offscreen context type, FBO type and/or VBO operation.

Cheers

auSMEAC
Posts: 1
Joined: 22 Apr 2020, 12:32

Re: V-REP on Ubuntu runs 2x slower than on Mac or Windows

Post by auSMEAC »

I am finding this is still a problem in the current version of CoppeliaSim. Version 4.0.0 rev 4, serialization version 22.

Although I have a reasonable computer for todays day and age, (Intel i7, 32GbRAM, NVidia GTX 1050Ti) , and have done all of the above steps and can only just get a very basic simulation running at real-time in Linux, when I se the Simulation delta time dt=200ms, and the calculation mode to "Fast".
When I run the same thing in Windows, I have absolutely no problem achieving realtime even with complex scripts.

Due to the fact that only the Linux version of CoppeliaSim supports ROS, I see this is a very big problem, all of my systems and projects integrate through ROS in some way.

Is there any word from CoppeliaSim on if this is going to be improved in future editions?

coppelia
Site Admin
Posts: 7838
Joined: 14 Dec 2012, 00:25

Re: V-REP on Ubuntu runs 2x slower than on Mac or Windows

Post by coppelia »

Hello,

we cannot reproduce such a behaviour on our machines strangely. Can you identify which part of a simulation runs slower? Is is the physics engine? The rendering? Some other calculation modules?

Cheers

Post Reply