Cannot seem to get good latency numbers!

More
4 years 2 months ago - 4 years 2 months ago #249865 by tatel
One last thing, while testing, please be methodical. Test just one thing each time. Test it for 5-10 minutes, then write the result in a notebook, then do another test. After a bunch of tests, you can do some long tests, say at least 2 hours. 4-8 hours would be better. I like to have the selected tests running for a complete day.

Please note that the different combinations of kernel parameters can give different resuslts. Usin nohz=off will be different if you are using -or not using- say, parameters that deal with idling. First, it will surelly help if you make sure you have hyperthreading and c-states disabled. then you could go with isolcpus and acpi_irq_nobalance. Then you could go with perhaps nowatchdog and nohz. Then you could go with or without the radeon discrete graphic card. And so on. This means a whole bunch of tests. If you test two thing at the same time, you'll be unable to get the right conclusions, and you'll be wasting a lot of time.
Last edit: 4 years 2 months ago by tatel. Reason: typo
The following user(s) said Thank You: Sray69

Please Log in or Create an account to join the conversation.

More
4 years 2 months ago #249874 by tommylight
@tatel,
Can you please start a new topic on the "computers and os" section and copy the info you wrote about this so we can make it a sticky?
Thank you for the extensive info.
The following user(s) said Thank You: Sray69

Please Log in or Create an account to join the conversation.

More
4 years 2 months ago #249876 by tommylight

I tried an old Radeon video card I had but the fan was locked up and the screen was all messed up.
If the picture is messed up during boot time while BIOS info is shown, that usually means the vram is gone.
The following user(s) said Thank You: Sray69

Please Log in or Create an account to join the conversation.

More
4 years 2 months ago #249894 by PCW
I should note that all this latency fussing does very little but waste time
unless you have a parallel port (or other direct I/O) based system.

For Mesa cards, as long as you can run the servo thread at the desired (usually 1 KHz)
rate without real time errors, improving latency has basically zero effect on performance.
The following user(s) said Thank You: arvidb, tommylight, rodw, Sray69

Please Log in or Create an account to join the conversation.

More
4 years 2 months ago #249919 by Sray69

tommylight post=249874 userid=17274@tatel,
Can you please start a new topic on the "computers and os" section and copy the info you wrote about this so we can make it a sticky?
Thank you for the extensive info.

Being new to LinuxCNC and reading all the talk about turning off all these features in the bios but not seeing the features listed in my own bios, the info @tatel posted is a huge help. Now I know how to add things to the the kernel parameters manually. A ton of great info even if it is needed or not.

I agree this should be a sticky somewhere.

tommylight post=249876 userid=17274

If the picture is messed up during boot time while BIOS info is shown, that usually means the vram is gone.

Actually the picture was only messed up once it booted to the desktop. It was an old card that I accidentally kept for some reason.

PCW post=249894 userid=481I should note that all this latency fussing does very little but waste time
unless you have a parallel port (or other direct I/O) based system.

For Mesa cards, as long as you can run the servo thread at the desired (usually 1 KHz)
rate without real time errors, improving latency has basically zero effect on performance.

I am sure you are probably right. But it is good to know the info that @tatel posted. Just knowing there are ways to fine tune even if the bios has very limited options.

@PCW Thanks for helping me get past the latency hurdle I was stuck on. I was about to throw in the towel and find another solution that most likely would have been costly.

tatel post=249858 userid=17633You can bet your life you are gonna need some time. I'm still learning ten years after I installed linuxcnc for the first time, and, as already said, I was then already used to patch the vanilla sources and build rt-preempt linux kernels. So, take it easy and avoid the samurai's fate.

I'm afraid that latency tuning is still an art, not yet a science. So you'll need to gain some experience. To watch the /proc/interrupts thing seems to be giving the best clues, to me, about what's going on. Do I have many rescheduling interrupts on my isolated core? Since that core does not have so much load, perhaps that shouldn't be happening. TLB shotdowns? They are EVIL. Does cat /proc/cpuinfo say my processor has constant_tsc, yet I'm seeing an HPET local timer interrupt in each core? Time to put hpet=disable on the boot line. And so on and so on and so on.

So, again, take it easy. Get your system working by hook or by crook --this is about machining, after all, it isn't?-- then you'll get as much time as you need to learn more.

I think the aim is for latency tuning to become a science, and that going the RT way, even if it has far worse latency than RTAI, is to make it easier both for linuxcnc developers and users.

But, I fear RT-Preempt still has too much latency. Being able to record a punk band that are friends of you, with a salvaged-from-junk PC and a cheap sound card, without latency issues is one thing. That <5 miliseconds latency can perhaps be good to do trading, too. But if you need to have <50 usec latency or else have a probability to see your machined part ruined, well, things are not so easy. This is why I'm in love with RTAI and this is why is much easier to have good enough latency by using a card that does hardware stepping

Anyway, as said, welcome to the club

Yeah to be honest, a lot of what you have said is greek to me at this point. I am sure in time I will begin to understand it all. But it is great info and I am not as lost as I was feeling. I am sure I will be asking more questions as I mess around with LinuxCNC.

Thanks guys
The following user(s) said Thank You: tommylight

Please Log in or Create an account to join the conversation.

More
4 years 2 months ago #249937 by tatel
Are you guys sure you want it? LinuxCNC seems to be clearly geared toward RT and hardware stepping now. While I can easily understand the reason why, I'm hoping that software stepping will not be marooned. As a matter of fact, some days ago I asked about RTAI remaining to be alive.

Yet I'm not going to make any arguments about it. I simply got some Wheezy ISOs conveniently stored and I can stick to it for those things I have that need it, like some business stick to old XP systems, and for the same kind of reasons.

There's no doubt PCW has a point. Even so, I still think that latency tuning remains useful, or this thread wouldn't exist. So, please make sure you still want to have that sticky done, then I will be glad to do it.

Best wishes
The following user(s) said Thank You: tommylight, mdm55

Please Log in or Create an account to join the conversation.

Time to create page: 0.084 seconds
Powered by Kunena Forum