The document summarizes several topics discussed by Ismail Adar including buffer pool extension, resource governor for I/O, delayed durability, DMV sys.dm_exec_query_profiles, and selecting into parallel. Buffer pool extension allows using SSD storage to increase the amount of memory available for the buffer pool. Resource governor for I/O provides I/O level isolation between workloads. Delayed durability controls the durability of transactions. The DMV sys.dm_exec_query_profiles profiles query execution. Selecting into allows inserting results of a query in parallel into a table.
2. About.Me()
• Veritabanı Takım Lideri / Doğan Online
• Eğitimen/Danışmanı / Btakademi
• Kitap Yazarı
• Microsoft Certified Trainer
ismailadar@hotmail.com
http://www.ismailadar.com
İsmail
Adar
@ismailadars
3. Content.GetAgenda()
• Buffer Pool Extension
• Resource Governor for I/O
• Delayed Durability
• DMV- sys.dm_exec_query_profiles
• Select into Parallel
4.
5. Buffer Pool Extension Requirement
• Increasing memory available to SQL Server is the easiest
way of improving OLTP performance.
• However, adding more memory might be expensive or even
unsupported, especially on the old machines with limitations
on DIMM sizes and/or number of supported memory slots.
• Adding new storage devices to the same machines is usually
supported.
6. Buffer Pool Extension
• Buffer pool is
– The most widely used part of the SQL Server memory
management
– The biggest memory block, most benefits from the memory
increases
– The most critical memory pool for reducing the IO pressure for
OLTP
• SQL Server Buffer Pool Extension can use nonvolatile
storage devices for increasing amount of memory available
for buffer pool consumers. This allows usage of SSD as an
intermediate buffer pool pages thus getting price advantage
7. How Buffer Pool Extension works
Buffer Pool
Clean Page
Dirty Page
SSD
ɸ
Evict
Clean Page
DB
8. Buffer Pool Extension Configuration
ALTER SERVER CONFIGURATION
SET BUFFER POOL EXTENSION
{ ON ( FILENAME = 'os_file_path_and_name' ,
SIZE = <size> [ KB | MB | GB ] )
| OFF }
Privilege required: ALTER SERVER STATE
9. Buffer Pool Extension
Buffer Pool Extension for SSD Disks
Only Clean Pages
Esay Configuration
New DMV
SELECT * FROM sys.dm_os_buffer_pool_extension_configuration
SELECT * FROM sys.dm_os_buffer_descriptors
12. Why Govern IO?
• Providing IO level isolation between multiple workloads is a
single biggest pain point for customers (especially hosters)
using SQL Server Resource Governor to implement a private
cloud or a Database as a Service
• IO level performance predictability in combination with CPU
and Memory governance (which are shipped already) makes
a comprehensive Resource Governance solution for mission
critical applications running multiple workloads on a single
SQL instance (typically on high-end scale up machines or
large VMs)
13. Configure Resource Governor for I/O
Ability to set/get/alter Maximum and minimum IOPS per volume to Resource Governor Resource Pools
CREATE/ALTER RESOURCE POOL pool_name
[ WITH
( [ MIN_CPU_PERCENT = value ]
[ [ , ] MAX_CPU_PERCENT = value ]
[ [ , ] CAP_CPU_PERCENT = value ]
[ [ , ] AFFINITY {SCHEDULER = AUTO | (Scheduler_range_spec) | NUMANODE = (NUMA_node_range_spec)}
]
[ [ , ] MIN_MEMORY_PERCENT = value ]
[ [ , ] MAX_MEMORY_PERCENT = value ]
[ [ , ] MIN_IOPS_PER_VOLUME = value ]
[ [ , ] MAX_IOPS_PER_VOLUME = value ])
] [;]
14.
15. Delayed Durability
ACID Rules
Log Buffer
sp_flush_log is executed
The in-memory transaction log buffer fills up.
A fully durable transaction in the same database makes a change
in the database and commits
ALTER DATABASE … SET DELAYED_DURABILITY = { DISABLED |
ALLOWED | FORCED }
Talking points:The code page of a (var)char value is determined by the collation associated with the value. For example, the collation SQL_Latin1_General_CP1_CI_AS has the associated code page 1252.-- all supported collations for (var)char columns in memory-optimized tables select * from sys.fn_helpcollations() where collationproperty(name, 'codepage') = 1252;Indexes can only be created on string columns if they use a BIN2 collation. The LastName variable uses BIN2 collation. FirstName uses the database default, which is CI_AS (case-insensitive, accent-sensitive).select * from sys.fn_helpcollations() where name like '%BIN2'
Talking points:This diagram shows what happens when a table is createdTables are compiled for efficient access to table data – knowledge about indexes, columns, datatypes, etc, is baked into the DLLDLL is loaded immediately after compilationDLL is recompiled at server startup, so no risk of anyone tampering with the DLLs while the server is down