Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- Main() {
- read Algo </sys/block/zram0/comp_algorithm
- Swappiness=$(/sbin/sysctl -a 2>/dev/null | awk -F" = " '/vm.swappiness/ {print $2}')
- RunTest
- case ${Swappiness} in
- 100)
- sed -i 's/vm.swappiness=100/vm.swappiness=80/' /etc/sysctl.conf
- sync
- reboot
- ;;
- 80)
- sed -i 's/vm.swappiness=80/vm.swappiness=60/' /etc/sysctl.conf
- sync
- reboot
- ;;
- 60)
- sed -i 's/vm.swappiness=60/vm.swappiness=40/' /etc/sysctl.conf
- sync
- reboot
- ;;
- esac
- }
- RunTest() {
- CountOfCores=$(grep -c processor /proc/cpuinfo)
- echo -e "$(date)\t${Swappiness}\t${CountOfCores}\t${Algo}\t\c" >>zram-test.log
- if [ -d ComputeLibrary-18.03 ]; then
- rm -rf ComputeLibrary-18.03
- fi
- tar xvf v18.03.tar.gz
- cd ComputeLibrary-18.03/
- grep -r "lala" *
- (time scons Werror=1 -j8 debug=0 neon=1 opencl=1 embed_kernels=1 os=linux arch=arm64-v8a build=native) 2>&1 | grep "^real" >>../zram-test.log
- }
- cd /home/tk
- sleep 30
- Main
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement