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

fio基础12

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

Example#1:iodepth_batch_complete_min=1iodepth_batch_complete_max=<iodepth>whichmeansthatwewillretrieveatleat1IOanduptothewholesubmittedqueuedepth.IfnoneofIOhasbeencompletedyet,wewillwait.Example#2:iodepth_batch_complete_min=0iodepth_batch_complete_max=<iodepth>whichmeansthatwecanretrieveuptothewholesubmittedqueuedepth,butifnoneofIOhasbeencompletedyet,wewillNOTwaitandimmediatelyexitthesystemcall.Inthisexamplewesimplydopolling.iodepth_low=intThelowwatermarkindicatingwhentostartfillingthequeueagain.Defaultstothesameasiodepth,meaningthatfiowillattempttokeepthequeuefullatalltimes.Ifiodepthissettoeg16andiodepth_lowissetto4,thenafterfiohasfilledthequeueof16requests,itwillletthedepthdraindownto4beforestartingtofillitagain.io_submit_mode=strThisoptioncontrolshowfiosubmitstheIOtotheIOengine.Thedefaultis'inline',whichmeansthatthefiojobthreadssubmitandreapIOdirectly.Ifsetto'offload',thejobthreadswilloffloadIOsubmissiontoadedicatedpoolofIOthreads.Thisrequiressomecoordinationandthushasabitofextraoverhead,especiallyforlowerqueuedepthIOwhereitcanincreaselatencies.Thebenefitisthatfiocanmanagesubmissionratesindependentlyofthedevicecompletionrates.ThisavoidsskewedlatencyreportingifIOgetsbackuponthedeviceside(thecoordinatedomissionproblem).direct=boolIfvalueistrue,usenon-bufferedio.ThisisusuallyO_DIRECT.NotethatZFSonSolarisdoesn't support direct io. On Windows the synchronous ioengines don'tsupportdirectio.atomic=boolIfvalueistrue,attempttouseatomicdirectIO.Atomicwritesareguaranteedtobestableonceacknowledgedbytheoperatingsystem.OnlyLinuxsupportsO_ATOMICrightnow.buffered=boolIfvalueistrue,usebufferedio.Thisistheoppositeofthe'direct'option.Defaultstotrue.offset=intStartioatthegivenoffsetinthefile.Thedatabeforethegivenoffsetwillnotbetouched.Thiseffectivelycapsthefilesizeatreal_size-offset.offset_increment=intIfthisisprovided,thentherealoffsetbecomesoffset+offset_increment*thread_number,wherethethreadnumberisacounterthatstartsat0andisincrementedforeachsub-job(i.e.whennumjobsoptionisspecified).Thisoptionisusefulifthereareseveraljobswhichareintendedtooperateonafileinparalleldisjointsegments,withevenspacingbetweenthestartingpoints.number_ios=intFiowillnormallyperformIOsuntilithasexhaustedthesizeoftheregionsetbysize=,orifitexhausttheallocatedtime(orhitsanerrorcondition).Withthissetting,therange/sizecanbesetindependentlyofthenumberofIOstoperform.Whenfioreachesthisnumber,itwillexitnormallyandreportstatus.NotethatthisdoesnotextendtheamountofIOthatwillbedone,itwillonlystopfioifthisconditionismetbeforeotherend-of-jobcriteria.fsync=intIfwritingtoafile,issueasyncofthedirtydataforeverynumberofblocksgiven.Forexample,ifyougive32asaparameter,fiowillsyncthefileforevery32writesissued.Iffioisusingnon-bufferedio,wemaynotsyncthefile.Theexceptionisthesgioengine,whichsynchronizesthediskcacheanyway.fdatasync=intLikefsync=butusesfdatasync()toonlysyncdataandnotmetadatablocks.InFreeBSDandWindowsthereisnofdatasync(),thisfallsbacktousingfsync()

本文系转载,前往查看

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

本文系转载前往查看

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

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