资源描述:
《交换空间管理和技巧》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、交换空间管理和技巧Swapspacemanagementandskills2007-01-1811:25:52theLinuxfederationcollectsConfigureswapspace(ineludingaddingspaceinanemergency)tomakethemostofyoursystem・Inthisarticle,you'11learnhowtomonitorthesystemtodeterminetheeffectiveexchangeofspaceconfigurationdata,andtheresearchwillsw
2、apspaceisnotonlyusedasauxiliarymethodofrandomaccessmemory(RAM).HowdoesUNIXuseswapspaceAllUNIXoperatingsystemssupportsomekindofvirtualmemory(VM)system・UsetheVMsystem,youhavetwomainareatostoreinformationaboutactiveapplicationanduseofdata一physicalrandomaccessmemory(RAM)andthedistribut
3、ionofharddrivespace.IncomputerswithVM,theapplicationcanbeloadedintomemoryanddataamountcanbegreaterthanthephysicalRAM,becausethereisnoactivityistousetheapplicationandinformationexchangeonthedisk(swapspaceThetermhencethename)・TheadvantageoftheVMsystemisthatphysicalRAMismoreefficient-
4、一becauseitcontainsonlytheapplicationsbeingexecutedandthedatabeingused・BecauseRAMisfasterthanaharddiskspace,youfromtheactivetoloadintheapplicationoftherequiredperformance,canalsobenefitfromtherunningapplicationsupportedbymorethanusua1.Asaresult,yougetamuchlargeraddressablememoryspac
5、e(in32forsystemfor4gb,ona64-bitsystemislarger),soastomaketheapplicationdevelopmenteasier,whilestillprovidinghighperformance・SetswapspacevaluesTheamountofswapspaceyouconfigureonthecomputerdependsontheapplicationandtheoperatingsystem・Iftheswapspaceistoosmall,itmaynotbeabletorunallyou
6、wanttoruntheapplication,andiftheswapspaceistoobig,maybeawasteofthosewhohaveneveruseddiskspace・Youmayalsoindirectlymakesthesystemoverloads,becausecomparedwithtoolittlespace,toomuchswapspacecanleadtopoorperformance,thisisbecausewiththesystem,comparedtoperformtheactualprocessingtimesp
7、entitinandoutinthemoretimespentonapage・DifferentUNIXvariantsusetheirswapspaceindifferentways・Somevariantsuseswapspaceonlywhenphysicalmemoryisalreadyused・Othervariantsuseswapspaceforallnon-activeapplicationsandunusedpages・Somevariationskeepcopiesofthedatainallapplications--including
8、applicationsinbothmemoryan