Skip to content

Instantly share code, notes, and snippets.

@kay21s
kay21s / PCIE NUMA AFFINITY
Last active December 1, 2021 08:02
PCIE NUMA AFFINITY
NIC:
-----------------------------------------------------------------
1) cat /sys/class/net/[interface]/device/numa_node
[interface] = eth6 ...
eth6 eth7 -> node 1
eth8 eth9 -> node 0
@kay21s
kay21s / Load CUDA Library
Last active August 29, 2015 14:05
When a library cannot be loaded
For example:
./bandwidthTest: error while loading shared libraries:
libcudart.so.4: cannot open shared object file:
No such file or directory
sudo ldconfig /usr/local/cuda/lib64
find /lib/modules/`uname -r` -name '*.ko' | grep nvidia
modinfo /lib/modules/3.13.0-35-generic/updates/dkms/nvidia_331.ko
modinfo nvidia
sudo dkms install -m nvidia -v 340.29 -k $(uname -r)
http://stackoverflow.com/questions/23067320/no-cuda-capable-device-is-detected-using-ubuntu-12-04-4-server
https://wiki.archlinux.org/index.php/Dynamic_Kernel_Module_Support
@kay21s
kay21s / install package in mactex
Last active August 29, 2015 14:05
install package in mactex
sudo tlmgr install [subfigure]
@kay21s
kay21s / gist:711962198f0fc15d0e3a
Last active August 29, 2015 14:04
power_saving
1) Disable Logical Processor in the BIOS
2) unload the acpi_pad module by running “rmmod acpi_pad”
3) Use a kernel parameter at boot time to prevent acpi_pad module from loading on server boot up. Append “acpi_pad.disable=1” to the kernel line
For Ubuntu:
http://askubuntu.com/questions/160036/how-do-i-disable-acpi-when-booting
/usr/src/linux-headers-3.13.0-30-generic/include
sudo ln -s /usr/src/linux-headers-3.13.0-30/arch/x86/include/asm ./asm
sudo ln -s /usr/src/linux-headers-3.13.0-30/arch/x86/include/uapi ./uapi
/usr/src/linux-headers-3.13.0-30/arch/x86/include/uapi
ethtool -C eth1 rx-usecs 0
++ Check which node the device belongs to ++
cat /sys/class/net/xge1/device/numa_node
cat /sys/class/net/xge1/device/local_cpus
@kay21s
kay21s / dpdk
Last active August 29, 2015 14:04
dpdk
export RTE_SDK=~/dpdk-1.7.1
export RTE_TARGET=x86_64-native-linuxapp-gcc
sudo ./build/l2fwd -c f -n 1 -- -q 1 -p 1
sudo ./build/rx -c f -n 1 -- -q 1 -p 1
sudo ./build/tx -c f -n 1 -- -q 1 -p 1
sudo ./build/rt -c f -n 1 -- -q 1 -p 1
sudo ./build/tx -c 0x2 -n 1 --file-prefix p2 -m 64 -- -q 1 -p 1
sudo ./build/rx -c 0x1 -n 1 --file-prefix p1 -m 64 -- -q 1 -p 1
python -m pdb myscript.py arg1 arg2 ...
@kay21s
kay21s / gist:ed56c9c30dc5ea2a7cb6
Created July 6, 2014 21:02
reinstall nvidia driver in ubuntu
sudo apt-get --purge remove nvidia-*
sudo add-apt-repository ppa:ubuntu-x-swat/x-updates
sudo apt-get update
sudo apt-get install nvidia-current nvidia-settings