Performance differences between physical and virtual desktops

Forum / NoMachine Terminal Server Products / Performance differences between physical and virtual desktops

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #18439
    Xoltus
    Participant

    Hi all,

    today I started to evaluate different versions of NoMachine. I was happy to experience near perfect performance when using a physical display. However, when I switched to a terminal server using virtual displays, the performance dropped drastically such that clicks take 2 seconds to be recognized by the server. Also when typing text, it takes 2 seconds until it shows up.

    I simply installed the terminal server using dpkg -i and did not apply any changes to the configuration. My desktop environment is XFCE4; CPU and main memory are not saturated at all.

    Does anyone know if this can be fixed?

    Best, Lars

    #18454
    fra81
    Moderator

    Hi Lars,

    this is strange indeed. Xfce is a lightweight desktop that is known to work perfectly with NoMachine. Do you confirm that CPU usage is low not only for NoMachine processes but also for other system processes? And can you confirm that Xfce desktop is the one running also in the virtual session? (note: it wouldn’t be chosen normally by default)

    Did you check the CPU usage also on client side?

    Please tell us more about the distribution in use, so we can check it in our labs.

    And last, what is your graphics card? Did you install proprietary drivers?

    #18496
    Xoltus
    Participant

    I just double-checked and I can confirm that all cores idle between 2 and 5%, and also the main memory consumption is negligible. Further, XFCE is the only desktop installed which is also being started.

    This holds true for the Windows 7 client as well: Its CPUs idle while there is plenty main memory left.

    I use a ubuntu 16.04 server which is virtualized using KVM. According to lshw it is running the graphic driver qxl. But to be honest, I had never the need to manager graphic drivers on a server, hence, I just assume this is a standard setup.

    Maybe virtual sessions require a higher internet bandwidth. This  might actually cause the problem as the server is unfortunately connected to a weak uplink (and I cannot change it). Do you have any insights regarding the bandwidth requirements?

    However, the physical session is running perfectly fine, so the differences must be huge if the network is actually the cause (which really confuses me).

     

    #18502
    fra81
    Moderator

    Hi Lars,

    I don’t expect the virtual session to take more bandwidth, rather the contrary when using a lightweight desktop like Xfce, unless it is a matter of the applications running on it.

    Please take the NoMachine statistics from the NoMachine Player menu and attach them here or send to forum[at]nomachine[dot]com. You can find the ‘Take the statistics’ button in the Connection tab of the session menu.

    You can use this trick to take “partial” statistics while reproducing the problem:

    – click on ‘Take the statistics’ and discard the result (this will reset all counters);

    – operate inside the session with the slowness problem;

    – click on ‘Take the statistics’ again to get partial stats.

    #18531
    Xoltus
    Participant

    Hi,

    taking a look at the statistics is a very good idea. Thank you.

    I attached two files: the statistics for a virtual desktop and the statistics for a physical desktop where both were measured using the same client as well as the same server (I uninstalled the terminal server after I got the statistics and installed NoMachine for Linux afterwards). Further, both measurements present the same workflow where I perform a pre-defined task with the problematic application, and I used your trick to cut off the time to initialize the session.

    One of the first aspects I noticed was the total time of execution. While the virtual physical was running for 104,710 ms (idle) and 494 ms (running),  I only needed 26,045 ms (idle) and 101 ms (running) to perform the tasks when using the physical desktop which is roughly four times faster.

    While being connected, the physical desktop transferred 688,354 bytes (in) and 1,684,627 bytes (out); but the virtual desktop transferred 709,795,968 bytes (in), 10,296,814 bytes (out). I would expect a session running four times longer to transfer roughly four time more data, but to me it seems like the virtual session does not scale linearly. However, I need to admit, when experiencing a slower connection I tend to click more — so, the data could be noisy.

    To me, it looks like the compression of the physical desktop is much better. The corresponding server reports a ratio of  3.811:1 and the terminal server totals at 1.260:1.

    Please feel free to take a look at the logs attached below. Do you have further ideas how to approach this problem?

     

    Best, Lars

     

    #18560
    fra81
    Moderator

    Hi Lars,

    most data in virtual desktop is coming from images (#72 and #243 in the stats file), while other drawing operations don’t seem to contribute in a significant way, which is quite unexpected from a “lightweight” desktop. Physical desktop sessions can perform better in this specific case because used protocol is specifically optimized for multimedia content. Of course you can use the same protocol also in virtual desktop sessions, by simply unchecking the ‘Use X11 vector graphics mode in virtual sessions’ option in Server preferences -> Performance tab.

    Alternatively, you can try to disable the Composite extension in virtual desktop sessions. This could cause the Xfce desktop to fallback to a rendering backend that, I hope, will make less use of bitmaps. To try that, add the following line to the ‘/usr/NX/etc/node.cfg’  file:

    DisplayServerExtraOptions “-extension Composite”

     

    A final note about compression ratio: the 1.260:1 ratio you report only includes X11 protocol compression but without considering images compression, which is the biggest part here. The correct overall value that includes also image compression is reported here:

    overall: 709795968 bytes (693160 KB) in, 10296814 bytes (10055 KB) out.

    That is a compression ratio of about 69:1. Not bad. Problem is that the desktop produced as many as 3000 images in only 100 seconds…

    #18629
    Xoltus
    Participant

    Brilliant !

    Switching to the physical session’s protocol works like charm. Nonetheless, I will test disabling the Composite extension as well.

    Notwithstanding the above, are there some reasons why one should favor the virtual session’s protocol? If there aren’t any, I will just stick to the physical session’s protocol.

    I also added some users to the system to check the performance because they know the system’s applications better than I do. For this purpose, I installed the enterprise desktop evaluation but do I need to re-install the clients after I bought the fully licensed version of the terminal server?

    By the way, the documentation of NoMachine is impressive, I already solved many minor issues just by reading your documents.

    Best,
    Lars

    #18635
    fra81
    Moderator

    Notwithstanding the above, are there some reasons why one should favor the virtual session’s protocol? If there aren’t any, I will just stick to the physical session’s protocol.

    It depends strictly on the desktop environment and used applications. X11 vector graphics mode is incomparable better at compressing traditional X traffic, but modern desktops and applications make more and more use of graphical effects and multimedia content. If physical session’s protocol works better for you, you should definitely use it. You can find more info here:

    https://www.nomachine.com/AR01M00832

    For this purpose, I installed the enterprise desktop evaluation but do I need to re-install the clients after I bought the fully licensed version of the terminal server?

    You don’t have to reinstall clients. But be aware that the evaluation version doesn’t provide the library for H.264 software encoding. If your graphics card is not capable of H.264 hardware encoding, then you could not experience the best possible performance.

    https://www.nomachine.com/AR10K00706

Viewing 8 posts - 1 through 8 (of 8 total)

This topic was marked as solved, you can't post.