前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >fio基础8

fio基础8

作者头像
franket
发布2022-04-24 00:20:00
5650
发布2022-04-24 00:20:00
举报
文章被收录于专栏:技术杂记

Fortimevaluesin expressions, units are microseconds bydefault. This is different than fortimevaluesnotin expressions (notenclosedin parentheses). The following types are used: strString. This is a sequence of alpha characters. timeIntegerwith possible time suffix. In seconds unless otherwise specified, use eg 10m for10 minutes. Accepts s/m/h for seconds, minutes, and hours, and accepts 'ms' (or'msec') for milliseconds, and'us' (or'usec') for microseconds. int SI integer. A whole numbervalue, which may contain a suffix describing the base of the number. Accepted suffixes are k/m/g/t/p, meaning kilo, mega, giga, tera, and peta. The suffix isnotcase sensitive, and you may also include trailing'b' (eg 'kb'is the same as'k'). So if you want to specify 4096, you could either write out '4096'or just give 4k. The suffixes signify base 2values, so 1024is1k and1024k is1m and so on, unless the suffix is explicitly setto a base 10valueusing'kib', 'mib', 'gib', etc. If that is the case, then1000is used as the multiplier. This can be handy for disks, since manufacturers generally use base 10valueswhen listing the capacity of a drive. If the option accepts an upperandlower range, use a colon ':'or minus '-'to separate such values. May also include a prefix to indicate numbers base. If0x is used, the numberis assumed to be hexadecimal. See irange. bool Boolean. Usually parsed as an integer, however only defined fortrueandfalse (1and0). irange Integer range with suffix. Allows value range to be given, such as1024-4096. A colon may also be used as the separator, eg 1k:4k. If the option allows two sets of ranges, they can be specified with a ','or'/' delimiter: 1k-4k/8k-32k. Also see int. float_list A list of floating numbers, separated by a ':'character. With the above in mind, here follows the complete list of fio job parameters. name=strASCII name of the job. This may be used to override the name printed by fio for this job. Otherwise the job name is used. On the command line this parameter has the special purpose of also signaling the startof a new job. description=strText description of the job. Doesn'tdoanythingexceptdumpthistextdescriptionwhenthisjobisrun.It's not parsed. directory=str Prefix filenames with this directory. Used to place files in a different location than "./". See the 'filename'optionfor escaping certain characters. filename=str Fio normally makes up a filename based on the job name, thread number, and file number. If you want toshare files between threads in a job or several jobs, specify a filename foreachof them to override the default. If the ioengine used is'net', the filename is the host, port, and protocol tousein the formatof =host,port,protocol. See ioengine=net for more. If the ioengine is file based, you can specify a numberof files by separating the nameswith a ':' colon. So if you wanted a job toopen /dev/sda and /dev/sdb as the two working files, you would use filename=/dev/sda:/dev/sdb. On Windows, disk devices are accessed as \\.\PhysicalDrive0 for the first device, \\.\PhysicalDrive1 for the second etc. Note: Windows and FreeBSD prevent write access to areas of the disk containing in-usedata (e.g. filesystems). If the wanted filename does need to include a colon, thenescape that with a '\' character. For instance, if the filename is "/dev/dsk/foo@3,0:c", then you would use filename="/dev/dsk/foo@3,0\:c". '-' is a reserved name, meaning stdin or stdout. Which of the two depends on the read/write direction set. filename_format=str If sharing multiple files between jobs, it is usually necessary to have fio generate the exact names that you want. By default, fio will name a file based on the default file format specification of jobname.jobnumber.filenumber. With this option, that can be customized. Fio will recognize and replace the following keywords in this string: $jobname The name of the worker thread or process. $jobnum The incremental number of the worker thread or process. $filenum The incremental number of the file for that worker thread or process. To have dependent jobs share a set of files, this option can be set to have fio generate filenames that are shared between the two. For instance, if testfiles.$filenum is specified, file number 4 for any job will be named testfiles.4. The default of $jobname.$jobnum.$filenum will be used if no other format specifier is given. opendir=str Tell fio to recursively add any file it can find in this directory and down the file system tree. lockfile=str Fio defaults to not locking any files before it does IO to them. If a file or file descriptor is shared, fio can serialize IO to that file to make the end result consistent. This is usual for emulating real workloads that share files. The lock modes are: none No locking. The default. exclusive Only one thread/process may do IO, excluding all others. readwrite Read-write locking on the file. Many readers may access the file at the same time, but writes get exclusive access. readwrite=str rw=str Type of io pattern. Accepted values are: read Sequential reads write Sequential writes randwrite Random writes randread Random reads rw,readwrite Sequential mixed reads and writes randrw Random mixed reads and writes trimwrite Mixed trims and writes. Blocks will be trimmed first, then written to. For the mixed io types, the default is to split them 50/50. For certain types of io the result may still be skewed a bit, since the speed may be different. It is possible to specify a number of IO'stodobeforegettinganewoffset,thisisdonebyappendinga':<nr>'totheendofthestringgiven.Forarandomread,itwouldlooklike'rw=randread:8'forpassinginanoffsetmodifierwithavalueof8.IfthesuffixisusedwithasequentialIOpattern,thenthevaluespecifiedwillbeaddedtothegeneratedoffsetforeachIO.Forinstance,usingrw=write:4kwillskip4kforeverywrite.ItturnssequentialIOintosequentialIOwithholes.Seethe'rw_sequencer'option.rw_sequencer=strIfanoffsetmodifierisgivenbyappendinganumbertotherw=<str>line,thenthisoptioncontrolshowthatnumbermodifiestheIOoffsetbeinggenerated.Acceptedvaluesare:sequentialGeneratesequentialoffsetidenticalGeneratethesameoffset'sequential'isonlyusefulforrandomIO,wherefiowouldnormallygenerateanewrandomoffsetforeveryIO.Ifyouappendeg8torandread,youwouldgetanewrandomoffsetforevery8IO's. The result would be a seek for only every 8 IO's,insteadofforeveryIO.Userw=randread:8tospecifythat.AssequentialIOisalreadysequential,setting'sequential'forthatwouldnotresultinanydifferences.'identical'behavesinasimilarfashion,exceptitsendsthesameoffset8numberoftimesbeforegeneratinganewoffset.kb_base=intThebaseunitforakilobyte.Thedefactobaseis2^10,1024.Storagemanufacturersliketouse10^3or1000asabasetenunitinstead,forobviousreasons.Allowvaluesare1024or1000,with1024beingthedefault.unified_rw_reporting=boolFionormallyreportsstatisticsonaperdatadirectionbasis,meaningthatread,write,andtrimareaccountedandreportedseparately.Ifthisoptionisset,thefiowillsumtheresultsandreportthemas"mixed"instead.

本文系转载,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文系转载前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档