Tuesday, May 7, 2019

Disable ext4 journaling and enable trim ext4 and SSD

Confirm that journaling is enabled and trim mount option is missing (default mount options).
> tune2fs -l /dev/nvme0n1

...
Filesystem features:      has_journal ext_attr resize_inode dir_index filetype extent 64bit flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize
Filesystem flags:         signed_directory_hash
Default mount options:    user_xattr acl

...

> tune2fs -o discard /dev/nvme1n1
> tune2fs -O ^has_journal /dev/nvme1n1

Note that the ^ character is to toggle between enable/disable

> tune2fs -l /dev/nvme0n1

...
Filesystem features:      ext_attr resize_inode dir_index filetype extent 64bit flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize
Filesystem flags:         signed_directory_hash
Default mount options:    user_xattr acl discard

...

Wanted to install mainline kernel 5 on my CentOS

> yum -y install https://www.elrepo.org/elrepo-release-7.0-4.el7.elrepo.noarch.rpm
> rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
> yum --enablerepo=elrepo-kernel install kernel-ml
> yum -y --enablerepo=elrepo-kernel install kernel-ml-{devel,headers,perf}

After a reboot, I uninstalled all other kernel versions e.g.
> yum remove kernel 

(if you wanted to install a kernel with long term support choose *-lt instead of *-ml) 

Interesting M.2 to PCIe NVME adapter cards & Samsung 970 Evo Plus benchmark


I am actually using two of the EZDIY-FAB cards, the form factor really makes the difference to me, but I also tried the Silverstone and Vantec card
  • EZDIY-FAB Dual M.2 Adapter, M.2 PCIe NVMe and PCIe AHCI SSD to PCIe 3.0 x4 and M.2 SATA SSD to SATA III Adapter Card ($19 Amazon)
  • Silverstone SST-ECM22 Dual M.2 to PCIe x4 NVMe SSD and SATA 6 G Adapter Card with Advanced Cooling ($33 Newegg)
  •  Vantec M.2 NVMe/M.2 SATA SSD PCIe x4 Adapter ($19 Microcenter)
Also going to try the Jeyi card, I am interested to see if the claimed "high" quality components but still lowest price has any impact on performance
  • JEYI SK7 M.2 NVMe SSD NGFF To PCI-E X4 Adapter M Key B Key Dual Interface Card Support PCI-E3.0 Dual Voltage 12V+3.3V SATA3 ($9 AliExpress)
Using Iozone, I got these MB/S values for writing a 64GB file on a 500GB Samsung 970 Evo Plus, the values are averages of 6 test runs, mounted in the EZDIY-FAB cards, ext4, CentOS 7, Kernel 5.011-1. No ext4 optimizations enabled.



reclen KB write rewrite read reread random read random write
4 942 915 2647 2849 73 843
16 947 918 3019 3029 231 871
128 913 905 3019 3024 838 859

I think these values are not far off from what public sources report for example: https://www.tomshardware.com/reviews/samsung-970-evo-plus-ssd,5608.html


Bunch of comparable cards..

EZDIY-FAB Dual M.2 Adapter






Sunday, May 5, 2019

Saturday, May 4, 2019

Install Glances on CentOS

I really like Glances as a resource monitor for my Linux installation. Here is how to do:

> yum install -y epel-release
> yum install -y python-pip python-devel
> pip install --upgrade pip
> pip install glances

So we can run glances as a web service
> pip install bottle

I think I am going to try using Glances with Grafana: https://www.tecmint.com/install-glances-influxdb-grafana-to-monitor-centos-7/

Friday, May 3, 2019

Installing Iozone on CentOS 7


I followed these instructions: http://repoforge.org/use/


> yum install http://repository.it4i.cz/mirrors/repoforge/redhat/el7/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm

> yum install --enablerepo=rpmforge-extras iozone


Install from sources:
cd /opt
wget http://www.iozone.org/src/current/iozone3_490.tar
tar -xvf iozone3_490.tar
cd iozone3_490/src/current
make linux-AMD64


Thursday, May 2, 2019