Advertisement
jimklimov

heatcache-mpool

Nov 27th, 2019
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.42 KB | None | 0 0
  1. heatcache-mpool() (
  2. # Get both metadata (directory contents including fstat() details)
  3. # and shared-cache data the server serves over NFS into SSD L2ARC
  4. # cache after reboots etc.
  5. # Note: run this a few times in the background with some time offset
  6. # to convince ZFS that the data blocks are MRU/MFU'ed several times
  7. # so should be cached at some layer and not just evicted.
  8. TSH="`date -u`"
  9. TSS="`date -u +%s`"
  10. for D in \
  11. /mpool/.ccache* /mpool/jenkins-gitcache/ \
  12. ; do
  13. ( time du -ks $D/ && echo "^^^ sized $D/") &
  14. ( time find $D/ -ls > /dev/null && echo "^^^ listed $D/") &
  15. ( time find $D/ -type f -exec cat '{}' \; > /dev/null && echo "^^^ cat all in $D/") &
  16. done
  17. wait
  18. RES=$?
  19.  
  20. TEH="`date -u`"
  21. TES="`date -u +%s`"
  22.  
  23. echo "Caches heated ($RES) from $TSH to $TEH, overall `$(($TES-$TSS))` sec"
  24.  
  25. exit $RES
  26. )
  27.  
  28. =================
  29.  
  30. capacity operations bandwidth
  31. pool alloc free read write read write
  32. ------------------------- ----- ----- ----- ----- ----- -----
  33. mpool 1.28T 1.44T 18 75 797K 494K
  34. mirror 1.28T 1.44T 18 64 797K 449K
  35. c1t50014EE264023A89d0 - - 10 39 529K 452K
  36. c1t50014EE2B957E767d0 - - 8 39 268K 452K
  37. logs - - - - - -
  38. c1t5002538E407750E1d0s3 236K 4.00G 0 11 0 44.8K
  39. cache - - - - - -
  40. c1t5002538E407750E1d0s5 19.3G 181G 85 0 3.33M 0
  41.  
  42.  
  43.  
  44.  
  45.  
  46. capacity operations bandwidth
  47. pool alloc free read write read write
  48. ------------------------- ----- ----- ----- ----- ----- -----
  49. mpool 1.28T 1.44T 121 0 4.67M 0
  50. mirror 1.28T 1.44T 121 0 4.67M 0
  51. c1t50014EE264023A89d0 - - 59 0 2.41M 0
  52. c1t50014EE2B957E767d0 - - 62 0 2.26M 0
  53. logs - - - - - -
  54. c1t5002538E407750E1d0s3 300K 4.00G 0 0 0 0
  55. cache - - - - - -
  56. c1t5002538E407750E1d0s5 18.6G 181G 148 0 4.41M 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement