`
agapple
  • 浏览: 1595445 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论

Linux系统Large Pages设置

阅读更多
Large Pages说明

sun文档: http://www.oracle.com/technetwork/java/javase/tech/largememory-jsp-137182.html

说白了,就是在操作系统级别上,针对进程的虚拟内存空间,使用大内存页,避免频繁的进行页换入换出,出现系统抖动。同样使用大内存分页,也会有一些负面影响,两快大内存分页之间会出现一些内存碎片,从而影响整体系统的性能,当一旦没有足够的大内存块时,整个OS下系统进程又会将原先的大内存打散恢复默认的内存分页。

摘自sun文档的原话 写道
A Translation-Lookaside Buffer (TLB) is a page translation cache that holds the most-recently used virtual-to-physical address translations. TLB is a scarce system resource. A TLB miss can be costly as the processor must then read from the hierarchical page table, which may require multiple memory accesses. By using bigger page size, a single TLB entry can represent larger memory range. There will be less pressure on TLB and memory-intensive applications may have better performance.

However please note sometimes using large page memory can negatively affect system performance. For example, when a large mount of memory is pinned by an application, it may create a shortage of regular memory and cause excessive paging in other applications and slow down the entire system. Also please note for a system that has been up for a long time, excessive fragmentation can make it impossible to reserve enough large page memory. When it happens, either the OS or JVM will revert to using regular pages.


Linux下如何配置large Page
Large page support is included in 2.6 kernel. Some vendors have backported the code to their 2.4 based releases. To check if your system can support large page memory, try the following:

cat /proc/meminfo | grep Huge
HugePages_Total: 0
HugePages_Free: 0
Hugepagesize: 2048 kB


If the output shows the three "Huge" variables then your system can support large page memory, but it needs to be configured. If the command doesn't print out anything, then large page support is not available. To configure the system to use large page memory, one must log in as root, then:

Increase SHMMAX value. It must be larger than the Java heap size. On a system with 4 GB of physical RAM (or less) the following will make all the memory sharable:
echo 4294967295 > /proc/sys/kernel/shmmax
Specify the number of large pages. In the following example 3 GB of a 4 GB system are reserved for large pages (assuming a large page size of 2048k, then 3g = 3 x 1024m = 3072m = 3072 * 1024k = 3145728k, and 3145728k / 2048k = 1536):
echo 1536 > /proc/sys/vm/nr_hugepages

Note the /proc values will reset after reboot so you may want to set them in an init script (e.g. rc.local or sysctl.conf).

参数配置
sun jdk :

jrockit jdk :


效果

摘录校长的测试结果: 写道
这个设置, 目前观察下来的结果是EDEN区域收集明显速度比较快, 最多几个ms, 但是,对于FGC, 大约需要0。9, 但是发生时间非常的长, 应该是影响不大。 但是对于非web应用的中间件服务, 这个设置很要不得, 可能导致很严重延迟效果.这时需要搭配cms,加速old区的并发收集

分享到:
评论

相关推荐

    Linux Shell Scripting Cookbook.epub

    The man pages are helpful but they are very lengthy and it does not give any clues on key areas where commands can be used. Proper usage of shell commands can easily solve many complex tasks with a ...

    Linux虚拟文件系统(内核初始化)

    ### Linux虚拟文件系统(内核初始化) #### 一、引言 Linux虚拟文件系统(Virtual File System, VFS)是Linux内核中的一个重要组成部分,它为各种不同的文件系统提供了一个统一的操作接口。VFS的设计目的是为了支持...

    Linux Shell Scripting Cookbook.mobi

    The man pages are helpful but they are very lengthy and it does not give any clues on key areas where commands can be used. Proper usage of shell commands can easily solve many complex tasks with a ...

    04.Linux大内存页Oracle数据库优化-熊军.docx

    4. 启动数据库时,确保在`init.ora`或`spfile`中设置`use_large_pages`为`true`。 优化过程中还需要注意监控和调整相关的系统参数,如`vm.dirty_ratio`和`vm.swappiness`,以控制脏页的写回策略和交换行为,避免...

    Fedora 11 and Red Hat Enterprise Linux Bible.pdf

    Then, if you choose, you can transition your skills to manage anything from a small office to a large, corporate Red Hat Enterprise Linux computer installation. This book tells you how and gives you ...

    linuxVM平台扩展SGA

    这可以通过设置 `hugepagesz` 和 `hugepages` 参数来实现。 **用途**: 适用于需要大量连续内存的应用程序,如 Oracle 数据库实例。 #### 合法组合 为了确保系统稳定运行并充分发挥硬件潜力,必须合理配置各项参数...

    Linux Shell Scripting Essentials 无水印pdf 0分

    Paperback: 282 pages Publisher: Packt Publishing - ebooks Account (November 23, 2015) Language: English ISBN-10: 1785284444 ISBN-13: 978-1785284441 Learn shell scripting to solve complex shell-...

    HCS Debian Linux - Apache Error Pages SL:Apache 错误页面斯洛文尼亚语翻译-开源

    标题 "HCS Debian Linux - Apache Error Pages SL" 涉及到的是在Debian Linux操作系统上,Apache HTTP服务器的错误页面的斯洛文尼亚语(Slovenian)本地化工作。Apache是世界上最广泛使用的Web服务器软件,它支持...

    在线考试系统文献综述

    用JSP开发的Web应用是跨平台的,即能在Linux下运行,也能在其他操作系统上运行。 JSP技术使用Java编程语言编写类XML的tags和scriptlets,来封装产生动态网页的处理逻辑。网页还能通过tags和scriptlets访问存在于...

    VirtualBox-5.1.26-117224-Win.zip

    此外,通过使用Nested Paging和Large Pages等高级特性,VirtualBox可以进一步优化虚拟机的运行效率。 3. **共享文件夹和端口转发**: 用户可以设置虚拟机与主机之间的共享文件夹,方便在虚拟系统和实际系统之间...

    VirtualBox-7.0.6-155176-Win.exe

    3. **增强型性能特性**:如VT-x(Intel)和AMD-V(AMD)硬件辅助虚拟化技术,以及Nested Paging和Large Pages等功能,提高虚拟机的性能和稳定性。 4. **共享文件夹和网络映射**:VirtualBox支持将主机的文件夹共享...

    oralce hugepage

    从 11.2.0.2 版本开始,Oracle 引入了一个新的参数 `use_large_pages` 来简化这个过程,但仍需注意 AMM 和 Hugepage 的兼容性问题。 2. **SGA 配置** 在使用自动内存管理的情况下,必须先关闭 AMM 才能启用 Huge...

    基于CentOS 7.6 配置Nginx + Tomcat

    CentOS(Community ENTerprise Operating System)是基于Red Hat Enterprise Linux构建的免费企业级操作系统。7.6是其一个稳定版本,发布于2017年,它主要面向企业用户提供稳定、安全、高效的系统环境。 ### Nginx ...

    Oracle Memory Management and HugePage (连载二)

    在Linux系统中,大页面又被称为透明大页(Transparent HugePages)。 使用大页面技术的优势主要体现在以下几个方面: 1. 提升性能:大页面减少了内存访问的延迟,从而提高了数据库的整体性能,尤其对于大型的...

    计算机基础知识考试.pdf

    10. **操作系统**:Linux是一种开源的共享软件,源代码对公众开放。 11. **主存储器**:PC机主板上内存的容量、速度和类型由芯片组决定。 12. **启动顺序**:计算机启动时,执行POST(Power On Self Test)程序、...

    计算机专业词汇 英语

    59. **Linux**:开源的类UNIX操作系统,广泛应用在服务器和嵌入式设备中。 以上只是计算机英语高级词汇的一部分,实际上,这个领域涵盖的词汇远不止这些,包括网络、数据库、编程语言、安全、云计算等多个方面。...

    React and React Native [Kindle Edition]

    Before moving to the front end, he worked on several large-scale cloud computing products, using Python and Linux. No stranger to complexity, Adam has practical experience with real-world software ...

    Mastering Ansible - Second Edition

    2017 | ASIN: B01N5HQ2AE | 310 Pages | AZW3 | 11.56 MB Key Features Learn how to extend Ansible with custom modules, plugins, and inventory sources Utilize advanced Ansible features to orchestrate ...

Global site tag (gtag.js) - Google Analytics