RTAPI error and realtime delay at EMC launch

More
12 Jan 2011 05:05 #6641 by hcb
Hello, all, I have finally built the PC with the components I listed that I ordered. I am on that system now. I used to build PC's back in the late 90's to 2000 but not since then. It still only took me about 45 minutes to build the thing and that included a phone call and some cold beer and having fun doing it. Nothing to it.

The assembly was fairly easy, even with my 10 year hiatus from doing such projects. The Rosewill case is pretty cool, not requiring screws for the 3.5 or 5.25 inch bays. The case has two header connectors for the 4 front panel USB ports. I connected both to the MB, but one had to go to the Front Panel USB with Flash Drive Support connector and I'm not sure it will work. No big deal, at least two of the front panel USB ports will work. Everything else was pretty easy. The case I ordered has two case fans but the MB has only one connector for a case fan so I left the front one disconnected.

The system seems to only recognize 3.5 GB of RAM and 256MB are used for the video card so Ubuntu is reporting 3.2 GB of RAM. Not really surprising and no big deal.

Installation of Ubuntu was a cake walk. It seemed slower off the USB CD ROM drive versus an internal SATA or even IDE CD ROM drive but no big deal.

Once loaded, the system is fast enough to be pleasant to use for surfing the web and reading e-mail and such.

The exciting news is that the latency is really low. Immediately after booting after loading I started the Latency Test and ran it while I downloaded the ad-blocking hosts file from MVPS.org and copied that to my /etc folder (with the required addition of the hostname of my Linux box and changing the filename from upper to lower case). Ads blocked, I checked a couple of my e-mail accounts, logged on here, and began downloading the product guide from Intel for this motherboard (interesting to me is that the product guide says it is a dual-core processor (and only one) yet the system monitor shows to have four cores). I saw that one core was at 100% proc usage and stopped the Latency Test to see if that was the cause (it was). At that time the latency for the Servo Thread was 10,383 and the Base Thread was 12,576. I restarted the Latency Test and have been running it for about 10 minutes now with 5 instances of Firefox, 1 instance of GEdit, system monitor, 1 PDF open, and Update Manager downloading a bunch of updates and still have low latency (9,230 for the Servo Thread and 11,904 for the Base Thread).

I have the Visual Effects at Normal, where they were after installation. I don't know yet if turning them off will lower the Latency.

Very happy here. New stuff, low latency, no hassles with the old PC's. I'd recommend this setup and hopefully the shopping list will help, even if the PS is overkill (no ill-intent to the guy who pointed that out).

Tomorrow I'll actually run the engraving table and see how that goes but I expect no problems. I'll post back.

Thank you to all who helped here and thanks to BigJohnT for posting about the D510MO board.

--HC

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

More
12 Jan 2011 10:51 #6643 by andypugh
hcb wrote:

At that time the latency for the Servo Thread was 10,383 and the Base Thread was 12,576.


That's interesting. I see about half that with exactly the same motherboard. (Not that there is anything wrong with 12uS latency.)

I don't know if you have isolcpus=1 as a default kernel option, but if not it might be interesting to try it.
I _think_ I only see 2 CPUs on mine, so it might be that you have Hyperthreading on in the BIOS, so you could try turning that off too.

Or, you could just get on with the machine, 12k is extremely good in absolute terms.

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

More
02 Feb 2011 04:10 #6951 by hcb
Hey, Andy, thanks for the reply. I'm sorry for the delay...I've been obsessing about trying to design a CNC plasma table...when I close my eyes I see gear reduction ratios and linear bearings.

Anyway, I just got back to the Linux box here a couple of days ago and then fired up the Latency Test. I have been streaming music from DI.fm and had more browser windows open than you can shake as stick at (about 12, actually), and some PDF files and let the system run for about 36 hours and saw Servo hit 17,365 and Thread hit 15,313. Pretty high for the system so far since I built it. I had no idea about Hyperthreading being a problem with latency and realtime...I'm sorry, maybe I missed that somewhere along the way or maybe it's not been addressed in any of the postings I've read, I'm not sure. Regardless, I recorded the numbers and rebooted and turned HT off. I now see only two procs in the System Monitor. Currently I have three instances of Firefox running (DI.fm, McMaster-Carr, and here), Latency test, and Totem Movie Player (playing classic trance streamed from DI.fm). Numbers for LT are Servo 10,676 and Base 11,539.

I can spell Linux most days and sudo some commands on good days...Linux/Unix is not my area of expertise at all, I'm afraid. I will have to do some looking to learn what you mean about the isolcpus setting. I'm sorry, just not that good with 'nix. Off to Google...I'll post back.

Thanks again.

--HC

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

More
02 Feb 2011 05:07 #6953 by hcb
Andy, okay, after waaayyy longer than I thought it'd take...I think I found the answer.

I edited (via Sudo) the /etc/default/grub file. I found an entry: GRUB_CMDLINE_LINUX=""

I changed that to: GRUB_CMDLINE_LINUX="isolcpus=1"

