Choppy / unstable framerate on Mac

yo peeps!





I’m just trying out lwjgl and jme on mac and i have to say it all looks veeery nice! Fantastic!



I have noticed a small glitch in the matrix though. It seems that every demo and every piece of software that runs jme / LWJGL on mac has an uneven (unstable, choppy) framerate - including the little program I managed to put together myself with just a SimpleGame-setup.



You know, every second or so the fps goes down and for a short period of time (like a tenth of a second or so) the screen is not updated at all. The result is an uneven motion and it is simply not acceptable. This cycle seems fairly random in length and I can’t detect any HD activity or any other app or server that it could relate to. Fullscreen mode does not affect the behaviour.



Now, I have tried the same stuff on PC and there it looks just fine. So my guess is there’s something wrong with the mac-ports at some level in some library somewhere between jme and opengl.



My question is: Have anyone else experienced this? Or is it actually my computer configuration that is causing this problem? If anyone else has noticed this, maybe we could try to pinpoint the cause for this problem?



I thought you jme guys might have a lot of experience with lwjgl. erh i guess i should make a post at the lwjgl site too… ?





I’m on a 12" PB 1 Ghz / osx 10.4.1



ciao

/0scar

Interesting. I just got a Mac mini and have been transferring everything (my computing life) to it, including jME development. Running tests don’t show any stuterring that I notice. Are you seeing this in a particular test or pretty much all of them? Do you notice this pause with LWJGL apps? How about OpenGL in general?



I’m running a Mac mini 1.25 GHz, 1 GB RAM and a Radeon 9200 (with a pitiful 32 MB RAM)

Same here. No major problems running on a mac… in fact I demoed on a Mac Powerbook G4 at GDC in March.

Im not sure if this is a solution, but its definetly a question.



The OSX kernel is based on GNU Mach kernel which is infact a microkernel. Microkernels differ from PC kernels (including linux and windows, they are monolithic kernels) that some operations (like thread management, memory management…etc) is performed in userland rather than kernel land. Kernel land doesn’t get interrupted until the process is finished so performance is arguably better on monolithic kernels.



So im assuming that you have a process (maybe an old driver?) thats causing a heavy userland process to occur which is being schedueled to run along side jme, hence thread management issues.



I dont have an apple myself so I cant test, but thats the theory anyway…



DP

Well, slight correction… Mac OS X’s kernel is XNU. XNU contains Mach 3.0 (modified) services, as well as a lot of other things (BSD, IOKit, libkern, and some other things I can’t remember). It’s also a hybrid kernel for this reason (not quite a microkernel anymore).



That being said there’s not drivers, per se. Because Apple controls the hardware, the “drivers” are included in the OS itself. So you can only get updated drivers with system updates.



I would lean towards disk swappage. Run Activity Monitor and watch the available RAM (green) as you start a jME demo. If that runs out and you start seeing Page Ins/Page Outs increasing, it’s a RAM issue.

Is that Tiger your speaking of Mojo? Cool and very intersting IMO…



DP

update:



ok, i shut down all little dasboard widgets I had goin and the framerate now seems stable. : ) how typical…







thanks for all your quick responses!



I sense a certain interest in Mac OS technologies. I found a nice article on ars technica about mac os x tiger.



Mac OS Tiger on Ars Technica



Hope you find it interresting…

cya around!

ciao

A new flash presentation explaining the kernel is here: http://www.kernelthread.com/publications/osxkernel/osxkernel.swf pretty interesting.