Synergy-core: Bad performance with devices with high poll rates

Created on 16 May 2017  路  16Comments  路  Source: symless/synergy-core

Operating Systems

Server: Windows 10 Professional 1703
Client: macOS Sierra 10.12.4 (Mac Mini 2014)

Not tested, but I've experienced it on these clients as well:
Client: macOS Sierra 10.12.4 (MacBook Pro 2011)
Client: Windows 10 Professional 1703

Synergy Version

1.8.8-stable-25a8cb2
1.8.8

Steps to reproduce bug

I adjusted the polling rate on various USB devices to note dramatically improved/reduced responsiveness within Synergy (depending on system load: moving the cursor to the edge of your screen may range from just hiccuping a little on the edge to straight up eating your cursor as you watch it play snake on the client monitor dancing around the edges until you finally get it back. I usually just move my mouse rapidly at that point until the client forcefully DCs: didn't check if it crashed or just reset the connection).

  • With the lowest polling rate (125Hz) sometimes the issues would be virtually impossible to produce unless system load was extremely poor.
  • Just increasing it to 250Hz reliably creates some hitching and delays even with no system load.

I observed nearly 13KB/s of network traffic & 10-15% CPU (80-120% if you think that way ^.~) at 1000Hz (note I should've been observing packets, but I'm not used to doing that from Windows), while staying just shy of 2KB/s & 0-2% CPU at 125Hz. Limiting this to 60Hz (most monitors) might work, but I'd assume people would want to fine tune this based on their computer's performance? The data rate isn't the genuine problem here (I think), it's just an observation. Unless the MTU of those packets is always 1518/1522 in which case you'd be pushing roughly 1.45MB/s instead of 13KB/s.

Turning SSL on and off had no visible impact on this performance.

Other info

While most settings don't immediately impact performance noticeably, the difference is especially noticeable when having higher load on the server. (Loads of 10-20% make the switching delay noticeable, whereas loads of 20-40% make the cursor movement lag noticeable, and 40-80% can cause it to fall behind infinitely until it just reconnects; which is not something I'd expect at such low load when other apps apparently seem fine).

Unfortunately, I know that high polling rates are supposed to do just that: poll frequently. But with something like Synergy, there's not much point providing that same level up updates to a client, so it shouldn't use the source (USB) port's rate; should work more like a video game 20-200ish ticks/second (perhaps configurable). I'm not sure if this would solve the problem because everything reported is of course just observation.

Other bugs (e.g. the snapping cursor to center #5992) on the creators update seem to be heavily influenced by this bug; the cursor sometimes won't even leave the server no matter how fast you push because small movements in the mouse probably trigger the "move-back" mechanism before whatever lock is up on the cursor thread.

I've personally been waiting to post this because I couldn't determine if it was just my PC having chronic issues or if it was Synergy or some mix. I unfortunately don't have more devices I can readily configure with different polling rates to see if keyboards/etc at the moment to see if unrelated devices have an impact.

enhancement

All 16 comments

Small snippets reproducing one of the issues (most the screen switch portion)
client.txt
server.txt

Hi,

Can you explain your device for tweaking your USB poll rate? I assume what is happening here is we're getting a high message rate from Windows, which Synergy will simply transfer 1:1 over the network.

Even so, 1000 packets/second over TCP is basically nothing. I imagine this is something we can fix with a touch of profiling.

The motivation is mostly gaming. My monitor's refresh rate is actually 144Hz and I have another at 250Hz. Using a mouse at a lower refresh rate would actually waste frames, both in terms of latency and being able to see them. There's also an obvious visual difference when using a mouse at 125Hz vs 250Hz (on a 250Hz monitor). In addition to that, some gaming peripherals come with easy-to-select/turbo/gaming mode that automatically up the poll rate or just come default with a higher poll rate.

Due to the way Synergy seems to handle mousing, this difference is also very noticeable when Synergy is running w/high polling USB devices and gaming. Moving the mouse can cause serious framerate issues.

It's a very minor issue now that I'm aware of what the problem is, but for years I just "set it and forget it" on my drivers.

Oh, sorry: I thought you wrote motivation. Apologies: I used the Logitech Gaming Software/Razer Synapse

The real improvement was noticed with tweaking my mouse's poll rate.

I can't do much with Razer Synapse right now as any device that had a poll rate option somewhere in there is now dead or gone (I noticed that the stuttering was entirely gone @ 10% CPU when my Razer Blackwidow Ultimate finally died and I replaced it with this Logitech).

I actually meant motivation, so that worked out better than expected ;)

