booster for old cpu :)

janos66

Dabbler
Joined
Feb 18, 2022
Messages
21
Hi,

I'm so far very satisfied with my switch to Scale.
It can't be called a migration, because the upgrade from Core didn't work, but it's not a final version yet, so nothing to blame here.
Many thanks to the development team!

Before I put the system into operation, I would be happy to clarify one more questions.

I have an older Intel Xeon E5-2660v3 system, it’s a private installation and has only internet access during updates, hence it is save for me to disable all mitigations for cpu vulnerabilities.

I have added “mitigation=off” to “/usr/local/bin/truenas-grub.py”
Code:
'GRUB_CMDLINE_LINUX_DEFAULT="mitigations=off libata.allow_tpm=1 systemd.unified_cgroup_hierarchy=0 amd_iommu=on iommu=pt '


and executed
Code:
midclt call etc.generate initramfs

which came back with...
Code:
root@truenas[/mnt/store01/backup]# nano /usr/local/bin/truenas-grub.py                       
root@truenas[/mnt/store01/backup]# midclt call etc.generate initramfs
initramfs group not found
Traceback (most recent call last):
 File "/usr/lib/python3/dist-packages/middlewared/main.py", line 160, in call_method
   result = await self.middleware._call(message['method'], serviceobj, methodobj, params, app=self,
 File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1281, in _call
   return await methodobj(*prepared_call.args)
 File "/usr/lib/python3/dist-packages/middlewared/plugins/etc.py", line 349, in generate
   raise ValueError('{0} group not found'.format(name))
ValueError: initramfs group not found


and does not look right?
and then

Code:
root@truenas[/mnt/store01/backup]# midclt call etc.generate grub       
null


After a reboot I compered the outputs of spectre-meltdown-checker.sh
from before and after the change, but it made no difference, whats the correct way to disable all CPU mitigations?
 

Attachments

  • test-grup-mitigation.txt
    12.5 KB · Views: 108

NugentS

MVP
Joined
Apr 16, 2020
Messages
2,947
Not a clue, but why would you want to?
 

Ixian

Patron
Joined
May 11, 2015
Messages
218
Not a clue, but why would you want to?

Because on older CPUs like that the Intel mitigations for Spectre/etc. impose a pretty severe (20%+) performance penalty, I imagine. For a box that's not exposed outside controlled internal networks they are also mostly unnecessary.

That said I'm not sure this is something that is going to be easy to do unless Ix System supports it directly.
 

NugentS

MVP
Joined
Apr 16, 2020
Messages
2,947
That makes sense - still have no idea - but will watch with interest. I have 2 of the same CPU's along with two E5-2667v3's
 

dirtyfreebooter

Explorer
Joined
Oct 3, 2020
Messages
72
i am also interested in this and also need to add pci_pt_e820_access=on pci=assign-busses to workaround a dumb supermicro IOMMU issue on an older board. its something that you could previously do on core via tunables or /boot/loader.conf.local but since its works differently in linux, wish there was an advanced settings options to add kernel command line parameters
 

janos66

Dabbler
Joined
Feb 18, 2022
Messages
21
Hi,

two years ago with Proxmox on the same box, I had 33GB/s at iperf and 2.3GB/s with dd when writing to an SMB share.
There is a lack of performance without me gaining something, again this is a single user installation.

root@truenas[~]# ethtool -i enp4s0
driver: mlx4_en
version: 4.0-0
firmware-version: 2.42.5000
expansion-rom-version:
bus-info: 0000:04:00.0
supports-statistics: yes
supports-test: yes
supports-eeprom-access: no
supports-register-dump: no
supports-priv-flags: yes

root@truenas[~]# ethtool enp4s0
Settings for enp4s0:
Supported ports: [ FIBRE ]
Supported link modes: 1000baseKX/Full
10000baseKX4/Full
10000baseKR/Full
40000baseCR4/Full
40000baseSR4/Full
56000baseCR4/Full
56000baseSR4/Full
Supported pause frame use: Symmetric Receive-only
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 1000baseKX/Full
10000baseKX4/Full
10000baseKR/Full
40000baseCR4/Full
40000baseSR4/Full
Advertised pause frame use: Symmetric
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Link partner advertised link modes: 40000baseCR4/Full
Link partner advertised pause frame use: No
Link partner advertised auto-negotiation: Yes
Link partner advertised FEC modes: Not reported
Speed: 40000Mb/s
Duplex: Full
Auto-negotiation: on
Port: Direct Attach Copper
PHYAD: 0
Transceiver: internal
Supports Wake-on: d
Wake-on: d
Current message level: 0x00000014 (20)
link ifdown
Link detected: yes



[user ~]# iperf3 -c 10.0.90.6
Connecting to host 10.0.90.6, port 5201
[ 5] local 10.0.90.55 port 55722 connected to 10.0.90.6 port 5201
[ ID] Interval Transfer Bitrate Retr Cwnd
[ 5] 0.00-1.00 sec 3.22 GBytes 27.6 Gbits/sec 0 1.61 MBytes
[ 5] 1.00-2.00 sec 3.21 GBytes 27.6 Gbits/sec 0 1.79 MBytes
[ 5] 2.00-3.00 sec 3.23 GBytes 27.8 Gbits/sec 0 1.79 MBytes
[ 5] 3.00-4.00 sec 3.24 GBytes 27.8 Gbits/sec 0 1.79 MBytes
[ 5] 4.00-5.00 sec 3.24 GBytes 27.8 Gbits/sec 0 1.79 MBytes
[ 5] 5.00-6.00 sec 3.22 GBytes 27.7 Gbits/sec 0 1.98 MBytes
[ 5] 6.00-7.00 sec 3.20 GBytes 27.5 Gbits/sec 0 2.08 MBytes
[ 5] 7.00-8.00 sec 3.25 GBytes 27.9 Gbits/sec 0 2.08 MBytes
[ 5] 8.00-9.00 sec 3.25 GBytes 27.9 Gbits/sec 0 2.08 MBytes
[ 5] 9.00-10.00 sec 3.03 GBytes 26.1 Gbits/sec 0 2.08 MBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-10.00 sec 32.1 GBytes 27.6 Gbits/sec 0 sender
[ 5] 0.00-10.08 sec 32.1 GBytes 27.3 Gbits/sec receiver




[user ~]# dd if=/dev/zero of=/home/user/smb4k/NAS/backup/testfile bs=1G count=50
50+0 Datensätze ein
50+0 Datensätze aus
53687091200 Bytes (54 GB, 50 GiB) kopiert, 27,763 s, 1,9 GB/s
 

dirtyfreebooter

Explorer
Joined
Oct 3, 2020
Messages
72
so i was able to figure this out using the new cli tool in SCALE.
Code:
# cli
[truenas]> system advanced update kernel_extra_options="mitigations=off"
CTRL+D
# reboot

Updating the advance setting via the cli tool automatically updated grub. After reboot, lscpu reported all mitigations turned off.
 
Top