Linux

Finally some hardware support!

Kernel

  • added ebpf netkit in 6.8 (faster than virtual eth)
  • removed sysctl system call in 5.5
  • io-uring
    • io-uring-spawn for process launching
  • /proc/cpuinfo for model
  • abi tracker https://abi-laboratory.pro/?view=timeline&l=linux
  • /etc/sysctl.d/90-override.conf changes
    • net.core.rmem_max = 4194304 for UDP transmission receive buffer
    • net.core.wmem_max = 1048576 for UDP transmission send buffer
    • vm.max_map_count = 2147483642 increase memory maps for certain games/apps
      • fs.inotify.max_user_watches=524288 podman log line?
      • fs.inotify.max_user_instances=512 podman log line?
    • fs.aio-max-nr=67108864 increase max async requests

pam

misc

  • faillock --user $USER --reset for attempt reset
  • LD_LIBRARY_PATH and LD_PRELOAD environment variables override library location and load order respectively.
    • LD_DEBUG=libs to monitor dlopen (redirect stderr for cli 2>err.txt) LD_DEBUG=files:
    • readelf -d to check the dynamic section of the elf for rpath (searched before library path) or runpath (searched after library path) or FLAGS such as NODEFLIB
      • each shared lib is searched for in the following order: rpath, libary path, runpath, ld cache, system lib (skipped if compiled with ld -z nodefaultlib)
  • strace for system call debugging
  • smartctl or gsmartcontrol and nvme smart-log /dev/nvme0 for disk stats
  • iftop for network interface rates
  • netconsole can be configured for last gasp udp packet sending(spanner, titus)
  • /usr/lib/ld-linux-x86-64.so.2 --help to check for x86_64-v3
  • ethtool -N eth2 rx-flow-hash udp4 sdfn nic to send packets to same thread as ip:port sender
  • set SO_ADDRREUSE and SO_SOCKETREUSE on socket creation to allow multiple binds
  • set huge page size to reduce pressure on the the translation buffer (TLB)
    • GRUB_CMDLINE_LINUX="default_hugepagesz=1G hugepagesz=1G hugepages=0:8,1:8" where hugepages is numanode:amount_of_pages
    • TLB uses an address spaced identifier id (ASID) for processes to void flushing TLB cache
      • 12 bit so many procs will force a flush
  • get cache line size with getconf LEVEL1_DCACHE_LINESIZE or lscpu