资源描述:
《Red Hat Enterprise Linux Network Performance Tuning.pdf》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、RedHatEnterpriseLinuxNetworkPerformanceTuningGuideAuthors:JamieBainbridgeandJonMaxwellReviewer:NoahDavidsEditors:DayleParkerandChrisNegus03/25/2015Tuninganetworkinterfacecard(NIC)foroptimumthroughputandlatencyisacomplexprocesswithmanyfactorstoconsider.Thesefactorsincludecapabil
2、itiesofthenetworkinterface,driverfeaturesandoptions,thesystemhardwarethatRedHatEnterpriseLinuxisinstalledon,CPU-to-memoryarchitecture,amountofCPUcores,theversionoftheRedHatEnterpriseLinuxkernelwhichimpliesthedriverversion,nottomentiontheworkloadthenetworkinterfacehastohandle,an
3、dwhichfactors(speedorlatency)aremostimportanttothatworkload.Thereisnogenericconfigurationthatcanbebroadlyappliedtoeverysystem,astheabovefactorsarealwaysdifferent.Theaimofthisdocumentisnottoprovidespecifictuninginformation,buttointroducethereadertotheprocessofpacketreceptionwith
4、intheLinuxkernel,thentodemonstrateavailabletuningmethodswhichcanbeappliedtoagivensystem.PACKETRECEPTIONINTHELINUXKERNELTheNICringbufferReceiveringbuffersaresharedbetweenthedevicedriverandNIC.Thecardassignsatransmit(TX)andreceive(RX)ringbuffer.Asthenameimplies,theringbufferisaci
5、rcularbufferwhereanoverflowsimplyoverwritesexistingdata.ItshouldbenotedthattherearetwowaystomovedatafromtheNICtothekernel,hardwareinterruptsandsoftwareinterrupts,alsocalledSoftIRQs.TheRXringbufferisusedtostoreincomingpacketsuntiltheycanbeprocessedbythedevicedriver.Thedevicedriv
6、erdrainstheRXring,typicallyviaSoftIRQs,whichputstheincomingpacketsintoakerneldatastructurecalledansk_buffor“skb”tobeginitsjourneythroughthekernelanduptotheapplicationwhichownstherelevantsocket.TheTXringbufferisusedtoholdoutgoingpacketswhicharedestinedforthewire.Theseringbuffers
7、resideatthebottomofthestackandareacrucialpointatwhichpacketdropcanoccur,whichinturnwilladverselyaffectnetworkperformance.InterruptsandInterruptHandlersInterruptsfromthehardwareareknownas“top-half”interrupts.WhenaNICreceivesincomingdata,itcopiesthedataintokernelbuffersusingDMA.T
8、heNICnotifiesthekernelofthisdatabyRedHatEnterpriseLinu