I ran: sudo grub-mkconfig which ran successfully as far as I can tell (no errors that I saw at the end of the listing).

After rebooting I can see no apparent difference. Current Servo 10,740, Base 10,494. System Monitor shows no difference that I recognize in the CPU loading. Same loading pretty much...5 firefoxes running, Totem running, gedit, latency test, system monitor. I cat'd the /boot/grub/grub.cfg to a text file in my home directory and searched it for isolcpus and =1 but found nothing about the cpu isolation. I have posted it here:

pastebin.com/UMnWURvV

the /etc/default/grub file was changed ONLY to make the line I first mentioned look as I showed it above (adding isolcpus=1 to the quotes at the end...IN the quotes, not after or before).

The latency may be good or even pretty good...but I hate not getting everything I can and I hate little details that aren't right...particularly with computers...made me good at computer work...makes it hard to let go of a little thing. Help.

Thanks you.

--HC

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

More
02 Feb 2011 07:24 #6955 by step4linux
hcb wrote:

I edited (via Sudo) the /etc/default/grub file. I found an entry: GRUB_CMDLINE_LINUX=""

I changed that to: GRUB_CMDLINE_LINUX="isolcpus=1"

I ran: sudo grub-mkconfig which ran successfully as far as I can tell (no errors that I saw at the end of the listing).


Try this :
in /etc/default/grub you should find a line like this
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
change it to:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash isolcpus=1"

then execute:
sudo update-grub

then reboot

You can also look into /boot/grub/grub.cfg to find the "quiet splash isolcpus=1", but do not edit this file.

Gerd

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

More
02 Feb 2011 16:30 #6962 by hcb
Hello, Gerd, thank you for your reply.

I changed the grub file to the way you listed it (editing the LINUX_DEFAULT line instead of the LINUX line) and removed the entry I had put on the LINUX line. I ran (wait for it....) grub-mkconfig and rebooted and found no difference and that the line in the grub.cfg had not changed... I saw that you had said to run update-grub but since my online reading had indicated to use grub-mkconfig I thought it was maybe a difference in the versions of Linux. NOT so! I ran the update-grub command (with sudo) as you said and that worked. Rebooted and I can see that CPU 1 (second CPU) is sitting constantly at 0 percent with the other proc sitting somewhere around 60-100 percent depending on what's going on (5 firefox, sys mon, totem movie player, latency test).

So, for the next guy: use update-grub not grub-mkconfig.

Latency after about 20 minutes with all the open windows is:
Servo 6,092
Base 7,415

The system seems a bit more sluggish in the apps but that's probably because the whole thing is running on one CPU not two. It is still totally usable.

Thanks again, Gerd.

--HC

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

More
02 Feb 2011 17:05 #6964 by andypugh
If you look at wiki.linuxcnc.org/cgi-bin/emcinfo.pl?Latency-Test you will see that that is about as good as it gets.

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

More
22 Mar 2011 03:25 #7990 by hcb
And I have no complaints at all...just trying to get the numbers that BigJohnT had reported. I'm very happy. I have *FINALLY* used the system to run my table...had to wait for a project...and it works great!

This system rocks and for only less than about 400 bucks, if memory serves, it was a great deal. EMC2 Live Disc loaded with no problems and the table config and Latency Test were smooth!

Very happy. I used the system to engrave/mark some aluminum plate for parts for the CNC Plasma table I'm building and it worked flawlessly.

Thank you for all who contributed.

--HC
The following user(s) said Thank You: flosi

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

More
15 Apr 2015 17:17 - 15 Apr 2015 17:18 #57821 by gnagy
I was getting the same error message and I had a very limited speed on my Sherline 4-axis CNC mill (<220mm/min ~ 8.6 inches/min).

After disabling legacy USB support in the BIOS, I'm still getting the error message, but I can run the stepper motor smoothly at over 3 times the speed! (720 mm / min ~ 28 inches / min).
I even had to edit the Sherline ".ini" file to up the maximum speeds because the GUI only allowed 480 mm / min.
Last edit: 15 Apr 2015 17:18 by gnagy.

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

More
20 Apr 2015 18:03 - 20 Apr 2015 18:13 #57930 by Zuikkis
Hello!

I just upgraded my CPU from Core2Duo E7500 to Xeon E5450. Everything seems to be working fine, except that I now have huge latency problems..

If idling, latency test shows reasonable ~20000ns values. But if I open Firefox, values go over 1000000ns easily. Also when just switching tabs in Firefox, or moving windows etc.

System is identical otherwise, just new CPU.

I have tried twiddling BIOS settings and all tricks described in this thread, but no improvement.

I can obviously switch back to E7500 CPU, but Xeon is so much faster otherwise. :) This is my daily desktop machine which is used to many other things as well besides CNC.

I tried disabling SMI, no difference.

Edit:

This is Lenovo A58 system, LinuxCNC 2.6.7, kernel 3.4-9-rtai-686-pae
Last edit: 20 Apr 2015 18:13 by Zuikkis.

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

Time to create page: 0.898 seconds
Powered by Kunena Forum