fio基础9

2022-04-24 00:20:23 浏览数 (1)

randrepeat=boolForrandomIOworkloads,seedthegeneratorinapredictablewaysothatresultsarerepeatableacrossrepetitions.Defaultstotrue.randseed=intSeedtherandomnumbergeneratorsbasedonthisseedvalue,tobeabletocontrolwhatsequenceofoutputisbeinggenerated.Ifnotset,therandomsequencedependsontherandrepeatsetting.fallocate=strWhetherpre-allocationisperformedwhenlayingdownfiles.Acceptedvaluesare:noneDonotpre-allocatespaceposixPre-allocateviaposix_fallocate()keepPre-allocateviafallocate()withFALLOC_FL_KEEP_SIZEset0Backward-compatiblealiasfor'none'1Backward-compatiblealiasfor'posix'Maynotbeavailableonallsupportedplatforms.'keep'isonlyavailableonLinux.IfusingZFSonSolaristhismustbesetto'none'becauseZFSdoesn't support it. Default: 'posix'. fadvise_hint=bool By default, fio will use fadvise() to advise the kernel on what IO patterns it is likely to issue. Sometimes you want to test specific IO patterns without telling the kernel about it, in which case you can disable this option. If set, fio will use POSIX_FADV_SEQUENTIAL for sequential IO and POSIX_FADV_RANDOM for random IO. fadvise_stream=int Notify the kernel what write stream ID to place these writes under. Only supported on Linux. Note, this option may change going forward. size=int The total size of file io for this job. Fio will run until this many bytes has been transferred, unless runtime is limited by other options (such as 'runtime', for instance, or increased/decreased by 'io_size'). Unless specific nrfiles and filesize options are given, fio will divide this size between the available files specified by the job. If not set, fio will use the full size of the given files or devices. If the files do not exist, size must be given. It is also possible to give size as a percentage between 1 and 100. If size=20% is given, fio will use 20% of the full size of the given files or devices. io_size=int io_limit=int Normally fio operates within the region set by 'size', which means that the 'size' option sets both the region and size of IO to be performed. Sometimes that is not what you want. With this option, it is possible to define just the amount of IO that fio should do. For instance, if 'size' is set to 20G and 'io_size' is set to 5G, fio will perform IO within the first 20G but exit when 5G have been done. The opposite is also possible - if 'size' is set to 20G, and 'io_size' is set to 40G, then fio will do 40G of IO within the 0..20G region. filesize=int Individual file sizes. May be a range, in which case fio will select sizes for files at random within the given range and limited to 'size' in total (if that is given). If not given, each created file is the same size. file_append=bool Perform IO after the end of the file. Normally fio will operate within the size of a file. If this option is set, then fio will append to the file instead. This has identical behavior to setting offset to the size of a file. This option is ignored on non-regular files. fill_device=bool fill_fs=bool Sets size to something really large and waits for ENOSPC (no space left on device) as the terminating condition. Only makes sense with sequential write. For a read workload, the mount point will be filled first then IO started on the result. This option doesn'tmakesenseifoperatingonarawdevicenode,sincethesizeofthatisalreadyknownbythefilesystem.Additionally,writingbeyondend-of-devicewillnotreturnENOSPCthere.blocksize=intbs=intTheblocksizeusedfortheiounits.Defaultsto4k.Valuescanbegivenforbothreadandwrites.Ifasingleintisgiven,itwillapplytoboth.Ifasecondintisspecifiedafteracomma,itwillapplytowritesonly.Inotherwords,theformatiseitherbs=read_and_writeorbs=read,write,trim.bs=4k,8kwillthususe4kblocksforreads,8kblocksforwrites,and8kfortrims.Youcanterminatethelistwithatrailingcomma.bs=4k,8k,wouldusethedefaultvaluefortrims..Ifyouonlywishtosetthewritesize,youcandosobypassinganemptyreadsize-bs=,8kwillset8kforwritesandleavethereaddefaultvalue.blockalign=intba=intAtwhatboundarytoalignrandomIOoffsets.Defaultstothesameas'blocksize'theminimumblocksizegiven.Minimumalignmentistypically512bforusingdirectIO,thoughitusuallydependsonthehardwareblocksize.Thisoptionismutuallyexclusivewithusingarandommapforfiles,soitwillturnoffthatoption.blocksize_range=irangebsrange=irangeInsteadofgivingasingleblocksize,specifyarangeandfiowillmixtheissuedioblocksizes.Theissuediounitwillalwaysbeamultipleoftheminimumvaluegiven(alsoseebs_unaligned).Appliestobothreadsandwrites,howeverasecondrangecanbegivenafteracomma.Seebs=.bssplit=strSometimesyouwantevenfinergrainedcontroloftheblocksizesissued,notjustanevensplitbetweenthem.Thisoptionallowsyoutoweightvariousblocksizes,sothatyouareabletodefineaspecificamountofblocksizesissued.Theformatforthisoptionis:bssplit=blocksize/percentage:blocksize/percentageforasmanyblocksizesasneeded.Soifyouwanttodefineaworkloadthathas50dkblocks,10%4kblocks,and402kblocks,youwouldwrite:bssplit=4k/10:64k/50:32k/40Orderingdoesnotmatter.Ifthepercentageisleftblank,fiowillfillintheremainingvaluesevenly.Soabssplitoptionlikethisone:bssplit=4k/50:1k/:32k/wouldhave50%4kios,and25%1kand32kios.Thepercentagesalwaysaddupto100,ifbssplitisgivenarangethataddsuptomore,itwillerrorout.bssplitalsosupportsgivingseparatesplitstoreadsandwrites.Theformatisidenticaltowhatbs=accepts.Youhavetoseparatethereadandwritepartswithacomma.Soifyouwantaworkloadthathas50%2kreadsand50%4kreads,whilehaving90%4kwritesand10%8kwrites,youwouldspecify:bssplit=2k/50:4k/50,4k/90:8k/10blocksize_unalignedbs_unalignedIfthisoptionisgiven,anybytesizevaluewithinbsrangemaybeusedasablockrange.Thistypicallywontworkwith

0 人点赞