Click to See Complete Forum and Search --> : Adjusting latency for video card


hard candy
07-22-2003, 07:32 AM
I had just installed "powertweak" and was looking through it. i noticed the video PCI latency was set all the way to right at "248" (I'm not sure what units it's measuring). The video card is nVidia FX5200 AGP, the AGP is 4x/8x per MB specs. The driver is "nvidia" per XF86Config, using the downloaded driver version 4363.
Per the PCI Info center from KDE Info the slot flags are "busmaster, 66 Mhz, medium devsl, latency 248, IRQ 11".
Do I want to adjust the latency down? The other PCI slots for sound, etc are set at 32. I'm not that familiar with AGP processes and don't want to mess up the chipset controller. Thanks.

mdwatts
07-22-2003, 08:20 AM
I bet bwkaz will know the answer. He is sometimes here during the day though most of the time around dinner time.


I'm not that familiar with AGP processes and don't want to mess up the chipset controller.


I wouldn't want to suggest something either just in case.

There are some good sites around (don't have any handy though) that explain such things as PCI latency and such. While waiting for *cough* bwkaz and unless another member is knowledgeable on this subject, you could try searching for those sites. Sorry I couldn't help more. :(

hard candy
07-22-2003, 09:03 AM
Good ol' O'reilly:
Here is a good background on latency in the Linux environment:
Low Latency in the Linux Kernel (http://linux.oreillynet.com/pub/a/linux/2000/11/17/low_latency.html) .
And on this site, I think he's saying a longer latency is better for a specialized PCI slot like AGP:
Speed Demonz (http://www.adriansrojakpot.com/Speed_Demonz/BIOS_Guide/BIOS_Guide_02h.htm) .
It is confusing. :confused:

mdwatts
07-22-2003, 09:20 AM
Originally posted by hard candy

It is confusing. :confused:

You can say that again. I can read it until the end of time and I still don't understand most of it. :(

I always find the motherboard manuals to not include much of a description for the bios options and then I have to search around Google to find a more precise explaination.

hard candy
07-22-2003, 05:49 PM
On the NVIDIA forum site I found this thread which I followed and the result:
bash-2.05b# lspci -vv
00:00.0 Host bridge: VIA Technologies, Inc. VT8377 [KT400 AGP] Host Bridge
Subsystem: VIA Technologies, Inc.: Unknown device 0000
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Step
ping- SERR- FastB2B-
Status: Cap+ 66Mhz+ UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort
- <MAbort+ >SERR- <PERR-
Latency: 8
Region 0: Memory at e0000000 (32-bit, prefetchable) [size=128M]
Capabilities: [80] AGP version 3.5
Status: RQ=31 SBA+ 64bit- FW+ Rate=x1,x2
Command: RQ=31 SBA+ AGP+ 64bit- FW- Rate=x2
Capabilities: [c0] Power Management version 2
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot
-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-

So the result from "lspci -vv" shows the latency to be 8 (ms) where the powertweak program is still showing 248 (ms). My conclusion is that the software "powertweak" is not accurate and that the latency is OK.
Moral: Do more research!
But if someone were to show me this conclusion is wrong- all advice is welcome.:)

bwkaz
07-22-2003, 10:46 PM
Originally posted by mdwatts
I bet bwkaz will know the answer. He is sometimes here during the day though most of the time around dinner time. Actually, I hadn't the foggiest when I read this thread the first time. ;)

Although that page that hard candy linked to does seem to clear it up a bit, at least for me. The latency is measured in PCI bus cycles, not in any specific unit of time (though the PCI bus is usually running at 33MHz, so if it was set to 33 for example, then that would correspond to one millionth of one second; if it's set to 248, that's 7.5 millionths of a second; for other numbers, divide by 33, then divide by a million, to find out the actual time it would take in seconds).

High "latency" on one device lets that device do whatever it needs to do for longer. This happens at the expense of other devices on your PCI bus -- if you have the "latency" set too high for any one device, and it hogs the bus too often, then it is possible that other devices never get access.

Low "latency" on every single device will set it up so that (most likely) no starvation will ever take place. However, it does this at the expense of having to split up large bus transactions.

Where it would be relevant to the video card and AGP, is in transferring textures (using either DMA or non-DMA, it wouldn't matter). The bigger the latency is, the more of each texture can be transferred from system RAM to video RAM at a time, and the number of bus transactions will be lower (and since the bus overhead is proportional to the number of transactions, you'd lower overhead). But, again, other devices will suffer, because they'll have to wait longer to be able to use the PCI bus.

---

I'd think that 8 is actually wrong, not 248. Though I don't have a clue where the 8 comes from, so it may be closer. Anyway, since the range is 0 to 255, and the default for most devices is indeed 32 or 64, the 248 number sounds more plausible to me at least.

For what to set it to, hmm. I'd say to try 192, or possibly something in the low 200's. I think 248 is a little high, though -- at that point, stuff like DMA sound is going to start to stutter (when the card is transferring texture data, which hopefully doesn't happen very often anyway -- ideally, the game you're playing will cache all textures on the card when it boots up, but we don't live in an ideal world, so who knows how it actually gets used :p).

hard candy
07-22-2003, 11:28 PM
I appreciate your help bkwaz, I set it down to 190 in powertweak and it is a big difference- the picture is probably 25% sharper. And the 8 is still there:
00:00.0 Host bridge: VIA Technologies, Inc. VT8377 [KT400 AGP] Host Bridge
Subsystem: VIA Technologies, Inc.: Unknown device 0000
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap+ 66Mhz+ UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort+ >SERR- <PERR-
Latency: 8
Region 0: Memory at e0000000 (32-bit, prefetchable) [size=128M]
Capabilities: [80] AGP version 3.5
Status: RQ=31 SBA+ 64bit- FW+ Rate=x1,x2
Command: RQ=31 SBA+ AGP+ 64bit- FW- Rate=x2
Capabilities: [c0] Power Management version 2
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-

Thanks for your assistance.