Tuesday, January 31, 2023

Check NVIDIA GPU NUMA Affinity

> nvidia-smi topo -m
        GPU0    CPU Affinity    NUMA Affinity
GPU0     X      64-127,192-254  1

Legend:

  X    = Self
  SYS  = Connection traversing PCIe as well as the SMP interconnect between NUMA nodes (e.g., QPI/UPI)
  NODE = Connection traversing PCIe as well as the interconnect between PCIe Host Bridges within a NUMA node
  PHB  = Connection traversing PCIe as well as a PCIe Host Bridge (typically the CPU)
  PXB  = Connection traversing multiple PCIe bridges (without traversing the PCIe Host Bridge)
  PIX  = Connection traversing at most a single PCIe bridge
  NV#  = Connection traversing a bonded set of # NVLinks

Friday, January 27, 2023

Centos9 NVIDIA drivers

  • dnf makecache
  • dnf config-manager --set-enabled crb
  • dnf install epel-release epel-next-release -y
  • dnf makecache
  • dnf install -y kernel-headers kernel-devel tar bzip2 make automake gcc gcc-c++ pciutils elfutils-libelf-devel libglvnd-opengl libglvnd-glx libglvnd-devel acpid pkgconfig dkms
  • dnf config-manager --add-repo http://developer.download.nvidia.com/compute/cuda/repos/rhel9/$(uname -i)/cuda-rhel9.repo
  • dnf makecache
  • dnf module install -y nvidia-driver
  • dnf install -y nvtop clinfo

(dnf module install nvidia-driver:latest-dkms) 


https://linuxhint.com/install-nvidia-drivers-centos/

Sunday, October 23, 2022

Fedora turn off zram swap

swapoff /dev/zram0; zramctl --reset /dev/zram0
yum remove zram-generator-defaults -y
touch /etc/systemd/zram-generator.conf

Saturday, October 22, 2022

Install NVIDIA drives Fedora

dnf install   https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm -y

dnf install   https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm -y

dnf update -y

reboot

#fedora 38
dnf module disable nvidia-driver

dnf install akmod-nvidia xorg-x11-drv-nvidia-cuda clinfo nvtop -y

reboot

clinfo

 

 

dnf upgrade --refresh
dnf autoremove nvidia* --purge
dnf config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/fedora37/x86_64/cuda-fedora37.repo
dnf install kernel-headers kernel-devel tar bzip2 make automake gcc gcc-c++ pciutils elfutils-libelf-devel libglvnd-opengl libglvnd-glx libglvnd-devel acpid pkgconfig dkms
dnf module install nvidia-driver:latest-dkms

Trim all flash drive HBA

 NVME SSD

  • nvme format /dev/nvme0n1

SATA/SAS SSD

  • blkdiscard /dev/sda

Sunday, July 17, 2022

Find flags with which a file was opened

 lsof +fg /chia/scratch/disk01/subspace/plot3/plot-index-to-offset/000017.sst
COMMAND      PID         USER   FD   TYPE FILE-FLAG DEVICE SIZE/OFF        NODE NAME
subspace- 134267 srv_subspace  273r   REG     LG,CX  254,6 67377874 45101533594 /chia/scratch/disk01/subspace/plot3/plot-index-to-offset/000017.sst

 

# man lsof |grep "Flag in C code" -A 21
                          Abbrev.   Flag in C code (see open(2))

                          W         O_WRONLY
                          RW        O_RDWR
                          CR        O_CREAT
                          EXCL      O_EXCL
                          NTTY      O_NOCTTY
                          TR        O_TRUNC
                          AP        O_APPEND
                          ND        O_NDELAY
                          SYN       O_SYNC
                          ASYN      O_ASYNC
                          DIR       O_DIRECT
                          DTY       O_DIRECTORY
                          NFLK      O_NOFOLLOW
                          NATM      O_NOATIME
                          DSYN      O_DSYNC
                          RSYN      O_RSYNC
                          LG        O_LARGEFILE
                          CX        O_CLOEXEC
                          TMPF      O_TMPFILE

Wednesday, June 15, 2022

Blacklist Nouveau to install NVIDIA native GPU drivers

 

  • Create the /usr/lib/modprobe.d/blacklist-nouveau.conf file and add the following information to the file.

    blacklist nouveau

    options nouveau modeset=0

  • Re-generate initramfs.

    $sudo dracut --force

     

     

     

    https://support.huawei.com/enterprise/en/doc/EDOC1100165479/93fe5683/how-to-disable-the-nouveau-driver-for-different-linux-systems

Saturday, March 5, 2022

FFMPEG on Fedora 34

dnf install \
https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm \
https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm

dnf update

dnf search ffmpeg

dnf install ffmpeg

 

https://www.cyberciti.biz/faq/how-to-install-ffmpeg-on-fedora-linux-using-dnf/

Sunday, December 26, 2021

Connect iPhone to Fedora

> install ifuse libimobiledevice-utils usbmuxd -y
> usbmuxd -f -v
> idevicepair pair      (you need to accept on your phone to trust)
> ifuse /mnt

TADA :-)

 

https://www.dedoimedo.com/computers/linux-iphone-6s-ios-11.html

 

 

Wednesday, October 13, 2021

Use Intel pstate instead of acpi cpufreq driver

 GRUB_CMDLINE_LINUX_DEFAULT="intel_pstate=enable quiet splash"

https://www.kernel.org/doc/html/latest/admin-guide/pm/intel_pstate.html

Monday, July 19, 2021

Add dummy NIC as service

echo "MACADDR=56:12:b6:2a:aa:34" > /etc/sysconfig/dummy

vim /etc/systemd/system/dummy@.service 

# Remember to run `systemctl daemon-reload` after creating or editing this file.

[Unit]
Description=Dummy network interface for %i
After=network.target

[Service]
Type=oneshot
RemainAfterExit=yes
EnvironmentFile=/etc/sysconfig/%i-dummy
ExecStartPre=/sbin/ip link add %i-dummy address ${MACADDR} type dummy

[Install]
WantedBy=multi-user.target
 
systemctl daemon-reload
systemctl enable dummy@foo.service
systemctl start dummy@foo.service


source:  https://jamielinux.com/docs/libvirt-networking-handbook/appendix/dummy-interface-on-fedora.html