Farsight is a neural network based kernel level far memory prefetcher, it utilizes the far memory IO time to perform model computation and make prefetch decision. check out our blog and arxiv for more details
No need to install OFED, we use RDMA drivers from kernel sources
git build-essential kernel-package fakeroot libncurses5-dev libssl-dev libelf-dev ccache bison flex libpci-dev dwarves
libz-dev libelf-dev binutils-dev libreadline-dev clang llvm
cmake python3-venv python3-pybind11
cmake g++ g++-multilib doxygen git zlib1g-dev libunwind-dev libsnappy-dev liblz4-dev
systemd.unified_cgroup_hierarchy=1 intel_pstate=passive transparent_hugepage=madvise
systemd.unified_cgroup_hierarchy=1 -> enable cgroup v2, which allow memory.high swap out
intel_pstate=passive -> enable intel_cpufreq cpu frequency driver for custom cpu frequency
- run tracer with
./tracer/run.sh <output directory> <command> [args..] - parse the trace
./tracer/parse.sh <trace binary file> <output file> - build the dataset
./model_py/build_dataset.sh <target directory> <dict_size, e.g. 64> <train_file> <val_file> - train the model
python3 ./model_py/train.py <dataset directory> --batch_size=# - model will be ready under
./model_py/model_<name>_layer#.pt
./linux-5.14/build_kernel.sh build./linux-5.14/build_kernel.sh install- check if grub has
intel_pstate=passive transparent_hugepage=madvise intel_iommu=off systemd.unified_cgroup_hierarchy=1 - if updated, run
sudo update-grub - reboot
- go to
./client/and make - on the server:
sudo ./rdma_startup.sh server_start sudo ./rdma_startup.sh client_start(server side is using huge page otherwise connection may timeout, if connection failed, may need to restart server to reset fragmentation)
sudo python3 set_cpu_frequency.py 2100echo 3 | sudo tee /proc/sys/vm/drop_cachesto drop all page cachesudo python3 app_launcher.py -c <thread count> --model <model path> -- /usr/bin/time -v python3 <app command>- use
cat /sys/fs/cgroup/farsight/memory.statto check some stats sudo rmdir /sys/fs/cgroup/farsight/before running another experiment