Latency Reduction Success Story for Dell XPS 8500 Running 2.8.4
- Scrappy_000
- Topic Author
- Offline
- New Member
Less
More
- Posts: 19
- Thank you received: 8
18 Mar 2023 12:31 - 19 Mar 2023 20:22 #266988
by Scrappy_000
Latency Reduction Success Story for Dell XPS 8500 Running 2.8.4 [UPDATED] was created by Scrappy_000
Y'all,
INITIAL BLUF: Removing the PCI-E graphics card reduced latency by a factor of 20, and disabling WIFI reduced latency by a factor of 5.
UPDATED BLUF: Implementing isolcpus=2,3 further reduced latency by a factor of 2, and subsequently re-enabling WIFI and doing audio streaming increased latency by a minimal amount.
Thanks to the extensive archives of latency discussions here, I was able to reduce the latency of installed 2.8.4 running on a Dell XPS 8500 from horrible to pretty good, so I figured posting what happened at each step might be helpful to some. The PC has 4x Intel i5-3450 3.10GHz CPUs and 16.0GB of installed RAM, a PCI-E parallel card , and had a PCI-E graphics card at the start of the latency testing.
INITIAL (18 Mar 2023):
0) Baseline: 1x glxgears, audio streaming > 1hr > max jitter base thread = 1,468,576.
1) Disabled "Intel SpeedStep" and "Intel Virtualization" in BIOS: 2x glxgears, audio streaming > 3hr > max jitter base thread = 1,489,268.
2) Disabled onboard LAN controller in BIOS: 3x glxgears, audio streaming > 3hr > max jitter base thread = 1,409,824.
3) Removed PCI-E graphics card, and went to onboard VGA: 3x glxgears, audio streaming > 5hr > max jitter base thread = 67,200.
4) Unclicked "enable networking" in LinuxCNC: 3x glxgears, no streaming (duh) > 8hr > max jitter base thread = 13,305.
UPDATE (19 Mar 2023):
5) Implemented isolcpus=2,3: 4x glxgears > 5hr > max jitter base thread = 6,288.
6) Re-enabled networking: 3x glxgears, audio streaming > 3hr > max jitter base thread = 6,674.
So, one can see that for this setup, removing the PCI-E graphics card reduced latency by a factor of 20, and disabling WIFI reduced latency by a factor of 5.
There were some artifacts in the glxgears presentation while running after removing the PCI-E graphics card (a "crack" running across the bottom of the lowest gear, roughly the same spot in each of the three instances), but as long as I don't see any issues in normal operation, I don't plan to do anything about that.
I hope this is of some help to others. If there are some details of the setup I should add, please let me know.
Regards,
Scrappy
INITIAL BLUF: Removing the PCI-E graphics card reduced latency by a factor of 20, and disabling WIFI reduced latency by a factor of 5.
UPDATED BLUF: Implementing isolcpus=2,3 further reduced latency by a factor of 2, and subsequently re-enabling WIFI and doing audio streaming increased latency by a minimal amount.
Thanks to the extensive archives of latency discussions here, I was able to reduce the latency of installed 2.8.4 running on a Dell XPS 8500 from horrible to pretty good, so I figured posting what happened at each step might be helpful to some. The PC has 4x Intel i5-3450 3.10GHz CPUs and 16.0GB of installed RAM, a PCI-E parallel card , and had a PCI-E graphics card at the start of the latency testing.
INITIAL (18 Mar 2023):
0) Baseline: 1x glxgears, audio streaming > 1hr > max jitter base thread = 1,468,576.
1) Disabled "Intel SpeedStep" and "Intel Virtualization" in BIOS: 2x glxgears, audio streaming > 3hr > max jitter base thread = 1,489,268.
2) Disabled onboard LAN controller in BIOS: 3x glxgears, audio streaming > 3hr > max jitter base thread = 1,409,824.
3) Removed PCI-E graphics card, and went to onboard VGA: 3x glxgears, audio streaming > 5hr > max jitter base thread = 67,200.
4) Unclicked "enable networking" in LinuxCNC: 3x glxgears, no streaming (duh) > 8hr > max jitter base thread = 13,305.
UPDATE (19 Mar 2023):
5) Implemented isolcpus=2,3: 4x glxgears > 5hr > max jitter base thread = 6,288.
6) Re-enabled networking: 3x glxgears, audio streaming > 3hr > max jitter base thread = 6,674.
So, one can see that for this setup, removing the PCI-E graphics card reduced latency by a factor of 20, and disabling WIFI reduced latency by a factor of 5.
There were some artifacts in the glxgears presentation while running after removing the PCI-E graphics card (a "crack" running across the bottom of the lowest gear, roughly the same spot in each of the three instances), but as long as I don't see any issues in normal operation, I don't plan to do anything about that.
I hope this is of some help to others. If there are some details of the setup I should add, please let me know.
Regards,
Scrappy
Last edit: 19 Mar 2023 20:22 by Scrappy_000. Reason: Implemented additional changes that further improved performance.
The following user(s) said Thank You: tommylight, zz912
Please Log in or Create an account to join the conversation.
18 Mar 2023 13:00 #266995
by rodw
Replied by rodw on topic Latency Reduction Success Story for Dell XPS 8500 Running 2.8.4
Very interesting.
Perhaps you could try adding isolcpus=2,3 which should also improve performance.
If you are still experimenting. you might like to try Debian Bookworm per my post today
forum.linuxcnc.org/9-installing-linuxcnc...g-installation-notes
This improved latency 6.5 times for me over my much earlier install of 2.8 as shown in the screen dump.
Perhaps you could try adding isolcpus=2,3 which should also improve performance.
If you are still experimenting. you might like to try Debian Bookworm per my post today
forum.linuxcnc.org/9-installing-linuxcnc...g-installation-notes
This improved latency 6.5 times for me over my much earlier install of 2.8 as shown in the screen dump.
The following user(s) said Thank You: Scrappy_000
Please Log in or Create an account to join the conversation.
- Scrappy_000
- Topic Author
- Offline
- New Member
Less
More
- Posts: 19
- Thank you received: 8
18 Mar 2023 19:26 #267023
by Scrappy_000
Replied by Scrappy_000 on topic Latency Reduction Success Story for Dell XPS 8500 Running 2.8.4
Thanks for the suggestions, rodw! For my needs and with the limitations of my skillset in the context of LinuxCNC, though, I think I'm going to leave well enough alone for now.
A whole lot of the discussions and procedures here require a knowledge base that I simply don't have yet, so there are many things I don't feel confident in going through, and the Debian Bookworm setup fits into that category. WRT isolcpus, even with lots of mining the archives/discussions and looking at this in the documentation wiki , the process is not immediately obvious to me (Just edit the file? Edit the file and run commands? Copy other file(s) from who knows where and then run commands? Simultaneously utter a mantra?), so I'm not inclined to start poking around with it.
A man's got to know his limitations.
A whole lot of the discussions and procedures here require a knowledge base that I simply don't have yet, so there are many things I don't feel confident in going through, and the Debian Bookworm setup fits into that category. WRT isolcpus, even with lots of mining the archives/discussions and looking at this in the documentation wiki , the process is not immediately obvious to me (Just edit the file? Edit the file and run commands? Copy other file(s) from who knows where and then run commands? Simultaneously utter a mantra?), so I'm not inclined to start poking around with it.
A man's got to know his limitations.
The following user(s) said Thank You: rodw
Please Log in or Create an account to join the conversation.
18 Mar 2023 20:14 #267026
by rodw
Replied by rodw on topic Latency Reduction Success Story for Dell XPS 8500 Running 2.8.4
Fair enough. Stay where you are. YOu should still benefit from isolcpus
isolcpus is done in the grub settings. Whilst it is possible to do to do it by editing text files and using update-grub, the much easier way is to use grub-customizer which appears to be in the repos for buster
Currently this is covered in points 21-23 of my Bookworm instructions
docs.google.com/document/d/1jeV_4VKzVmOI...diY/edit?usp=sharing
Reboot afterwards
If you get it wrong, you should be able to still boot using the grub recovery options in the grub menu on startup and re-edit using grub-customizzer.
I prefer not to get it wrong!
Just so you are aware, what isolcpus does is it isolates 2 of the 4 cores on your CPU to be used solely for real time threads and all the user space stuff and general linux house keeping is locked to the non isolated cores. AS\s a result, the linuxcnc servo thread and base thread (if used) have a lot less traffic to negotiate so perform better as they have a couple of express lanes on a 4 lane highway.
isolcpus is done in the grub settings. Whilst it is possible to do to do it by editing text files and using update-grub, the much easier way is to use grub-customizer which appears to be in the repos for buster
sudo apt install grub-customizer
sudo grub-customizer
Currently this is covered in points 21-23 of my Bookworm instructions
docs.google.com/document/d/1jeV_4VKzVmOI...diY/edit?usp=sharing
Reboot afterwards
If you get it wrong, you should be able to still boot using the grub recovery options in the grub menu on startup and re-edit using grub-customizzer.
I prefer not to get it wrong!
Just so you are aware, what isolcpus does is it isolates 2 of the 4 cores on your CPU to be used solely for real time threads and all the user space stuff and general linux house keeping is locked to the non isolated cores. AS\s a result, the linuxcnc servo thread and base thread (if used) have a lot less traffic to negotiate so perform better as they have a couple of express lanes on a 4 lane highway.
The following user(s) said Thank You: Scrappy_000, energien
Please Log in or Create an account to join the conversation.
- Scrappy_000
- Topic Author
- Offline
- New Member
Less
More
- Posts: 19
- Thank you received: 8
18 Mar 2023 20:23 #267027
by Scrappy_000
Replied by Scrappy_000 on topic Latency Reduction Success Story for Dell XPS 8500 Running 2.8.4
Thanks for the straightforward instructions, rodw! I'll update this discussion with the results if I do isolcpus.
The following user(s) said Thank You: rodw
Please Log in or Create an account to join the conversation.
- Scrappy_000
- Topic Author
- Offline
- New Member
Less
More
- Posts: 19
- Thank you received: 8
19 Mar 2023 20:26 #267104
by Scrappy_000
Replied by Scrappy_000 on topic Latency Reduction Success Story for Dell XPS 8500 Running 2.8.4
Well, I figured if I screwed something up while attempting to implement isolcpus, I would not have lost much time if I had to start at zero again, so I went ahead with it.
Further success! The max jitter base thread now stands at 6,674.
Further success! The max jitter base thread now stands at 6,674.
The following user(s) said Thank You: rodw
Please Log in or Create an account to join the conversation.
20 Mar 2023 07:32 #267117
by rodw
Replied by rodw on topic Latency Reduction Success Story for Dell XPS 8500 Running 2.8.4
Great results. Glad you gathered up the courage to give it a go...Further success! The max jitter base thread now stands at 6,674.
The following user(s) said Thank You: Scrappy_000
Please Log in or Create an account to join the conversation.
Time to create page: 0.080 seconds