View Full Version : Mouse movement, polling rate, and CPU usage
vittau
02-24-2012, 07:53 PM
Hi everyone! :)
I've seen many reports of CPU usage spikes associated with mouse movement and polling rate on the Internet, but I can't find any conclusive information. Is it normal? Is it common?
I have an SteelSeries Sensei, and even using 250Hz polling rate, my CPU can spike as high as ~8% when I move the mouse. The processor is a Phenom X4 970 (3.5GHz), and OS is Windows 7 x64 Pro (everything is updated). Happens with or without SteelSeries Engine installed.
Thanks everyone. ;)
P.S.: My motherboard (ASUS M4A785TD-M Evo) does not have proprietary USB drivers available, it uses the default Win7 drivers. I have already tried changing USB ports.
P.S.2: Checked with Fraps (playing Stalker: Clear Sky), and the mouse movement didn't seem to interfere with the frames per second count. Maybe these CPU spikes doesn't actually mean anything?
EDIT: Tested with my old MS Basic Optical Mouse, and in my notebook (Win7 x64, i5 2nd gen), and the same thing happens. So I believe it's normal?
rotNdude
02-25-2012, 09:03 AM
That's a normal thing. The CPU is being used to decipher the information from the mouse and make the necessary calculations for frame information regarding cursor position.
vittau
02-25-2012, 11:41 AM
That's a normal thing. The CPU is being used to decipher the information from the mouse and make the necessary calculations for frame information regarding cursor position.But still, shouldn't the mouse use less resources? Even 1000Hz is ridiculously slow compared to CPU cycles...
Though it probably has more to do with the Windows interface than with the mouse itself.
rotNdude
02-25-2012, 12:08 PM
The mouse is just like any other input device on the computer. The CPU is responding to hardware interrupts, the device sends the information, the CPU then reacts and calculates what needs to be done and the information then has to be sent to the output devices. It all takes time and that time is showing up as resource utilization for the CPU. There are often wait states that have to be processed while the bus or device responds to the inputs/outputs, so it can get very complicated.
Versteken
02-25-2012, 12:14 PM
But still, shouldn't the mouse use less resources? Even 1000Hz is ridiculously slow compared to CPU cycles...
Though it probably has more to do with the Windows interface than with the mouse itself.
If you're not having an actual problem as a result then no, there's nothing to worry about.
The mouse polling rate does not have anything directly to do with the CPU's internal clock speed either.
vittau
02-25-2012, 12:49 PM
The mouse is just like any other input device on the computer. The CPU is responding to hardware interrupts, the device sends the information, the CPU then reacts and calculates what needs to be done and the information then has to be sent to the output devices. It all takes time and that time is showing up as resource utilization for the CPU. There are often wait states that have to be processed while the bus or device responds to the inputs/outputs, so it can get very complicated.I know all that (computer science undergraduate), but it still feels like too much work is being done just to handle the mouse movement.
The mouse polling rate does not have anything directly to do with the CPU's internal clock speed either.I didn't say that. :confused:
I just said that 1000Hz is orders of magnitude slower than the CPU, so it shouldn't be any trouble.
borg_7_of_9
02-25-2012, 01:30 PM
I know all that (computer science undergraduate), but it still feels like too much work is being done just to handle the mouse movement.
I didn't say that. :confused:
I just said that 1000Hz is orders of magnitude slower than the CPU, so it shouldn't be any trouble.
Then you should know that computing is not parallel and there is a lot of other software, drivers and devices asking for cpu time, add in some latencies and thing's don't look so simple..
Switching between some 30 odd hardware devices, 50 Odd start-up programs ,100 odd services/drivers answering IRQ's, receiving data transmitting data all in some sort of order so that it work's and look's/feels smooth , if each of these asked for 1Khz of bandwidth you can see how fast it add's up..
Versteken
02-25-2012, 02:19 PM
I know all that (computer science undergraduate), but it still feels like too much work is being done just to handle the mouse movement.
But it isn't. Just because you don't understand it doesn't mean it's not working the way it should.
I didn't say that. :confused:
I just said that 1000Hz is orders of magnitude slower than the CPU, so it shouldn't be any trouble.
That's exactly what you said. Again, the mouse's polling rate has NOTHING directly to do with the CPU's clock speed.
you need to understand that irregardless of the CPU speed, standard mouse polling rates are 125Hz. That means the position of the mouse is checked every 8ms. That's pretty damn often.
Coincidentally, 8ms happens to be a very common pixel response time for many modern LCD monitor.s that actually makes it a very suitable polling rate as it should negate the possibility of input lag when using vsync.
But I'm getting off topic.
1000hz means you're making the system check the mouse EVERY 1ms!
That's about 8 times faster than it needs to be checked. Of course you're going to see an associated rise in CPU use as a result. It's not going to hurt the system in any way, and it probably shouldn't affect anything, but why are you surprised that if you tell the CPU to check the mouse more often that the CPU then becomes slightly more active?
Sounds to me like everything is happening exactly as expected. Plus, as Borg points out, the CPU is busy doing other things too. Even when your system seems to be idle, yes the system is ~relatively~ calm compared to when playing a game or whatever, but there's still quite a bit of stuff going on behind the scenes. The mouse isn't the only thing the CPU has to worry about.
And AGAIN, if you're not having an actual problem, THEN WHAT ARE YOU WORRIED ABOUT?
I'm not saying this to be mean but it's YOU that doesn't understand. Just because you don't understand it, does not mean it isn't working how it should be.
Fatimmortal
02-25-2012, 03:45 PM
My i5-2310 spikes to 24% when I swing my mouse across the screen, but that's just Firefox taking up the cycles. Though I have no idea why this is so.
rotNdude
02-25-2012, 03:59 PM
I know all that (computer science undergraduate), but it still feels like too much work is being done just to handle the mouse movement.
It's a big conspiracy that the CPU should have to control the workings of a PC. We should have mouse processors too! ;)
vittau
02-25-2012, 08:51 PM
[...]
First and foremost, there's no need to be so aggressive.
Maybe it's because you can't actually see other people directly on the Internet, it seems everyone becomes a badass all of a sudden... :rolleyes:
Anyway...
That's exactly what you said. Again, the mouse's polling rate has NOTHING directly to do with the CPU's clock speed.For the second, and last time, All I've said is that the magnitude of the times being considered here are very different, and the mouse should be, at first instance, a small load for a modern CPU. That's all. I know it's not THAT simple, but I believe it shouldn't be so hard to grasp what I meant to say.
Sounds to me like everything is happening exactly as expected. Plus, as Borg points out, the CPU is busy doing other things too. Even when your system seems to be idle, yes the system is ~relatively~ calm compared to when playing a game or whatever, but there's still quite a bit of stuff going on behind the scenes. The mouse isn't the only thing the CPU has to worry about.Sure, but I can clearly trace the spikes to mouse movement. 0~3% without mouse movement, 6~10% spikes with mouse movement.
And the funny thing is, if you search around, some people (mostly those using XP apparently), do not have these CPU spikes. So that's why I wonder if this explanation really is all there is to it...
And AGAIN, if you're not having an actual problem, THEN WHAT ARE YOU WORRIED ABOUT?The day I lose my curiosity is the day I die.
I'm not saying this to be mean but it's YOU that doesn't understand. Just because you don't understand it, does not mean it isn't working how it should be.Then please, politely, enlighten me, or leave.
You see, I'm not denying what you just said, in fact I understand and agree with everything. It's just a bit weird to me that it doesn't seem to happen to everyone, and what differs from OS to OS that causes such different behavior.
vittau
02-25-2012, 08:55 PM
My i5-2310 spikes to 24% when I swing my mouse across the screen, but that's just Firefox taking up the cycles. Though I have no idea why this is so.Yes, the CPU spikes seem to concentrate on the process in which the mouse is currently hovering above. Maybe the "culprit" is Windows' window manager?
Dezdem
03-21-2013, 07:37 AM
Is it possible to switch the high polled usb port only to 3 and 4 cores? [googletranslate]
rotNdude
03-21-2013, 10:00 AM
Is it possible to switch the high polled usb port only to 3 and 4 cores? [googletranslate]
Not that I'm aware of. I don't think there is a single service responsible for controlling what core the mouse is polled via the interrupt for the mouse.
http://msdn.microsoft.com/en-us/library/windows/desktop/ms685100(v=vs.85).aspx
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.