Advertisement
Guest User

Untitled

a guest
Jul 6th, 2015
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. #!/usr/bin/env sh
  2. # init containers
  3. test -e /cgroups/blkio/weight1-test || mkdir /cgroups/blkio/weight1-test
  4. echo 1000 /cgroups/blkio/weight1-test/blkio.weight
  5. test -e /cgroups/blkio/weight2-test || mkdir /cgroups/blkio/weight2-test
  6. echo 500 /cgroups/blkio/weight2-test/blkio.weight
  7.  
  8. # generate big files
  9.  
  10. dd if=/dev/zero of=bigfile bs=10M count=1024
  11.  
  12. # launch read test
  13. dd if=bigfile of=/dev/null iflag=direct &
  14. echo $! > /cgroups/blkio/weight1-test/tasks
  15. cat /cgroups/blkio/weight1-test/tasks
  16. dd if=bigfile of=/dev/null iflag=direct&
  17. echo $! > /cgroups/blkio/weight2-test/tasks
  18. cat /cgroups/blkio/weight2-test/tasks
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement