資源描述:
《Red Hat Enterprise Linux Network Performance Tuning.pdf》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在學(xué)術(shù)論文-天天文庫。
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