I generate openvpn certificates with a keyboard emulator not a batch file and the problem is the time it takes to generate the DH Parameters file the time for this can be from 3 to 20 mins while this is going on I am deliving approx 140 keystrokes a second to fill out the certificates info and copy the files to a location on my hdd, my system eventually fills my enoumous keyboard data queue up (600 000 at the moment) and starts missing keystrokes causing errors in my system. This happens when the CPU usage of the other core hits 100%.
My system is XP SP3 running on a P4 3G HT
Below is the reg hack to increase the buffer size if you have a OS to Trash N Crash.
System Key: [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Kbdclass\Parameters]
Value Name: KeyboardDataQueueSize
Data Type: REG_DWORD (DWORD Value)
I am about to try is a Guest win 2000 install to see what is the biggest buffer is before it crashes.
I could just be asking to much from my system but its only another 140 interrupts a sec.
Does VirtualBox 4.2.12 use the host OS keyboard buffer settings or the Guest OS?
Keyboard buffer queue, Maximum size?
-
noteirak
- Site Moderator
- Posts: 5231
- Joined: 13. Jan 2012, 11:14
- Primary OS: Debian other
- VBox Version: OSE Debian
- Guest OSses: Debian, Win 2k8, Win 7
- Contact:
Re: Keyboard buffer queue, Maximum size?
Very very technical question for a very technical need - I would take this to the dev mailing list or directly browse the source code.
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
Manage your VirtualBox infrastructure the free way!
-
michaln
- Oracle Corporation
- Posts: 2973
- Joined: 19. Dec 2007, 15:45
- Primary OS: MS Windows 7
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Any and all
- Contact:
Re: Keyboard buffer queue, Maximum size?
That depends on how the data flows. If the host keyboard is involved then effectively both.mp3party wrote:Does VirtualBox 4.2.12 use the host OS keyboard buffer settings or the Guest OS?
From a design standpoint, feeding huge amounts of data through a keyboard controller quickly is a bad idea. There is zero flow control and the sending side has no feedback whatsoever. The queues do have limited sizes and there is no guarantee that keystrokes will be processed quickly.
Keyboard input mechanisms were designed for keyboard input with very low data rates and built-in error correction in the form of the human operating the keyboard. For other data transfer needs, there's Ethernet and the like
Re: Keyboard buffer queue, Maximum size?
I agree its a bad idea to feed large and fast data into the keyboard but since I have implemented some protocol to slow down my system the acuracy is 100% until the system gets overworked. Windows seems to poll the keyboard every .5 seconds to say send no data from what I can work out .michaln wrote:That depends on how the data flows. If the host keyboard is involved then effectively both.mp3party wrote:Does VirtualBox 4.2.12 use the host OS keyboard buffer settings or the Guest OS?
From a design standpoint, feeding huge amounts of data through a keyboard controller quickly is a bad idea. There is zero flow control and the sending side has no feedback whatsoever. The queues do have limited sizes and there is no guarantee that keystrokes will be processed quickly.
Keyboard input mechanisms were designed for keyboard input with very low data rates and built-in error correction in the form of the human operating the keyboard. For other data transfer needs, there's Ethernet and the like
Back in the day of a dual P3 700 server can handle about 1000 interupts a second was the limit from memory I think at idle it was below 200.
Maybe I need a faster computer?
Some time ago if I sent a short amount of typing to the keyboard port and I acheived over 4000 WPM but after finding the little time where you cant send anything it is greatly slowed down but is 100 % acurate until the buffers fill or the CPU gets overloaded.
Maybe I will have to experement my self assuming a 32 bit OS its in the range of 4 G for a keyboard buffer.
-
michaln
- Oracle Corporation
- Posts: 2973
- Joined: 19. Dec 2007, 15:45
- Primary OS: MS Windows 7
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Any and all
- Contact:
Re: Keyboard buffer queue, Maximum size?
I suspect that USB keyboards handle considerably slower data rates than PS/2 ones. With a normal USB keyboard, there's no way you're going to get 1000 interrupts (events) per second, more like 125. And while the USB HID protocol allows several key presses/releases to be reported at once, there is no guaranteed ordering, so... Again, keyboard interfaces are designed for keyboards driven by human fingers. Try hitting a key 50 times a second 
-
Smokingwheels
- Posts: 1
- Joined: 9. Jul 2012, 15:58
Re: Keyboard buffer queue, Maximum size?
You are right about the USB port.michaln wrote:I suspect that USB keyboards handle considerably slower data rates than PS/2 ones. With a normal USB keyboard, there's no way you're going to get 1000 interrupts (events) per second, more like 125. And while the USB HID protocol allows several key presses/releases to be reported at once, there is no guaranteed ordering, so... Again, keyboard interfaces are designed for keyboards driven by human fingers. Try hitting a key 50 times a second
I got my PS/2 to hit peak speed of 6000 WPM and the USB is barely 700 WPM.
I implemented slight protocol to pause when PC complains.