Forum / NoMachine for Linux / Troubleshooting performance problems
- This topic has 5 replies, 2 voices, and was last updated 5 years ago by fra81.
-
AuthorPosts
-
November 26, 2019 at 17:19 #24594DjebbZParticipant
Hello,
TLDR: I’m testing NoMachine between my Linux laptop (server) and my Android Smartphone (client) in a local network connected by Wifi, both devices in front of me so I can visualize performance and I notice poor performance in terms of framerate and latency.
Longer version:
My goal is to achieve good framerate (minimum 30 fps, if possible 60) with minimun latency to stream games from my laptop to my smartphone. The input will be done directly on the laptop (through a controller connected via Bluetooth or Wifi) so this is outside of the scope of NoMachine.
Linux laptop : i7-7700HQ 32GB Ram Nvidia GTX 1060 with 6GB of VRAM. Running up-to-date Arch linux with 5.3.13 kernel, Nvidia proprietary 440.36 drivers, NoMachine 6.8.1 and i3 4.17.
Android : Huawei P20-Pro running Android 9 and NoMachine 6.1.9From the smartphone using a terminal (Termux) running
ping
tells me that the ping is between 3ms and 20ms with an average of 10ms.My tests scenario :
1. playing a video (with VLC) on my laptop, and looking at my laptop and my smartphone at same time
2. selecting with my finger some text on a terminal from my smartphone and looking at both the laptop and the smartphone the delay of the interaction.Test 2 is very good in terms of input latency, it’s almost real-time. So I know that I don’t have any input lag (even if in the end it won’t matter for gaming). But the output on the smartphone has a delay of ~1s and poor framerate.
Test 1 is less good. There’s no input in this scenario, but there’s definitely a delay of playback and a poor framerate, that I would estimate to 15 fps, below the 24 fps of the video I’m playing.
I tried several Quality settings from the server, lowered the resolution up to 640×480 (!), tried VP8 and H264, tried enforcing the framerate at 60 fps, ticked the hardware acceleration option in the server settings. No luck so far.
I noticed something though. If I recall correctly NoMachine is supposed to use NVENC to encode the video, but while I’m streaming nvidia-smi doesn’t list NoMachine/nxserver in the list of applications using the GPU. So I suppose this explains at least the framerate, but maybe also the latency. Note that when using VLC to play the video, it explicitely says in the console “avcodec decoder: Using NVIDIA VDPAU Driver Shared Library 440.36 Tue Nov 12 08:08:10 UTC 2019 for hardware decoding”. And “ffmpeg -help encoder=h264_nvenc” explicitly shows a config flag of “–enable-nvenc”, so it seems that NVENC is properly configured on my machine, but I could be wrong.
I followed the procedure to reproduce the problem and collect the logs, find the server logs in the attachments.
Can someone help me troubleshoot my problem and solve it? Thanks in advance!
Attachments:
November 27, 2019 at 12:11 #24607fra81ModeratorHello,
since you intend to send events bypassing the NoMachine connection, please make sure you check the ‘Disable frame buffering on decoding’ option in Display settings from the in-session toolbar.
Then please collect also session statistics (open settings from the in-session toolbar, click on Connection, then click on ‘Take the statistics’) and check the CPU usage on the server machine.
November 27, 2019 at 16:48 #24609DjebbZParticipantI repeated my touch and VLC test and took the statistics. See attachment. I double checked, the “Disable frame buffering on decoding” was checked during this test, but also before during the test of my initial post. Same low fps, same big latency.
The CPU usage with
htop
shows ~72 processes of nxnode.bin, with 20 with the option “-H 5”. My eight cores are working and the top nxnode process uses between 90% and 120% of CPU. Overall CPU usage is 15-30% when I stream the video to my smartphone and 10-20% when I disconnect the client. nvidia-smi reports nothing related to NoMachine/nx{something} whereas it does report being used by VLC to play the video (pretty for hardware decoding).Thanks for your answer and for taking a look!
December 4, 2019 at 12:54 #24672fra81ModeratorHi,
H.264 is not used because the Android client currently lacks support for decoding it. This will be added in one of the next updates. Also hardware decoding will be added:
https://www.nomachine.com/FR12M02991
Still, this doesn’t seem to be enough to justify what you see, so please tell us more:
– What is the desktop environment (GNOME, KDE…) in use on the Arch server? Could you try a different one, possibly a lightweight one like Mate or Xfce?
– Can you try to connect from a different client (any Windows, Mac, Linux machine)?
– Are there other processes besides nxnode on top of the htop output? Would you attach a screenshot of that output here?
– Would you try to turn off the graphical output of the server, as explained in https://www.nomachine.com/AR03P00973, and check performance? In this case, without an X server running, NoMachine will run its own built-in X server, so we would be able to exclude another possible source of problems.
December 7, 2019 at 18:37 #24712DjebbZParticipant– What is the desktop environment (GNOME, KDE…) in use on the Arch server? Could you try a different one, possibly a lightweight one like Mate or Xfce?
i3, which is quite light already
– What is the desktop environment (GNOME, KDE…) in use on the Arch server? Could you try a different one, possibly a lightweight one like Mate or Xfce?
I don’t have other devices, so no.
– What is the desktop environment (GNOME, KDE…) in use on the Arch server? Could you try a different one, possibly a lightweight one like Mate or Xfce?
I re-tested with almost nothing running on my machine apart from Chromium with this page and nomachine linux app. A bit less laggy (slightly higher fps) but still too slow and too much input lag (>1s).
– Would you try to turn off the graphical output of the server, as explained in https://www.nomachine.com/AR03P00973, and check performance? In this case, without an X server running, NoMachine will run its own built-in X server, so we would be able to exclude another possible source of problems.
I exit i3 and went back into a tty. From there I made sure that the nxserver was running. But from my smartphone while I do see my laptop when I try to connect to it it tells me “Error is 113: No route to host”.
December 11, 2019 at 15:49 #24841fra81ModeratorI exit i3 and went back into a tty. From there I made sure that the nxserver was running. But from my smartphone while I do see my laptop when I try to connect to it it tells me “Error is 113: No route to host”.
It’s not clear to me what you did exactly. To make sure you effectively stopped the display manager, please run this command and tell the output:
systemctl status display-manager
Anyway “No route to host” is strange, it seems like the IP address is wrong. Are you inserting it manually?
In the logs you sent previously, I see that the resolution of physical display on the server is 3840×3040. Are there multiple monitors or is it only one with such a high resolution? Can you try to use only one monitor in the first case, or lower the screen resolution in the second, and check how this impacts performance?
-
AuthorPosts
Closed because the user did not provide further feedback. Please notify us if you confirm that it is resolved or open a new topic if you have the same problem.