I'm also having this lag issue on my client machine (Red Hat Linux) since about a week ago. Server is WIN10 which may have been auto-WIN-updated recently (I keep deferring but unsure if it applied updates upon reboot). I have tried making synergy tasks high priority to no avail. I now have the latest 1.8.8 on both client and server and it's still happening.

The lag would basically freeze the mouse in place for a couple seconds at a time, and even typing would lag, repeating whatever letter multiple times as if I held it down, so it's not just the mouse.

I am using a Logitech mouse without the setpoint software so I'm unsure how to alter the polling rate without it in WIN10. But this had been all fine for many months before so I question why this is happening now.

Also, this should be labeled a bug rather than an enhancement. It's basically unusable at the moment, lagging a few times a minute.

Update: I just switched from Ethernet where I am having this problem, over to WiFi and it's actually better. While it's not entirely smooth (as expected with WiFi), at least there is not a complete pause for seconds at a time like on Ethernet. Unexpected but that's what I'm seeing.

4911 Relates to this, also haveing the same problem. It works with 500 for my over 5Ghz wifi.

I have the same setup as @rh71el2 and Synergy is basically unusable for me over wifi or otherwise.
Some more notes:
-RHEL client is connected to a VPN, Windows server is not
-Changing device polling does not help
-Changing logging settings does not help

Scenario: Two systems configured. Client PC is powered off. Server PC is running Windows 10.

I have a game open (H1Z1: King of the Kill) and notice my framerate drops from 120 to 70 whenever I drag my mouse.

After stopping Synergy my framerate remains at 120 while dragging the mouse.

I have a polling rate issue also with synergy:

Mouse: Logitech G500 with up to 1000 polling rate.
PCs: Desktop with an i5 4.5Ghz CPU and tablet with an atom 1.6Ghz CPU, both quad cores no Hyper Threading and both with the latest Windows 10 x64.

I found it was more of an issue of CPU usage than WiFi vs Ethernet. 1000 polling rate does work slightly better when I use the tablet with USB3 Ethernet. The tablet reaches 80% CPU usage when I share a 1000 polling rate mouse, so it's unusable for anything else. This usage is split among synergy-core.exe, synergy-service.exe and System interrupts.

When I switchover to WiFi, the CPU usage gets up to 90%. The mouse doesn't lag, but only with nothing else running. Also on WiFi, I get 15% CPU usage at 125 polling rate, 33% at 250 and 55% at 500. The tablet's idle CPU usage is about 5%, by the way

On the host side of things, I see a ~10% CPU usage delta when sharing my mouse at 1000 polling rate, but it's unnoticeable at 125.

Also noteworthy, DPI doesn't change the CPU usage noticeably.

So, I can't really recommend Synergy at this stage to anyone with a gaming mouse unless they can take the performance hit on all their PCs or are willing to take down their polling rate. 125 is atrocious and while 500 is ok, it still impacts performance.

I have this issue too. Terrible performance with a high polling rate.

I also have this issue. The mouse is extremely jittery and unusable. Also I have different sensitivities for each direction (the mouse is naturally more sensitive moving up and left.)

I'm using 1.10 and this still seems to be an issue. Have to reduce polling rate to 250, otherwise, it causes a lot of stutter.

Using 1.11 in 2020 and this is still an issue. Windows 10 host => Windows 10 client, a 1000Hz polling mouse was generating over 60KB/s traffic when moving, and causing serious stutters when dragging application windows.

I'm a game developer and this issue actually makes it really hard to use synergy when debugging network issues - I have to put my polling rate down as low as it goes and set the in-game sensitivity extremely low too, which means I don't catch any bugs that repro with a high poll rate in my game. I'd love to see this fixed.

A high poll rate also drastically worsens other issues, like the mouse being bounced back to the server when switching to client.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bigbear3001 picture bigbear3001  路  4Comments

jasonosei picture jasonosei  路  3Comments

LeTink picture LeTink  路  4Comments

xmstspider picture xmstspider  路  4Comments

jenelcohen picture jenelcohen  路  4Comments