zoukankan      html  css  js  c++  java
  • Buffer Pool--内存总结1

    物理地址空间是处理器用来访问位于总线上的所有部件的集合。
    在32位处理器上,地址总线为32位,寻址空间为4GB。
    在使用PAE的32位服务器上,地址总线为36位,寻址空间为64GB。
    在64位的处理器上生产商将地址总线限制为44位,寻址空间为2TB。
    在32位系统上,系统中运行的每个进程有共计4GB的虚拟地址空间(VAS),用来存放应用程序所使用的程序代码和数据。4GB的VAS由内核模式和用户模式共享,用户模式地址空间和内核模式地址空间各占2GB,如果激活/3GB或者/USERUA选项后,用户模式地址空间占3GB。
    在X64系统上,系统为进程分配8TB的VAS
    在IA64系统上,系统为进程分配7TB的VAS
    不同的操作系统版本,所支持的最大物理内存不一样。
    虚拟地址空间只是虚拟内存,不是物理内存,而且它只是空间,不是实际内存。
    虚拟内存管理器(Virtual Memory Manager VMM)负责所有的物理内存,将物理内存在所有需要内存的进程间共享,当进程请求内存或者需要加载数据是,OS接受请求,将进程中一块虚拟内存空间和实际物理内存相互关联起来。
    虚拟内存管理器可以将内存中数据取走并存放到页面文件中,直到进程试图访问该段数据时重新将数据从页面中加载到物理内存中并完成虚拟内存和物理内存之间的映射。
    如果进程再次使用数据而数据需要从页面文件中重新载入,该操作被称为Hard page Fault(硬页面错误)
    当物理内存缺乏而多个进程争用有限内存时,会导致数据频繁地从物理内存中换入和换出,从而导致系统响应速度变慢,性能下降。
    通过修改Boot.ini文件来打开/3GB选项或/UserVA选项。
    /UserVA选项是Windows Server 2003中新增加的。
    当/3GB选项被打开时,操作系统会受限于最多使用16GB的物理内存,故如果服务器拥有16GB或更多内存时,不要使用3GB选项

    PAE--physical Address Extensions
    PAE是Intel引入一种突破32位地址总线的方式,将地址总线物理扩展到36位,从而允许32位操作系统最多使用64GB内存。
    在Datacentrt版本的OS中,如果硬件允许热内存交换,即使不在Boot.ini文件中激活PAE,仍然会运行PAE内核

    在拥有多于4GB的服务器上,则激活PAE选项。

    AWE--Address Windowing Extensions
    AWE是一位Windows API,允许32位进程映射其虚拟地址空间以外的内存,使得进程可以使用物理内存来存储数据,但是在使用数据时,必须将它映射到进程中的VAS中。AWE的思想类似于Windows中的页面文件,由于AWE中的数据存放在内存中,内存到内存的数据传递更快。

    Enable AWE option for SQL SERVER
    1.Use sp_configure to set the value as 1 for the option 'awe enabled'
    2.Grant the right of 'Lock Page in Memory' to the service account.

    To enable AWE
    exec sp_configure 'show advanced options', 1 
    RECONFIGURE 
    exec sp_configure 'awe enabled', 1 
    RECONFIGURE

    To enable the lock pages in memory option
    1.On the Start menu, click Run. In the Open box, type gpedit.msc. The Group Policy dialog box opens.
    2.On the Group Policy console, expand Computer Configuration, and then expand Windows Settings.
    3.Expand Security Settings, and then expand Local Policies.
    4.Select the User Rights Assignment folder.
    The policies will be displayed in the details pane.
    5.In the pane, double-click Lock pages in memory.
    6.In the Local Security Policy Setting dialog box, click Add.
    7.In the Select Users or Groups dialog box, add an account with privileges to run sqlservr.exe.

    User could not set AWE option on 64-Bit SQL Server, but if the service account have the right of 'Lock Pages in Memory', SQL Server will use AWE to access buffer pool memory automaticlly.
    即使在64位系统上,SQL SERVER依然可以通过AWE来提升性能。
     

  • 相关阅读:
    openssl 自己制作ssl证书:自己签发免费ssl证书,为nginx生成自签名ssl证书
    【nginx】一台nginx服务器多域名配置
    使用 Microsoft.Web.Administration 管理iis
    Android TextView : “Do not concatenate text displayed with setText”
    Android中将十六进制 颜色代码 转换为int类型数值
    android-getTextSize返回值是以像素(px)为单位的,setTextSize()以sp为单位
    Android属性allowBackup安全风险浅析
    Android 如何保持屏幕常亮
    Android 控制ScrollView滚动到底部
    Android 自定义TextView 实现文本间距
  • 原文地址:https://www.cnblogs.com/TeyGao/p/3518999.html
Copyright © 2011-2022 走看看