如何查看是否开启 largepageallocator
答案:1 悬赏:50 手机版
解决时间 2021-11-08 13:50
- 提问者网友:沉默的哀伤
- 2021-11-07 16:07
如何查看是否开启 largepageallocator
最佳答案
- 五星知识达人网友:山河有幸埋战骨
- 2021-11-07 17:09
说白了,就是在操作系统级别上,针对进程的虚拟内存空间,使用大内存页,避免频繁的进行页换入换出,出现系统抖动。同样使用大内存分页,也会有一些负面影响,两快大内存分页之间会出现一些内存碎片,从而影响整体系统的性能,当一旦没有足够的大内存块时,整个OS下系统进程又会将原先的大内存打散恢复默认的内存分页。Linux下如何配置largePageLargepagesupportisincludedin2.6kernel.Somevendorshavebackportedthecodetotheir2.4basedreleases.Tocheckifyoursystemcansupportlargepagememory,trythefollowing:Linuxshell代码cat/proc/meminfo|grepHugeHugePages_Total:0HugePages_Free:0Hugepagesize:2048kBIftheoutputshowsthethree"Huge"variablesthenyoursystemcansupportlargepagememory,butitneedstobeconfigured.Ifthecommanddoesn'tprintoutanything,thenlargepagesupportisnotavailable.Toconfigurethesystemtouselargepagememory,onemustloginasroot,then:IncreaseSHMMAXvalue.ItmustbelargerthantheJavaheapsize.Onasystemwith4GBofphysicalRAM(orless)thefollowingwillmakeallthememorysharable:Linuxshell代码echo4294967295>/proc/sys/kernel/shmmaxSpecifythenumberoflargepages.Inthefollowingexample3GBofa4GBsystemarereservedforlargepages(assumingalargepagesizeof2048k,then3g=3x1024m=3072m=3072*1024k=3145728k,and3145728k/2048k=1536):Linuxshell代码echo1536>/proc/sys/vm/nr_hugepagesNotethe/procvalueswillresetafterrebootsoyoumaywanttosettheminaninitscript(e.g.rc.localorsysctl.conf).参数配置sunjdk:-XX:LargePageSizeInBytes=128m-XX:+UseLargePagesjrockitjdk:-XlargePages
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