Page 1 of 1

USBHID Mouse performance bug?

Posted: Wed May 11, 2016 1:35 pm
by Rive
I dunno what is up with this, but I went from a USB wired mouse to a USB wireless (Microsoft 3500), and of course it was very sluggish, so I added the following to cmdline:

Code: Select all

usbhid.mousepoll=0
which fixed the issue.

But what I noticed Is that the mouse for some reason, severely impacted and degraded overall system performance (measured with linpack bench and validated sysbench) in both the current raspbian Jessie 4.1 and the newer 4.4.9.

I switched the mouse out again for the wired, and system performance improved.

So, is this a known issue? (or is it just me?)

Re: USBHID Mouse performance bug?

Posted: Wed May 11, 2016 1:57 pm
by Paeryn
Setting mousepoll to zero means it will use whatever polling interval the device requests. It could be that the wireless mouse is requesting a faster polling rate than the wired mouse which is going to increase the load on the CPU to keep reading at that speed. Normally if not set to anything it defaults to a 10ms interval, but it could be requesting anything up to 1ms.

Re: USBHID Mouse performance bug?

Posted: Wed May 11, 2016 10:45 pm
by Rive
Paeryn wrote:Setting mousepoll to zero means it will use whatever polling interval the device requests. It could be that the wireless mouse is requesting a faster polling rate than the wired mouse which is going to increase the load on the CPU to keep reading at that speed. Normally if not set to anything it defaults to a 10ms interval, but it could be requesting anything up to 1ms.
It doesn't seem to use much of the CPU/resources as far as I can tell, but it degrades performance, so I am thinking something isn't as it should be.

Re: USBHID Mouse performance bug?

Posted: Wed May 11, 2016 10:57 pm
by dom
With mousepoll=0 you get the default Linux behaviour, which with badly behaved devices can affect performance.
That's why we have changed it to avoid the performance impact by default, but that may cause sluggish mouse.

The options are:
sluggish mouse
Performance impact
Use a different mouse

Re: USBHID Mouse performance bug?

Posted: Wed May 11, 2016 10:59 pm
by Rive
dom wrote:With mousepoll=0 you get the default Linux behaviour, which with badly behaved devices can affect performance.
That's why we have changed it to avoid the performance impact by default, but that may cause sluggish mouse.

The options are:
sluggish mouse
Performance impact
Use a different mouse
So... it is the hardware. I have noticed it not behaving well (sluggish) in win7, so I switched out the mouse with the pi3. What a PITA.

I just couldn't believe it could cause such a significant performance impact.

Thanks.

Re: USBHID Mouse performance bug?

Posted: Thu Jul 07, 2016 10:06 pm
by jkohan
Are there any intermediate values that can allow balance between performance and system overloading ? What do usbhid.mousepool=N when "N" is not 0 ?
Thanks

Re: USBHID Mouse performance bug?

Posted: Fri Jul 08, 2016 9:54 am
by Paeryn
Mousepoll is the polling interval in ms. 0 sets it to what the mouse itself requests. The actual interval may be less (rounded down to the nearest power of 2).

Re: USBHID Mouse performance bug?

Posted: Fri Jul 08, 2016 10:00 am
by dom
jkohan wrote:Are there any intermediate values that can allow balance between performance and system overloading ? What do usbhid.mousepool=N when "N" is not 0 ?
Thanks
I believe the number is the interval in milliseconds to poll the mouse at. Zero is special meaning use the number the mouse requests (i.e. the original linux default).
The new default will be the higher of 16, or what the mouse reports.

You if you want to set a compromise value, I'd suggest trying 8, or 4.