[visionegg] Re: time and OS es


It occurs to me that some latencies may be completely controlled by a few minor modifications to your flavor of linux distribution. Turning off all services would be a good first start. Recompiling the kernel to exclude unneeded drivers would probably help too (if it is a real psychophysics box, it probably doesn't need that network connection does it?). Recompiling the kernel so that it can't even try to use a network connection will avoid any latencies introduced by having a network interface on the machine. I would think a large amount of the pre-empting is probably from things that don't need to be running. A default Fedora kernel has way too much stuff in it to make sure the kernel works for everyone. Aren't there programs for system profiling to find out where the operating system is spending it's time? (A quick google comes across oprofile: http://oprofile.sourceforge.net). I would think minimally all one would need for visionegg is anything you need for X11 and just PS/2 support for keyboards and mice. USB/network/cdrom are unnecessary for psychophsyics. Doing this and then testing your setup is the only real way to make sure you're consistent.

Most modern distributions even allow easy ways to modify the kernel, and boot loaders to load a specific kernel. One would only need a psychophysics kernel and a general purpose kernel in GRUB to really pull this off (so you could actually bring a stimulus to the machine or use features you'd expect out of a normal linux box).

When it comes down to it, there's two options, use an operating system that you can take over (ala Mac os < 10, windows < 2000), or minimize the effects of a preemptive multi-tasking OS.


I'm relectant to say too much in the present discussion, because (like everyone else it seems) I'm operating from anecdotal experience rather than exhaustive testing. So, with that caveat, I'd like to say that from my rather limited experience, linux does have significantly worst latency/frame skipping issues than either Windows (2000/XP) or even Mac OS X (with various priority boosting function calls, as available in the Vision Egg, for example). I'm not sure this is entirely due to the linux kernel, although some of it may be and I'd be interested in the results of tests like those proposed above. Another aspect is that I think (but I'm not positive) that X11 display inherentely requires two processes -- the application and the X11 server. As far as I know, this is a fundamentally different model than Windows or Mac OS X, and may result in some of the issues we experience. It seems like it would technically be possible to make fullscreen OpenGL run underneath X11 rather than on top of X11, which may allow something like the Vision Egg to run in full-screen mode without needing the X11 server at all. Perhaps the efforts to make X11 servers run on top of an OpenGL base will make this possible.

And I'm sure there's an effect of the computer gaming industry applying of effor on solving optimization issues/latencies/frameskips in the Windows world, even for OpenGL.

For now, I admit that I spend 99% of my programming time in linux but do the experiments themselves in Windows, purely for these frame-skip/latency reasons. It's a regrettable situation... I have heard, now also from John Christie, that Mac OS X is also capable of performing very well.


-- Andrew D. Straw Post-doctoral scholar ,-. Dickinson Lab \_/ California Institute of Technology 8||} Mailcode 138-78 / \ Pasadena CA 91125, USA `-^ email: astraw@xxxxxxxxxxx office: +1 626 395 4396


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

Other related posts: