Hey there
Just wanted to share some findings after combining all sorts of
"good practices" for getting a decent MachineKit setup.
The machine is dated and uses a CPU than can be bought for less
than a dollar I think.
The TL;DR is:
Servo thread at 15052
Base thread at 12569
Details:
OS: Debian Jessie with a Xenomai kernel upgraded from a LinuxCNC
Wheezy system
Hardware: Dell Optiplex 745
Bios: Almost everything turned off except USB, parallel port,
ethernet and CPU thermal protection
Hardware details:
cnc@TC3020:~$ lspci
00:00.0 Host bridge: Intel Corporation 82Q963/Q965 Memory Controller Hub (rev 02)
00:02.0 VGA compatible controller: Intel Corporation 82Q963/Q965 Integrated Graphics Controller (rev 02)
00:02.1 Display controller: Intel Corporation 82Q963/Q965 Integrated Graphics Controller (rev 02)
00:1a.0 USB controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #4 (rev 02)
00:1a.1 USB controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #5 (rev 02)
00:1a.7 USB controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #2 (rev 02)
00:1c.0 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 1 (rev 02)
00:1c.4 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 5 (rev 02)
00:1d.0 USB controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #1 (rev 02)
00:1d.1 USB controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #2 (rev 02)
00:1d.2 USB controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #3 (rev 02)
00:1d.7 USB controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #1 (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev f2)
00:1f.0 ISA bridge: Intel Corporation 82801HB/HR (ICH8/R) LPC Interface Controller (rev 02
<
/span>)
00:1f.2 IDE interface: Intel Corporation 82801H (ICH8 Family) 4 port SATA Controller [IDE mode] (rev 02)
00:1f.3 SMBus: Intel Corporation 82801H (ICH8 Family) SMBus Controller (rev 02)
00:1f.5 IDE interface: Intel Corporation 82801HR/HO/HH (ICH8R/DO/DH) 2 port SATA Controller [IDE mode] (rev 02)
02:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5754 Gigabit Ethernet PCI Express (rev 02)
cnc@TC3020:~$ lscpu
Architecture: i686
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 2
On-line CPU(s) list: 0,1
Thread(s) per core: 1
Core(s) per socket: 2
Socket(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 15
Model name: Intel(R) Pentium(R) Dual CPU E2200 @ 2.20GHz
Stepping: 13
CPU MHz: 2192.790
BogoMIPS: 4385.58
L1d cache: 32K
L1i cache: 32K
L2 cache: 1024K
Grub details:
cnc@TC3020:~$ dmesg | grep command
[ 0.000000] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-3.8-1-xenomai.x86-686-pae root
=
UUID=63401999-b871-430d-9566-de89b087ffef ro initrd=/install/initrd.gz quiet rootdelay=5 xeno_hal.smi=1 lapic=notscdeadline hpet=disable i915.i915_enable_rc6=0 i915.powersave=0 intel_idle.max_cstate=1 pro
c
essor.max_cstate=1 isolcpus=1 idle=poll acpi_irq_nobalance noirqbalance
cnc@TC3020:~$ cat /proc/interrupts
CPU0 CPU1
0: 72 0 IO-APIC-edge timer
1: 3 0 IO-APIC-edge i8042
7: 0 0 IO-APIC-edge parport0
8: 0 0 IO-APIC-edge rtc0
9: 0 0 IO-APIC-fasteoi acpi
12: 4 0 IO-APIC-edge i8042
16: 100272 0 IO-APIC-fasteoi uhci_hcd:usb3, i915, eth0
17: 56226 0 IO-APIC-fasteoi uhci_hcd:usb4, uhci_hcd:usb6
18: 0 0 IO-APIC-fasteoi uhci_hcd:usb7
20: 28260 0 IO-APIC-fasteoi ata_piix, ata_piix, i801_smbus
22: 3 0 IO-APIC-fasteoi ehci_hcd:usb1
23: 0 0 IO-APIC-fasteoi ehci_hcd:usb2, uhci_hcd:usb5
NMI: 2861 2861 Non-maskable interrupts
LOC: 1377714 350753 Local timer interrupts
SPU: 0 0 Spurious interrupts
PMI: 2861 2861 Performance monitoring interrupts
IWI: 0 0 IRQ work interrupts
RTR: 0 0 APIC ICR read retries
RES: 2 2 Rescheduling interrupts
CAL: 0 347 Function call interrupts
TLB: 0 1 TLB shootdowns
TRM: 0 0 Thermal event interrupts
THR: 0 0 Threshold APIC interrupts
MCE: 0 0 Machine check exceptions
MCP: 9 9 Machine check polls
ERR: 0
MIS: 0
For the "stress test" itself, I ran 5 glxgears and played
repeatedly a video stream and the latency was not affected at
all after 30 minutes.
Here's the evidence:
http://i.imgur.com/OnYcAXn.png
That system is driving a 3.2x2.1m CNC router through the
parallel port with the gantry component (adapted from the
Probotix BBB one) for auto-squaring, debouncers for the limit
switches, sindle control using PDM (worked best for us).
Steppers are set to 1/16 and I can get rapids as high as
7.2m/min though the machine will fall apart since the ballscrews
will start jumping up and down so we're keeping it at 4m/min
which is great.
Later today we're going to upgrade the CPU for a Core 2 Duo quad
and we may have different figures. We'll see.
Anyways, I'm pretty happy with this. Ask me anything about OS or
hardware and I'll be happy to share.
-Fernando
--