bpe编码
Introduced on SQL Server 2014, the Buffer Pool Extension came to build up a new layer of cache, helping to maintain the “hot” pages accessible with less effort. With the introduction of Hekaton, the BPE has also an important role. In this article we will explore all the aspects of this new feature as well as understand how it works.
在SQL Server 2014中引入的缓冲池扩展(Buffer Pool Extension)来建立新的缓存层,从而帮助维护“热点”页面而无需花费太多精力。 随着Hekaton的引入,BPE也发挥了重要作用。 在本文中,我们将探讨此新功能的所有方面,并了解其工作原理。
With the release of SQL Server 2014, earlier this year, some new features were released, with a special remark to the In-memory OLTP (Hekaton). Together with that new feature, new challenges were brought. The available memory is, of course, one of the main challenges. More ahead, we will understand better why.
随着今年早些时候发布SQL Server 2014,发布了一些新功能,其中特别注明了内存OLTP(Hekaton)。 伴随着这一新功能,带来了新的挑战。 可用内存当然是主要挑战之一。 更进一步,我们将更好地理解原因。
Buffer Pool Extension is another new feature on SQL Server 2014. The essence behind this is simple: A file is created in a fast disk (SDD) in order to extend the Buffer Pool size – as the feature name suggests – taking advantage of a fast disk, which results in a improvement of the instance performance. This capability allows the buffer pool to retain more “buffers”, avoiding an extra paging activity. Basically, the Buffer Pool Extension will be another level of cache. Not so efficient as the memory – in the end of the day this is a SSD disk, not a RAM memory – but way better than access the disk to get the pages.
缓冲池扩展是SQL Server 2014的另一个新功能。其本质很简单:在快速磁盘(SDD)中创建文件以扩展缓冲池的大小(如功能名称所示),它利用了快速磁盘,从而提高了实例性能。 此功能允许缓冲池保留更多的“缓冲区”,从而避免了额外的分页活动。 基本上,缓冲池扩展将是另一级缓存。 效率不如内存-归根结底,这是SSD磁盘,而不是RAM存储器-但比访问磁盘获取页面要好得多。
If you quickly search on Google about Buffer Pool Extension, you will find some information, not too many results, but much of the same. On this article I will try to go more deep into this feature, showing how it works and what’s the behavior of SQL Server when you have Buffer Pool Extension enabled.
如果您在Google上快速搜索有关缓冲池扩展的信息,则会发现一些信息,而不是太多的结果,但大部分都是相同的。 在本文中,我将尝试更深入地了解此功能,展示其功能以及启用了缓冲池扩展后SQL Server的行为。
The main question that I always hear is: “For what is this used for?”. The main purpose of the Buffer Pool Extension is misunderstood as a way to give “the last chance” to that old server that we have, but is already very limited to run the current workload. This doesn’t make sense.
我经常听到的主要问题是:“这是做什么用的?”。 缓冲池扩展的主要目的被误解为一种为我们拥有的旧服务器提供“最后机会”的方法,但已经非常有限,无法运行当前的工作负载。 这没有道理。
Let’s think: If we have a server with memory limitations, it would make sense to enable the Buffer Pool Extension, in order to extend the available memory and improve the performance, right? Yes. But wait! The Buffer Pool Extension feature is… a SQL Server 2014 feature! Why would I install a SQL Server 2014 instance in an old and limited box?
让我们考虑一下:如果我们的服务器具有内存限制,那么启用缓冲池扩展是有意义的,以便扩展可用内存并提高性能,对吗? 是。 可是等等! 缓冲池扩展功能是…SQL Server 2014功能! 为什么我要在旧的受限框中安装SQL Server 2014实例?
You can do this, is up to who is architecting the infrastructure, and I believe that there are valid possibilities to this scenario. Anyway, the main idea of Buffer Pool Extension is not extend the lifetime of an old server. There’s more behind this.
您可以做到这一点,取决于谁来设计基础结构,我相信这种情况下存在有效的可能性。 无论如何,缓冲池扩展的主要思想是不延长旧服务器的寿命。 这背后还有更多。
About the Buffer Pool
关于缓冲池
Before start to dig into the Buffer Pool Extension itself, we need to understand more about the Buffer Pool purpose and how it works, in a very high level. If you already know for what the Buffer Pool is used for, you can skip this part and go to the next section.
在开始深入研究缓冲池扩展本身之前S\][OH^X[Y\HYHXKX[MЙYT\[YNL
\[ZK[^][KM
KLYMXMNXLMNLLYY[OH[NN][YH\HYHXKX[MЙYT\X[\O\H]H!y y.# !#[Y[HY\8$X[Y[\HY[HY\YYH\[HY[[K]\]H\[\X[[YYY]8&\X\\\K9$y.*9ah9.+yob,9.)9hmzghynlamzghd:!#h9odh.#yb-b,9aykf9am. 9.* yi.'9nla'x9/.yd#l!am!.':!# \x&\[Y\H\[[\HY\K[HY\[\Z[[Z^H]HYH\\HY[[H\][K\]HYH\\]\H\[XH][\HYXH\[Y[HH^H][XY][[X\\9...l/za$ym*y'9l9k.(i,I$y.hb$h9.+y/fyl/yc$y!# 9.aykf9$fi\am"y.*/"/"'#yf,9."b!b*))yb!9z/"]Y]HKHZ][[[[HY\\HXYH[\[Y\^[]YKH[X[\\[]XZHY\^[XZ8$H[SY[[HXK[H^\\Y\[\[[SY[[H
ZH[\[[HY[[H[[]\YY\H\HY\^[9$y.o.ah9/g9(c9..d9$y& $y.!$h9jyleymg9c/a+i9.b$yl!. 9.*/oh9jyley"y#9.$f99+g*9+9b%"!.+I$y.!i))ykf9.+S ZNg9c.#/o$h9jyley+!aykf9$y&8[O+HYHXKY\\Y^[XKZ[X[XY\\XKY\\Y^[XKZ[X[XY\\[Oy]