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 删除。