-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Terrible refresh rate when a picture is viewed #1625
Comments
Also, the Xorg/xrdp/xrdp.conf is:
|
To add to this, I attempted removing xorgxrdp, and using tigervnc-server instead. The result is the same (I couldn't perceive any difference in performance), demonstrating that the issue is on the xrdp side of things. This short screen grab will show how slow response is scrolling a regular website: https://drive.google.com/file/d/1ZLaWAALs0nY29gAlYdI3EPivd7i8sIbB/view?usp=sharing You'll notice that once the page gets down to the real pictures the refresh rate really slows down. Presumably the compression fails to handle areas that are not just blocks of a single colour. What is also concerning is that everything appears to then queue up. If there are several screen refreshes lined up on the web browser, viewing the dock at the side of the screen doesn't show until the browser refreshes have completed, even though it should be instantaneous. Is this expected? |
Hi @philayres What you describe could be exacerbated by a high latency link and inadequate TCP buffer sizes. What are the ping times between your client and server? The
I believe the 'tb' value is approximately twice the actual window size - see If I set
I don't have the facilities here to try this on a high latency link but it might possibly help the situation. |
I really appreciate your help! I'm sure the ping times are high (I can't measure them due to a VPN and firewall in between), but it is transatlantic. I have tested RDP without the VPN and got the same result, so I have ruled that piece out. I tried your recommendation for Sadly no luck. I ran iftop and it looks like the best data rate I get is about 1.5Mbps with a lot of screen refreshing happening to try and stress it. Any other thoughts on how to get this tuned? Is there any option to reduce the quality / increase compression (without dropping to 8 bits per pixel)? Are you aware what the compression actually is (I'm assuming a PNG related thing to be lossless, but it would be good to know). |
Does xrdp support UDP transmission? I was looking at https://www.rdpsoft.com/blog/remote-desktop-protocol/rdp-udp-transport-azure/ and UDP does sound like it could make a huge difference on high latency links. Since more of us are working on home broadband connections, rather than nice fast business LAN/WAN links, this could become more important. |
Hi Phil, ping times would be useful to know at least so there's a chance to model what's going on with different TCP window sizes (see here for an example. Your IT guys should be able to give you a figure if you ask them nicely. You might also be going via a satellite link of course. Looking at your xrdp.ini, you've already got the compression variables turned on.so I don't think you can improve on that. Check the Looking at the code and the specs, XRDP supports the Microsoft Point-to-Point Compression (MPPC) Protocol described here. It's lossless compression. XRDP does not yet support UDP, although it has been requested and is documented by Microsoft. This is a huge amount of work however, so don't expect it soon. It looks like it needs a VPN or a corporate network to be useable however as it doesn't support any kind of encryption, or at least I can't see any in the spec. Off the top of my head there's a couple of things you might try, but these are a bit left-field:-
Sorry I can't be more helpful than that, but hopefully that will give you something to work with. |
Thanks for all the information you sent. That helped me understand things a little better. I'm surprised that bitmaps are RLE "compressed", admittedly within another compression wrapper. That explains why the performance is so bad as soon as an picture appears. I went through and opened up all the firewalls to get a ping through. We have a distributed workforce, so the pings will vary. The server is Viriginia, US (AWS east coast). I am London UK. I got an average ping of 90ms. This had to skip around the VPN, so add a very small amount for that. I did realise that I had been testing with a Linux RDP client, so the gradual sliding up of the page refresh was perhaps not normal. But on the regular PC RDC client although it doesn't slide up in the build, the performance is similar. I tried various network settings in the Experience tab, and they all achieved about the same result. The persistent bitmap cache was set. Hopefully US users will get a better experience, though some testers so far have complained about lag. They are coming from a VNC based system, so they like the crisp appearance of RDP and are used to lag but feel it might be worse. I certainly don't expect UDP to be magically developed, though it should definitely be a roadmap item I feel! I hadn't thought about the security of it, so if it happens in the future I'll have to ensure that I can tunnel UDP over the Wireguard VPN. I'm not permitted to run SSH on the servers, so unfortunately I can't test your SSH compression idea. I took a look at Guac yesterday. I'll have to see if I can test the docker version for easy deployment. Thanks for your help. I'm open to ideas for TCP Windows if you have any! |
Thanks for the ping values - it's useful data. Your 1.5Mbps sounds a bit low to me, so I had a quick re-read. I notice you've got Having it enabled is certainly consistent with your observation that changing the buffer size doesn't affect things. Can you try turning it off to see if that improves things? Sorry I missed it earlier. |
I have the same problem as @philayres, when I try to connect using my public ip the refresh rate is quite laggy, it improves a little changing max_bpp=24 to 128 and using xvnc instead Xorg, maybe it will help. |
Thanks for your input. For your information, the max_bpp value is used to limit the number of bits per pixel which the client requests as part of its connection negotiation. This is done with a TS_UD_CS_CORE data block. The maximum value here is 32, so you won't see anything significant happening for The Xvnc backend can work better than the Xorg backend under certain circumstances. It's certainly worth a try if it fits your use cases. Have you tried any of the things suggested in the conversation above? In particular, I'm quite keen on finding out if setting |
I tried If "no delay" means push the data to the networking stack immediately, that would leave the kernel in charge of things, right? So I can see how that would play into the Nagle algorithm. For small screen updates (a character being typed), Nagle would improve things, right? For large screen refreshes, it would presumably make no difference. I don't see how the combo of settings for these and TCP window sizes interact:
Nothing I changed seemed to make much difference to be honest. I'm obviously missing something. Perhaps my sessions weren't shutting down correctly with just I did quickly try the VNC / bpp=128 thing (which I'd seen elsewhere and made no sense to me), and it made no difference. Since that is all happening within the server, I'm not surprised. That just reinforces that the issue I'm seeing is related to slow transmission of the RDP, rather than pulling the virtual screen information. Any more input would be appreciated. Thanks! |
Thanks for the feedback. Nagle will clump up lots of small writes into a larger one, so can increase throughput at the expense of delay. If enabling it isn't helping your situation that's useful to know. This might sound strange, but you could try wiggling the mouse about while scrolling. This (I think) will increase the number of client to server messages and give the client more chances to ACK data. I'm not suggesting this as a solution by any means - it might help us understand what's going on if there's a difference. |
I tried the mouse wiggle. No change. Something that seems strange... rendering a patterned picture and I visibly see the refresh from bottom to top of the page (per my original screen grab). Have a mostly blank terminal window then position over that picture and there is a long delay until the refresh, then it happens really quickly. I can see that writing a pattern might be slow (RLE and all that) but I'm surprised that writing over the top of a pattern is slow, unless it is doing some kind of difference calculation from what is visible to what should be in place. This screen grab shows it: https://drive.google.com/file/d/1SMk4p1znEP-lPIheQbxe3HdpAOyU7yv4/view?usp=sharing Weird! |
I agree - 'weird' is a good description. The next obvious thing (I think) is to separate out XRDP and the WAN link to see what happens. That at least lets us see whether we're dealing with a software issue or something really odd regarding the network.
|
I didn't get a chance to play with Guac. It sounds like a big chunk of infrastructure, so I need to review it a little more. I can probably set up a VNC client. Does this mean switching over to Xvnc in the xrdp.ini? I still have the vncserver installed so hopefully it shouldn't be too much of a challenge. Let me know what you are thinking. |
Process is as follows. I haven't tested this, but it should be more or-less-there.
The VNC password is auto-generated by XRDP to prevent drive-by logins. You'll need to set it to something you know to connect to the VNC server. First locate the password file which is being used by the VNC server. You can either do this with To change the VNC passwd:-
You should then be able to connect direct to Xvnc from a client on a remote machine using the password you've specified. If you need to reconnect over RDP to the same session for comparison:-
I hope I've explained that clearly enough. Let me know if not. |
I'll try this early next week and get back to you. Thanks for the info. |
@philayres did you found any solution? |
I didn't try the suggestions for VNC yet. But it is almost certainly
related to latency, since most of my users are not complaining and are much
more local to the server. I hope to try the suggested VNC test soon.
…On Tue, Aug 11, 2020 at 10:05 PM Luis Carcamo ***@***.***> wrote:
@philayres <https://github.com/philayres> did you found any solution?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1625 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACH7WSOPINKIQA6TBGHT6LSAGXDHANCNFSM4OME2Y3A>
.
--
*Phil Ayres - Consected LLC*
Email: *phil.ayres@consected.com <phil.ayres@consected.com>*
Phone and SMS: *+1-617-794-2330* | *+44 (0)7393 892 699*
Google Duo: search *+1 617-794-2330*
|
It is very slow, I hope it can become a better project |
Hi team, Firstly, a great many thanks for this project and the time you spent on it!!!! I encounter refreshing issues when I add a background with high definition images, when I use videos in Firefox, but it seems the lighter the window is the less I got those refreshing issues. To me compression or internal communication between two services would be the root cause. UDP would perhaps accelerate communication between client and RDP server but something is wrong between XRDP and XORG. I tried a lot of combination, with cyphering and without, bitmap ... 24 bits, ... This issue reminds me of all DIVX issues back in 1998 when you could see one image out of three and the video was not smooth. Something else, login authentication bugs sometimes. Furthermore, I wanted to use GNS3 and SSH is not possible for me ... I don't want to use Windows for this in regards to different internal network stack issues. Regards and thanks!! |
Changing It is still a little bit disturbing that this can lead up to 3.6MiB/s continuous thoughput when working in a website with an image background (Microsoft AD, Trello board, etc.). |
Hi @philayres My scenario is different, Ubuntu Desktop 20.04 VM running XRDP behind a pfSesne Firewall, being accessed over a VPN. Apologies if I am hijacking, I can delete and create a new issue. |
@jacqueshenning I don't think you are hijacking. Sounds like an extra data point for diagnosing the issue. Is it particularly bad for you with a textured background (or at least not block colours)? I wish I understood X better. It seems to me that an app that has a textured background seems to perform the run length encoding of layers above, whether the background was showing or was already overlaid. But that is just what it feels like to me, without any real understanding about the mechanics of X and the RDP encoding. |
I'm running Xrdp on a Centos 7 server (an EC2 instance with 30GB memory, 4 vCPUs and a good network). I have Xorgxrdp installed too.
When viewing plain backgrounds, such as the desktop background which is mostly a block colour, things draw over it reasonably quickly. A webpage with a white background like Github will load and scroll reasonably well (choppy, but bearable). But as soon as a picture (say a person's face) is to be drawn on the page, it takes up to 10 seconds to draw the whole webpage.
Similarly, if a desktop backgound has an image rather than block colour, opening even a small terminal window over it is horribly slow (many seconds).
I can understand that refresh rates aren't 60fps, but 6 frames a minute is appalling. It also seems strange that drawing a block of colour (easily compressed) over a textured image is slow. Could this be a caching issue?
Running htop in a full screen terminal for example, and I visibly see the page refresh from the bottom of the screen to the top over about 2-3 seconds.
There is nothing of any interest in xrpd.log or Xorg.0.log
The versions installed from the Centos EPEL library are:
xrdp.x86_64 1:0.9.13-2.el7
xorgxrdp.x86_64 0.2.13-1.el7
My xrdp.ini file:
The text was updated successfully, but these errors were encountered: