Can a video accelerator card improve non-fiction performance?

Asked

Viewed 739 times

9

To develop in Ruby on Rails, I use here a virtual machine of Virtualbox with Ubuntu Server 14.04 without graphical interface installed.

I recently discovered a configuration that dramatically improves VM performance:

  • Enable 3D video acceleration;
  • Increase video memory from ~8MB to 128MB.

After I changed only these two options, I got the impression that everything got about 5 times (!) faster: operating system boot, Rails test execution and even the performance of the same Rails applications.

It surprised me, because I always thought that 3D acceleration was only for graphic things like games, CAD tools, OS graphical interface, etc., but in VM I don’t use anything graphic.

The above event led me to doubt whether non-graphic processing can also benefit from 3D acceleration, and why it happens.

  • It would be so nice for people who understand the subject to answer

  • The question is good, but I believe it is decontextualized... or the goal can deny me?

  • 2

    I voted to reopen, as this is a matter of concern directly to the developer (and not only incidentally). It is a case where the greater understanding of the environment in which a system is being deployed allows a better use of its resources, with direct impact on its performance.

  • 2

    Yeah, I guess "Running the Rails test <-> got 5x faster" is quite relevant to programming.

  • The current operating systems themselves already use a lot of graphic acceleration, mainly the heavier interfaces

3 answers

9


Video operations are costly. Gamers who criticize breaking artifacts (tearing) the 60FPS have no idea of the complexity of the operations being carried out by the GPU.

But we are victims of this effect as well. We are so used to specialized visual content processing that we don’t realize that today’s Gpus are orders of magnitude faster than Cpus - 120 times (12,000%!) according to Nvidia, 16 times according to Intel. Even embedded Gpus (such as extra colors or individual processors) are faster for raster operations.

Depending on the implementation of the environment in a virtual machine, the function calls that would suffer offload for the GPU on a physical machine are interpreted by the CPU, in a process that is not optimized for speed.

These operations enter the same 'queue' of execution of the normal instructions, thus resulting in a considerable loss of performance.

When video acceleration is enabled you are allowing instructions for known 3D instrumentation interfaces (Opengl, Directx, etc.) to be used. Emulators can thus intercept these calls, and decide whether to pass on 3D operations to the native host or simply ignore them (when, for example, the VM is not being viewed.)

2

All you can see on the computer is graphic or use graphic.

What happens is that we divide the interfaces into "graphic" and "text". However, even old computers with text-mode systems use video cards.

Acceleration takes away from the processor the responsibility of handling the video, increasing its performance.

Although it is for Windows, I found an article on the subject with more technical details. It also talks about the rendering of texts.

Hardware Accelerating Everything

0

In a way yes, because for example a graphic activity that was previously stored the memory of the machine happens to be executed by the memory of the card, so this memory space of the machine would be available to perform another task.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.