[visionegg] Re: Multi-core, maxpriority, and keyboard polling

  • From: Martin Spacek <visionegg@xxxxxxxxxxxxx>
  • To: visionegg@xxxxxxxxxxxxx
  • Date: Mon, 14 May 2007 16:55:28 -0700


That's what I wanted to hear! I just tested it out and can confirm the same on our Intel Duo Core 2 in WinXP: I've set visionegg's process priority to REALTIME and thread priority to TIME_CRITICAL, I'm getting very reliable timing histograms, and keyboard and mouse are still functional, all without having to set CPU affinity.

Just as a note, our system came with a PCI-Express Nvidia 7600 GS card. I wasn't sure if going to a new card on a new interface might cause problems, but it all seems to work (93.71 drivers). The only problem was enforcing fullscreen 800x600 at 200Hz. After a little fiddling, I've found that using the latest version of Powerstrip (3.74 build 584) alone isn't enough as it was with our previous card, an AGP ATI 9800 Pro. For some reason, it would only give me ~150Hz refresh in fullscreen mode (in windowed mode it's fine). I suppose this is a problem with Powerstrip which will eventually be fixed. I had to run RefreshForce to set Windows to always use 200Hz when in 800x600, and now it's enforced properly, yet I can still take advantage of Powerstrip's ability to fine tune the signal.



Suganthan Subramaniam wrote:

Hi All,

Martin's claim about Windows XP is what we have found on single processor without any hyper-threading. With hyper-threading or with multi-core on a single CPU Windows XP and Linux does provide good timing with keyboard/mouse support provided you only have one real-time thread per pair of logical processor. This is without any affinity done. ie. it seems like the OS schedules the real-time thread on one logical/physical processor and the rest on the other processor.


On Tue May 8 22:24 , Martin Spacek sent:


    Has anyone had experience running visionegg on a multi-core machine?
    wondering if it would be possible to have visionegg running on one
    and everything else (including the OS's keyboard polling process,
    whatever that may be) on the other core. My hope is that way, one could
    run visionegg with the absolute highest priority (in windows, that
    be realtime for both process and thread priority), without giving up
    ability to capture keyboard events with pygame.

    I'm not even sure if Windows 2000 can handle multiple cores. I seem to
    remember reading it can handle up to 2 CPUs. Any idea how you'd go
    specifying that you want a certain process to run on a specific core?

    Is windows still the better choice vs Linux in terms of being as close
    to realtime as possible?

    I'm bringing this up again because a couple of years ago I posted that
    I'd found a sweet spot for Windows 2000: setting visionegg process
    priority to realtime, and thread priority to idle. This gave excellent
    timing, while retaining keyboard functionality. If I recall correctly,
    those same settings locked out the keyboard on a WinXP system. I've
    since updated our stimulus computer a bit (but left it at Windows
    and now the keyboard no longer works with those same settings. Perhaps
    it was due to the move from Python 2.3 to 2.4, which is compiled with
    MSVC7.1 instead of MSVC6...


    The Vision Egg mailing list
    Archives: //www.freelists.org/archives/visionegg
    Website: http://www.visionegg.org/mailinglist.html

==================================== The Vision Egg mailing list Archives: //www.freelists.org/archives/visionegg Website: http://www.visionegg.org/mailinglist.html
The Vision Egg mailing list
Archives: //www.freelists.org/archives/visionegg
Website: http://www.visionegg.org/mailinglist.html

Other related posts: