PDA

View Full Version : Excessive latency on Windows XP



Greg Sullivan
12-22-2001, 02:38 PM
V2.50.46 on Windows XP
Audio: Delta 66
MIDI: Soundblaster Vibra 128(?)

I have just installed Gigastudio 160 on Windows XP, and unfortunately the latency is simply too great for me to tolerate. I haven\'t measured it yet, but it feels like it\'s appreciably greater than it is when runnning Windows ME on the same hardware configuration.

Has anyone else noticed that the latency has increased quite a lot when running on Windows XP? Are there any things I can do to improve it?

Thanks,
Greg.

[This message has been edited by Greg Sullivan (edited 12-26-2001).]

killerbobjr
12-24-2001, 10:57 AM
Yes, the latency is greater under XP than 9x. I measured about 20ms for XP vs. 10ms on 9x for an M-Audio Audiophile on a 1GHz PIII. And no, there isn\'t much you can do about it short of getting a much, much faster computer.

Simon Ravn
12-25-2001, 06:03 AM
The speed of the computer (read: CPU) probably has nothing to do with it. The reason is probably more likely that Win2K/XP doesn\'t allow direct \'hardware hit\' the way 98 does. I am not sure how low WDM can go regarding latency, but below 20ms should surely be possible http://www.northernsounds.com/ubb/NonCGI/images/icons/smile.gif Maybe it is something that can be improved in a later GS update.

Kenn159
12-25-2001, 09:55 AM
Can you tell me the process you go through to determine your Latency?
I would also like to test Latency my Win XP/Gigastudio system.
Thanks , Ken

killerbobjr
12-25-2001, 12:39 PM
(Sigh!) The speed of the cpu has a lot to do with the latency. First off, the transitions between kernel mode (ring 0) and user mode (ring 3) are faster with a faster clock speed. This is the biggest speed hit under WDM. Second, a software synthesizer, which is how I assume Gigastudio is implemented under XP, has to go through Kmixer, which a kernel mode software mixer and sample rate converter. A faster cpu means faster routing through Kmixer. Third, DMA buffers can get filled faster with a faster cpu, which means you can use smaller buffers, thus lowering the latency. Does all this mean doubling the cpu speed will cut the latency in half? No! You\'ll get maybe a 3:2 correlation between cpou speed and latency reduction, but it will be reduced.

For an explanation on how I measured latency on my test machine, see this thread: http://www.northernsounds.com/ubb/NonCGI/Forum1/HTML/000674.html (\"http://www.northernsounds.com/ubb/NonCGI/Forum1/HTML/000674.html\")

killerbobjr
12-25-2001, 12:41 PM
[This message has been edited by killerbobjr (edited 12-25-2001).]

killerbobjr
12-25-2001, 12:42 PM
Gaack!!! I can\'t believe I just triple posted this reply!

[This message has been edited by killerbobjr (edited 12-25-2001).]

Joris Vincken
12-25-2001, 11:43 PM
For me latency is better with XP than 98. This has something to do with the drivers for my MOTU2408mkII. They allow a smaller buffer with XP and therefor latency is smaller.

pmuse
12-28-2001, 08:50 AM
Hello All,

Interesting thread - first of all, to clear up some perceptions about kernel mode and user mode - GigaStudio is a kernel mode application. The Kmixer in Xp is not used at all by GigaStudio. This is the main reason that the SoundBlaster family is not supported. The kernel mode interface is the GSIF implementation of the supported sound hardware.

About WDM - again, a sound card driver can be VxD or WDM, but it must have a GSIF implementation to work with GigaStudio. This provides for the lowest latency.

Apart from this, there are two other factors that contribute to latency:


1. Buffer settings in the sound hardware driver control panel.

2. Hard disk streaming effeciency. DMA settings, cache size, cluster size, and fragmentation all contribute to the amount of time it takes to stream samples off the hard disk.

Hope this helps,

Kevin

killerbobjr
12-30-2001, 01:58 PM
Have you guys made a lot of measurements on the latency of the MIDI input through a hardware port under XP compared to Win9x with various hardware? The tests I\'ve done on the two useful pieces of hardware I have here at the bunker (the MIDI in of a M-Audio Audiophile and an MPU-401) show a significant increase between Win9x and XP. Also, even with every single service stopped and file system cache set to the minimum (I\'m still trying to find a way to turn it completely off), GS under XP requires quite a bit more horsepower to reach the same performance levels that it attains under Win9x.

The one positive thing I can say about XP is that 99% of GS buyers will be able to have hassle free, out-of-the-box 160 voice performance with no tweaking at all using decent hardware (1GHz min, 256MB ram).

Kenn159
12-31-2001, 06:44 PM
So Killerbob, are you saying that you have concluded that giga studio is more stable with win XP than with win 98?
I had read that it would be in the past before it\'s release , have you found that to be the case?

As far as you mentioning you trying to figure out how to turn off the cashe and set up win xp optimized for audio on your computer , Tascam if your listening if you get a chance can you update that computer optimization for audio page for win XP also ?
Thanks , Ken

Joris Vincken
01-01-2002, 05:36 AM
On my system XP is much more robust than 98 ever was. Maybe there is a little trade off in system performance and certainly in memory usage. XP is much bigger than 9x. But with the new computers this is hardly a problem. Also on my system everything looks like win2000 again, so the graphics don\'t use that much resources.

johnsoderberg
01-01-2002, 07:51 AM
Make sure your sound card is not sharing IRQ 9 , and/or use the standard PC HAL and not ACPI.

Simon Ravn
01-01-2002, 08:26 AM
KillerBob, so you\'re saying that a 1400mhz Tbird will make a difference in latency over an 800mhz one for example? How can this be, when GS is using about 40% CPU of my 1ghz Tbird when it is working overtime? I believe even a 600mhz Duron could handle this just as well, judging by that CPU usage - what matters more is harddrivespeed, soundcard drivers and general optimizations, since they can affect the whole \'chain\' of operations the sound goes through.

Anyway speaking of XP - how much higher latency do you get from XP compared to under 98?

killerbobjr
01-02-2002, 03:56 AM
<BLOCKQUOTE><font size=\"1\" face=\"Verdana, Arial\">quote:</font><HR>
So Killerbob, are you saying that you have concluded that giga studio is more stable with win XP than with win 98?
<HR></BLOCKQUOTE>

I think you have the frame of reference backwards. The stability of XP is greater with audio apps (and all apps in general) than the stability of Win9x is with audio and other apps. In other words, a buggy program is unlikely to crash XP, whereas a buggy program will, more than likely, crash Win9x.

That being said, I have found that, properly set up, Win9x running GS is just as stable as XP running GS. The trick is, how does one set up Win9x properly? There are many settings, drivers, registry tweaks, and programs to fiddle about with before Win9x becomes stable and high performing. For the average user, there is too much to figure out.

Installing and setting up XP is a no-brainer in comparison. You pop in the disk, set a few installation options, and go. 30 or so minutes later, you have a properly set up XP machine. Then install GS and you get 160 voices. That\'s it. No settings to change, no registry tweaks, no INI additions, nada.

If you are willing to give up some performance for ease of setup, then XP is the way to go.

<BLOCKQUOTE><font size=\"1\" face=\"Verdana, Arial\">quote:</font><HR>
As far as you mentioning you trying to figure out how to turn off the cashe and set up win xp optimized for audio on your computer , Tascam if your listening if you get a chance can you update that computer optimization for audio page for win XP also ?
<HR></BLOCKQUOTE>

I\'m afraid it\'s not that easy. In XP, the two things you can do right away is turn off all the pretty graphics and set all the extraneous services for manual startup. That will give you a few percent performance improvement. After that, I don\'t think you can minimize the read ahead cache below 4MB (if I recall correctly). Here\'s the utility that lets you futz around with this: http://www.sysinternals.com/ntw2k/source/cacheset.shtml (\"http://www.sysinternals.com/ntw2k/source/cacheset.shtml\")

<BLOCKQUOTE><font size=\"1\" face=\"Verdana, Arial\">quote:</font><HR>
KillerBob, so you\'re saying that a 1400mhz Tbird will make a difference in latency over an 800mhz one for example? How can this be, when GS is using about 40% CPU of my 1ghz Tbird when it is working overtime?
<HR></BLOCKQUOTE>

There are two paths where delays occurs. The first is from the MIDI In port to GS on a dedicated box; or MIDI In, through the sequencer, to GS on a shared box. The second is from the hard drive to the audio out.

Highly simplified, the first, MIDI In, has a minimum delay of 1ms for the 3.125Kbaud signal to assemble a full MIDI message. Then there\'s several 10\'s of microseconds for the interface to send the message to the PC, then several more 10\'s of microseconds to several milliseconds to service that interrupt in kernel mode, then several 10\'s to 100\'s of microseconds to send the MIDI In message to the user mode MMSYSTEM before GS finally gets a hold of it to convert it to an audio stream, again transitioning from user mode to kernel mode, taking several 10\'s of microseconds.

A faster processor will shave time off the interrupt servicing and the mode transition(s).

The second path, again highly simplified, goes from memory in kernel mode pre-cached from the hard drive, to DMA buffer (256 bytes for 24 bits @ 44.1KHz stereo =~ 1ms), to the audio interface.

A faster processor will shave time off the memory to DMA copies.

BUT, because we\'re running a multitasking operating system, there\'s all sorts of other things going on that prevent us from moving in a straight line from the MIDI In to the audio out. Even if you don\'t touch the mouse or keyboard and minimize the GS window, Windows still has to handle the timer (and timeslicing), wait for the hard drive, allocate and deallocate memory, surrender control to the DMA controllers, and transition from user to kernel to user to kernel, etc. all the while. On top of all this, GS is calculating pitch shifts, volumes, filters, and what-have-you before it sends out the audio. This all adds up.

Bottom line is, a faster processor will shorten the time it takes for all these paths to execute, thus lowering the latency, but not at a 1:1 ratio.

<BLOCKQUOTE><font size=\"1\" face=\"Verdana, Arial\">quote:</font><HR>
Anyway speaking of XP - how much higher latency do you get from XP compared to under 98?
<HR></BLOCKQUOTE>

See this thread: http://www.northernsounds.com/ubb/NonCGI/Forum1/HTML/000674.html (\"http://www.northernsounds.com/ubb/NonCGI/Forum1/HTML/000674.html\")

Timo Heil
01-05-2002, 06:44 AM
one very important platform independent (!) latency issue that people often forget: the distance between your ears and the speakers/monitors adds 3ms of latency for every meter (3 feet).

speed of sound: 330m/s
1s / (330m/s) = 3ms.

I think that\'s a very interesting aspect, considerin that some people often are proud of having 1 ms better latency.

Yves
01-05-2002, 09:39 AM
Hi!

I\'m running Giga 2.5 on XP pro with pentium 3 1.2 ghtz and 512 mb ram and Motu 2408 mrk 2 and motu midiexpress USB...
I am using a mac G3 for sequencing and i\'ve done a simple test to measure the latency...this is what i\'ve done...
I\'ve recorded in my G3 a midi click track from a hihat sound from a hardware module and also another hihat sound in giga..both click tracks rendered as audio in the mac. Then i\'ve strip silenced the files so every audio click was a separate audio file and came up to a 3 to 5 ms difference between the module and giga..I suspect the latency was due to the midiexpress USB rather than the 2408..

peace

Yves

seclusion
01-15-2002, 06:33 PM
Not doin XP yet but I found the 2408\'s latency very low. If you play your keyboard snr hits every beat then the latency of the midi interface has already happened.
The recorded midi performance is over, then when you audio record that midi performance that would then be the latency of the sound card. I\'ve recorded my GTR through a digi board into the 2408 via adat and monitored via the output of the 2408 back on the digi board.. Yes there was latency but damn was it\'s quick. With my setup I\'m able to lower the latency of the 324 card to 128, which I attribute to my harddrive speed (Raid array).
Assuming you have everything configured decently and upto date the 2408\' latency is very very low..
Brian

Kim
01-15-2002, 11:23 PM
Hi Yves (mainly)
You said something interesting that caught my eye. You say that the latency you are experiencing could be caused by your midi interface. I tried a motu 2408 recently in place of my gigastation card, and the latency was way to high to use. As the 2408 doesn\'t have any midi, I got a Midi Man 1x1 usb interface. Would it be possible that the latency I experienced was the cause of the midi interface and if so, what could be done? Or, will I never get a better card, latency wise, then the gigastation card.
Thanks

Kim