Difference between revisions of "Internet Offline: mysqlslap script"

From OnnoWiki
Jump to navigation Jump to search
(Created page with " rm echo 123456 | sudo -S 'mysqlslap -h localhost -u root -p123456 --auto-generate-sql' echo 123456 | sudo -S 'mysqlslap -h localhost -u root -p123456 --auto-generate-sq...")
 
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
  
 +
===Script mysqlslap-test.sh===
  
  rm   
+
  rm -Rf hasil-mysqlslap-test.txt
  echo 123456 | sudo -S 'mysqlslap -h localhost -u root -p123456 --auto-generate-sql'
+
  touch hasil-mysqlslap-test.txt
  echo 123456 | sudo -S 'mysqlslap -h localhost -u root -p123456 --auto-generate-sql --concurrency=100  --number-of-queries=1'
+
  echo 'default' >> hasil-mysqlslap-test.txt
  echo 123456 | sudo -S 'mysqlslap -h localhost -u root -p123456 --auto-generate-sql --concurrency=100  --number-of-queries=10000'
+
mysqlslap -h localhost -u root -p123456 --auto-generate-sql >> hasil-mysqlslap-test.txt
  echo 123456 | sudo -S 'mysqlslap -h localhost -u root -p123456 --auto-generate-sql --concurrency=100  --number-of-queries=10000 --iterations=5'
+
  echo 123456 | sudo -S 'mysqlslap -h localhost -u root  -p123456 --auto-generate-sql --concurrency=100 --number-of-queries=1000 --engine=innodb'
+
  echo 'number-of-queries=1' >> hasil-mysqlslap-test.txt
  echo 123456 | sudo -S 'mysqlslap -h localhost -u root  -p123456 --auto-generate-sql --concurrency=100 --number-of-queries=1000 --engine=myisam'
+
mysqlslap -h localhost -u root -p123456 --auto-generate-sql --concurrency=100  --number-of-queries=1 >> hasil-mysqlslap-test.txt
 +
 +
  echo 'number-of-queries=10000' >> hasil-mysqlslap-test.txt
 +
mysqlslap -h localhost -u root -p123456 --auto-generate-sql --concurrency=100  --number-of-queries=10000 >> hasil-mysqlslap-test.txt
 +
 +
  echo 'number-of-queries=10000 --iterations=5' >> hasil-mysqlslap-test.txt
 +
mysqlslap -h localhost -u root -p123456 --auto-generate-sql --concurrency=100  --number-of-queries=10000 --iterations=5 >> hasil-mysqlslap-test.txt
 +
 +
  echo 'umber-of-queries=1000 --engine=innodb' >> hasil-mysqlslap-test.txt
 +
mysqlslap -h localhost -u root  -p123456 --auto-generate-sql --concurrency=100 --number-of-queries=1000 --engine=innodb >> hasil-mysqlslap-test.txt
 +
 +
  echo 'number-of-queries=1000 --engine=myisam' >> hasil-mysqlslap-test.txt
 +
mysqlslap -h localhost -u root  -p123456 --auto-generate-sql --concurrency=100 --number-of-queries=1000 --engine=myisam >> hasil-mysqlslap-test.txt
 +
mv hasil-mysqlslap-test.txt hasil-mysqlslap-1CORE-512M.txt
 +
shutdown -h now
  
 +
 +
==Client==
 +
 +
VBoxManage controlvm "Offline" acpipowerbutton
 +
sleep 30
 +
VBoxManage modifyvm "Offline" --memory 512
 +
VBoxManage modifyvm "Offline" --unplugcpu 3
 +
VBoxManage modifyvm "Offline" --unplugcpu 2
 +
VBoxManage modifyvm "Offline" --unplugcpu 1
 +
VBoxManage startvm "Offline"
 +
sleep 110
 +
ssh onno@192.168.0.2 'echo 123456 | sudo -S /home/onno/mysqlslap-1CORE-512M.sh'
  
 
==Pranala Menarik==
 
==Pranala Menarik==
  
 
* [[Internet Offline]]
 
* [[Internet Offline]]

Latest revision as of 14:56, 18 December 2018

Script mysqlslap-test.sh

rm -Rf hasil-mysqlslap-test.txt
touch hasil-mysqlslap-test.txt
echo 'default' >> hasil-mysqlslap-test.txt
mysqlslap -h localhost -u root -p123456 --auto-generate-sql >> hasil-mysqlslap-test.txt

echo 'number-of-queries=1' >> hasil-mysqlslap-test.txt
mysqlslap -h localhost -u root -p123456 --auto-generate-sql --concurrency=100  --number-of-queries=1 >> hasil-mysqlslap-test.txt

echo 'number-of-queries=10000' >> hasil-mysqlslap-test.txt
mysqlslap -h localhost -u root -p123456 --auto-generate-sql --concurrency=100  --number-of-queries=10000 >> hasil-mysqlslap-test.txt

echo 'number-of-queries=10000 --iterations=5' >> hasil-mysqlslap-test.txt 
mysqlslap -h localhost -u root -p123456 --auto-generate-sql --concurrency=100  --number-of-queries=10000 --iterations=5 >> hasil-mysqlslap-test.txt

echo 'umber-of-queries=1000 --engine=innodb'  >> hasil-mysqlslap-test.txt 
mysqlslap -h localhost -u root  -p123456 --auto-generate-sql --concurrency=100 --number-of-queries=1000 --engine=innodb >> hasil-mysqlslap-test.txt

echo 'number-of-queries=1000 --engine=myisam' >> hasil-mysqlslap-test.txt 
mysqlslap -h localhost -u root  -p123456 --auto-generate-sql --concurrency=100 --number-of-queries=1000 --engine=myisam >> hasil-mysqlslap-test.txt
mv hasil-mysqlslap-test.txt hasil-mysqlslap-1CORE-512M.txt
shutdown -h now


Client

VBoxManage controlvm "Offline" acpipowerbutton
sleep 30
VBoxManage modifyvm "Offline" --memory 512
VBoxManage modifyvm "Offline" --unplugcpu 3
VBoxManage modifyvm "Offline" --unplugcpu 2
VBoxManage modifyvm "Offline" --unplugcpu 1
VBoxManage startvm "Offline"
sleep 110
ssh onno@192.168.0.2 'echo 123456 | sudo -S /home/onno/mysqlslap-1CORE-512M.sh'

Pranala Menarik