Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 920898 Details for
Bug 850426
gfs2: Add xgetdents syscall to the kernel
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
Script to automate runs of xgetdents/dirreadahead syscalls and measure performance
perf-script (text/plain), 5.85 KB, created by
Abhijith Das
on 2014-07-25 08:08:37 UTC
(
hide
)
Description:
Script to automate runs of xgetdents/dirreadahead syscalls and measure performance
Filename:
MIME Type:
Creator:
Abhijith Das
Created:
2014-07-25 08:08:37 UTC
Size:
5.85 KB
patch
obsolete
>#!/usr/bin/sh > >VG=skolo >LV=250g >DEV=/dev/$VG/$LV >minor=$(lvdisplay /dev/skolo/50g | grep Block | cut -f2 -d':') >DM_DEV=dm-$minor >MNT=/mnt/gfs2 >TOPDIR=$MNT/foo >CREATOR=/root/creator >MKFS=/usr/sbin/mkfs.gfs2 >MOUNT=/usr/bin/mount >UMOUNT=/usr/bin/umount >LOGBASEDIR=/root/perf_run.$$ >MKDIR=/usr/bin/mkdir >RM=/usr/bin/rm >MODPROBE=/usr/sbin/modprobe >RDDIRTEST=/root/readdirtest >RATEST=/root/ra_test >LOGDIR="" > >function setup >{ > NUMFILES=$1 > if [ -z $NUMFILES ]; then > NUMFILES=1000 # Default > fi > > echo "" > echo "Setting up the environment... " > > # create logdir > LOGDIR=$LOGBASEDIR/$NUMFILES > echo -n " Creating log dir at: $LOGDIR ... " > $MKDIR -p $LOGDIR > /dev/null 2>&1 > echo "Done." > > # Unmount fs if already mounted > echo -n " Unmounting fs if already mounted..." > $UMOUNT $MNT > /dev/null 2>&1 > $MODPROBE -r gfs2 > echo "Done." > > # kill stray blktrace processes > echo -n " Killing stray blktrace processes..." > /usr/bin/killall -9 blktrace > /dev/null 2>&1 > echo "Done." > > # make the fs, mount and create $TOPDIR > echo -n " Creating the test filesystem and mounting... " > $MKFS -j1 -p lock_nolock $DEV -O 2>&1 > /dev/null > $MOUNT -t gfs2 $DEV $MNT > $MKDIR $TOPDIR > echo "Done." > > # creating test dir > echo -n " creating test directory ($NUMFILES files) at $TOPDIR ... " > $CREATOR $TOPDIR $$ $NUMFILES > echo "Done." > > # umounting fs > echo -n " unmounting fs..." > $UMOUNT $MNT > echo "Done." > echo "Setup Complete!" >} > >function remount >{ > echo "" > echo -n "Remounting fs... " > $UMOUNT $MNT > /dev/null 2>&1 > $MODPROBE -r gfs2 > echo 3 > /proc/sys/vm/drop_caches > sleep 5 > $MOUNT -t gfs2 $DEV $MNT > echo "Done." >} > >function teardown >{ > echo "" > echo "Tearing down the environment... " > echo -n " Unmounting the filesystem... " > $UMOUNT $MNT > /dev/null 2>&1 > $MODPROBE -r gfs2 > echo "Done." > echo "Teardown complete!" >} > >function memlog >{ > echo $1 >> $2 > cat /proc/meminfo | grep Mem >> $2 > echo "-------------------" >> $2 > cat /proc/slabinfo | grep gfs2 >> $2 > echo "-------------------" >> $2 >} >function readdirplus_test >{ > BUFSIZE=32768 > VB_SIZES=(256 4096 16384 65536 262144) > MAX_DENTS=(100 1000 10000 100000 1000000) > NUMFILES=$1 > if [ -z $NUMFILES ]; then > NUMFILES=1000 # Default > fi > > for j in `seq 0 4`; > do > VB_SIZE=${VB_SIZES[$j]} > MAX_DENT=${MAX_DENTS[$j]} > > echo "" > echo "Starting readdirplus() Run..." > echo " Numfiles : $NUMFILES" > echo " User bufsize : $BUFSIZE" > echo " VectorPG size: $VB_SIZE" > echo " Max dirents : $MAX_DENT" > > for iter in `seq 1 5`; > do > ITERLOGDIR=$LOGDIR/readdirplus/mem_f_$NUMFILES.b_$BUFSIZE.v_$VB_SIZE.d_$MAX_DENT/$iter > $MKDIR -p $ITERLOGDIR > MEM_LOG=$ITERLOGDIR/mem.log > TIME_LOG=$ITERLOGDIR/time.log > BLKTDIR=$ITERLOGDIR/blktrace > $MKDIR $BLKTDIR > echo "--------------------" > echo "Iteration $iter" > > remount > # Set tunables > echo "Setting tunables" > echo "$VB_SIZE" > /sys/fs/gfs2/$DM_DEV/tune/max_vb_pages > echo "$MAX_DENT" > /sys/fs/gfs2/$DM_DEV/tune/max_xrdir_dents > > # Write before state to logs > echo "Writing start logs and starting blktrace" > memlog "Start:" $MEM_LOG > blktrace -d $DEV -D $BLKTDIR > /dev/null 2>&1 & > > echo "Starting test program" > /usr/bin/time -v --output=$TIME_LOG $RDDIRTEST -b $BUFSIZE -l1 -q $TOPDIR > > #Write after state to logs > echo "Test completed. Writing end logs and killing blktrace" > memlog "End:" $MEM_LOG > /usr/bin/killall -s INT blktrace > /dev/null 2>&1 > done > done >} > >function readdir_test >{ > NUMFILES=$1 > if [ -z $NUMFILES ]; then > NUMFILES=1000 # Default > fi > > echo "" > echo "Starting readdir() Run..." > echo " Numfiles : $NUMFILES" > > for iter in `seq 1 5`; > do > ITERLOGDIR=$LOGDIR/readdir/mem_f_$NUMFILES/$iter > $MKDIR -p $ITERLOGDIR > MEM_LOG=$ITERLOGDIR/mem.log > TIME_LOG=$ITERLOGDIR/time.log > BLKTDIR=$ITERLOGDIR/blktrace > $MKDIR $BLKTDIR > echo "--------------------" > echo "Iteration $iter" > > remount > > # Write before state to logs > echo "Writing start logs and starting blktrace" > memlog "Start:" $MEM_LOG > blktrace -d $DEV -D $BLKTDIR > /dev/null 2>&1 & > > echo "Starting test program" > /usr/bin/time -v --output=$TIME_LOG /usr/bin/ls -l $TOPDIR > /dev/null 2>&1 > > # Write after state to logs > echo "Test completed. Writing end logs and killing blktrace" > memlog "End:" $MEM_LOG > /usr/bin/killall -s INT blktrace > /dev/null 2>&1 > done >} > >function readahead_test >{ > MAX_DENTS=(100 1000 10000 100000 1000000) > NUMFILES=$1 > if [ -z $NUMFILES ]; then > NUMFILES=1000 # Default > fi > > for j in `seq 0 4`; > do > MAX_DENT=${MAX_DENTS[$j]} > > echo "" > echo "Starting readahead() Run..." > echo " Numfiles : $NUMFILES" > echo " Max dirents : $MAX_DENT" > > for iter in `seq 1 5`; > do > ITERLOGDIR=$LOGDIR/readahead/mem_f_$NUMFILES.d_$MAX_DENT/$iter > $MKDIR -p $ITERLOGDIR > MEM_LOG=$ITERLOGDIR/mem.log > TIME_LOG=$ITERLOGDIR/time.log > RATEST_LOG=$ITERLOGDIR/ratest.log > BLKTDIR=$ITERLOGDIR/blktrace > $MKDIR $BLKTDIR > echo "--------------------" > echo "Iteration $iter" > > remount > > # Write before state to logs > echo "Writing start logs and starting blktrace" > memlog "Start:" $MEM_LOG > blktrace -d $DEV -D $BLKTDIR > /dev/null 2>&1 & > > echo "Starting test program" > /usr/bin/time -v --output=$TIME_LOG.ra $RATEST -c $MAX_DENT $TOPDIR > $RATEST_LOG 2>&1 > /usr/bin/time -v --output=$TIME_LOG.ls /usr/bin/ls -l $TOPDIR > /dev/null 2>&1 > > #Write after state to logs > echo "Test completed. Writing end logs and killing blktrace" > memlog "End:" $MEM_LOG > /usr/bin/killall -s INT blktrace > /dev/null 2>&1 > done > done >} > >for i in 10000 50000 100000 500000 >do > setup $i > readahead_test $i ># readdir_test $i ># readdirplus_test $i > teardown >done > >exit
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 850426
:
605960
|
617073
|
625592
|
678841
|
680222
|
680282
|
708389
|
731269
|
731270
|
731272
|
731273
|
731274
|
731278
|
731279
|
732739
|
732740
|
732845
|
834840
|
853502
|
909528
|
909529
|
909534
|
912745
|
917238
|
917239
|
920895
|
920896
|
920897
| 920898 |
920899
|
920902
|
920903
|
947987