A grep like command line text search tool implemented using x-search library
git clone https://github.com/lfreist/xsgrep
cd xsgrep
make build
make test
Important:
Check
drop_cache.c
s content before running the listed commands.drop_cache
should only do the following:
- create a valid file descriptor to "/proc/sys/vm/drop_caches" in write mode
- write a single byte ('3') to the file descriptor Done. Nothing more, nothing less!
Please run the following commands before running benchmarks:
gcc drop_cache.c -o drop_cache
sudo chown root:root drop_cache
sudo chmod +s drop_cache
ln -s drop_cache $HOME/drop_cache
Explanation:
Running benchmarks requires permissions to drop the RAMs cache. However, (for good reasons) it requires root privileges to do so. We DO NOT want to run the full benchmark as root. Therefore, we compile a little program (
drop_cache.c
) that performs the RAM cache drop. This program (and nothing else) must run as root. Therefore, we set the mod of the file to always be executes as root.
Now, run the benchmarks: make benchmark