[GH-ISSUE #208] High server CPU usage during cursor movement on client #171

Closed
opened 2026-05-05 05:29:27 -06:00 by gitea-mirror · 5 comments
Owner

Originally created by @ugtar on GitHub (Dec 24, 2018).
Original GitHub issue: https://github.com/debauchee/barrier/issues/208

Operating Systems

Server: Ubuntu 18.04.1 (dell xps 13 9370 Intel® Core™ i7-8550U CPU @ 1.80GHz × 8, Intel® UHD Graphics 620 (Kabylake GT2), Gnome 3.28.2, 16 GB ram

Client: MacOS 10.13.6

Barrier Version

Linux server compiled from source:
v2.1.2-12-gea3e20ad

Mac client precompiled image: 2.1.0

Steps to reproduce bug

  1. Move the mouse cursor on the client

Other info

My baseline for comparison is synergy 1.8.8. Baseline cpu usage is negligible, cpu usage while sustained movement of the cursor on the client causes the synergy process on the server to climb to the 12-15% range

With barrier, again baseline cpu usage is negligible, however, sustained cursor movement on the client uses cpu in the 20-30% range with frequent spikes in the 50% up to 90% range

I would be glad to provide additional debug info if you tell me how to collect it.

Originally created by @ugtar on GitHub (Dec 24, 2018). Original GitHub issue: https://github.com/debauchee/barrier/issues/208 ### Operating Systems ### Server: Ubuntu 18.04.1 (dell xps 13 9370 Intel® Core™ i7-8550U CPU @ 1.80GHz × 8, Intel® UHD Graphics 620 (Kabylake GT2), Gnome 3.28.2, 16 GB ram Client: MacOS 10.13.6 ### Barrier Version ### Linux server compiled from source: v2.1.2-12-gea3e20ad Mac client precompiled image: 2.1.0 ### Steps to reproduce bug ### 1. Move the mouse cursor on the client ### Other info ### My baseline for comparison is synergy 1.8.8. Baseline cpu usage is negligible, cpu usage while sustained movement of the cursor on the client causes the synergy process on the server to climb to the 12-15% range With barrier, again baseline cpu usage is negligible, however, sustained cursor movement on the client uses cpu in the 20-30% range with frequent spikes in the 50% up to 90% range I would be glad to provide additional debug info if you tell me how to collect it.
gitea-mirror 2026-05-05 05:29:27 -06:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@ugtar commented on GitHub (Dec 25, 2018):

I'm trying to get more details, but it's difficult. I was loading a twitch stream in firefox on my mac client. I'm not sure what I did but the barrier process on the linux server was pegged at 100% for about 10 seconds.

Edit: I maximized the video window on the client, and barrier cpu usage went up to 100% and stayed there until i moved the mouse cursor. There is something else going on though because I have tried to reproduce this over and over and only succeeded one additional time.

<!-- gh-comment-id:449849909 --> @ugtar commented on GitHub (Dec 25, 2018): I'm trying to get more details, but it's difficult. I was loading a twitch stream in firefox on my mac client. I'm not sure what I did but the barrier process on the linux server was pegged at 100% for about 10 seconds. Edit: I maximized the video window on the client, and barrier cpu usage went up to 100% and stayed there until i moved the mouse cursor. There is something else going on though because I have tried to reproduce this over and over and only succeeded one additional time.
Author
Owner

@jwestfall69 commented on GitHub (Jan 1, 2019):

The 50-100% cpu issue should be fixed next version.

I also see the 20-30% server side when moving the mouse on the client. I perf'd the server (linux) and the bulk of the cpu usage appears to be caused by spectre mitigation in the kernel.

I'm curious if your 12-15% usage for synergy 1.8.8 was on the same kernel as the 20-30% you see for barrier?

<!-- gh-comment-id:450701061 --> @jwestfall69 commented on GitHub (Jan 1, 2019): The 50-100% cpu issue should be fixed next version. I also see the 20-30% server side when moving the mouse on the client. I perf'd the server (linux) and the bulk of the cpu usage appears to be caused by spectre mitigation in the kernel. I'm curious if your 12-15% usage for synergy 1.8.8 was on the same kernel as the 20-30% you see for barrier?
Author
Owner

@ugtar commented on GitHub (Jan 1, 2019):

These are running on the same kernel, though synergy was installed from an apt package, while barrier was compiled from master on this machine. Might that make a difference? I don't know what the compiler flags were for this synergy .deb but I suppose I could find out.

What tools do you use to measure performance? I could dig into this further.

<!-- gh-comment-id:450702048 --> @ugtar commented on GitHub (Jan 1, 2019): These are running on the same kernel, though synergy was installed from an apt package, while barrier was compiled from master on this machine. Might that make a difference? I don't know what the compiler flags were for this synergy .deb but I suppose I could find out. What tools do you use to measure performance? I could dig into this further.
Author
Owner

@jwestfall69 commented on GitHub (Jan 1, 2019):

I was using the perf command. I think in ubuntu its provided by linux-tools package.

# perf record -g -p <pid>

cause the cpu usage for a while then ctrl-c to stop perf, then look at the report

# perf report

<!-- gh-comment-id:450705056 --> @jwestfall69 commented on GitHub (Jan 1, 2019): I was using the perf command. I think in ubuntu its provided by linux-tools package. `# perf record -g -p <pid>` cause the cpu usage for a while then ctrl-c to stop perf, then look at the report `# perf report`
Author
Owner

@ugtar commented on GitHub (Dec 22, 2019):

i'm not seeing these spikes with the version I'm currently running (v2.3.2-26-gadb175df), so i'll go ahead and close this

<!-- gh-comment-id:568271771 --> @ugtar commented on GitHub (Dec 22, 2019): i'm not seeing these spikes with the version I'm currently running (v2.3.2-26-gadb175df), so i'll go ahead and close this
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/barrier#171
No description provided.