I am trying to gather some stats on comparison of run time vs performance between Litespeed backups and sql native backups. As we are no longer going to use Lite Speed [even though i personally loved that SW], have to gather metrics how SQL will perform using native compression backup]
So i am looking for a way to reduce CPU usage to X % while taking native compression backups. In Litespeed we just specified this option in advanced tabs and saw everything running fine. I am aware of resource governor, but due to some constraints not able to use it. Will need to work on that. But is there a better and smarter way to do this. Please suggest
Edit.. Have to add, as per security and company policies we cannot use third party or external SP's to be created. I saw this can be achieved using OLa 's script as well, but we wont get approvals to introduce this :(
-
Throttle in Ola's scripts is only valid if you are using LITESPEED anyways.Jonathan Fite– Jonathan Fite2017年04月28日 16:10:26 +00:00Commented Apr 28, 2017 at 16:10
-
I blogged about this topic here.SqlWorldWide– SqlWorldWide2017年04月28日 16:20:17 +00:00Commented Apr 28, 2017 at 16:20
-
@SqlWorldWide, thanks for the article, but i am looking on how to throttle CPU value because other process fails when backup uses all 100 % cpuBeginnerDBA– BeginnerDBA2017年04月28日 17:22:44 +00:00Commented Apr 28, 2017 at 17:22
-
1How about you use compression along with buffercount and maxtransfersize .. do a trial and error approach and go with the numbers that look more promising in your env.Kin Shah– Kin Shah2017年04月28日 17:23:05 +00:00Commented Apr 28, 2017 at 17:23
-
@Kin, thanks . i am definitely testing that as well. However the problem is such that we have to throttle CPU as this being one of the busiest system we have with TB's of database. We have over 512 GB's of RAM and more than 128 Logical processors but apps are such that if backup eats up 100 5 of CPU they tend to slow down. so was looking a native way of throttling this downBeginnerDBA– BeginnerDBA2017年04月28日 17:56:56 +00:00Commented Apr 28, 2017 at 17:56
2 Answers 2
Resource Governor can control the resource consumption of a backup.
By default, backing up using compression significantly increases CPU usage, and the additional CPU consumed by the compression process can adversely impact concurrent operations. Therefore, you might want to create a low-priority compressed backup in a session whose CPU usage is limited byResource Governor when CPU contention occurs. This topic presents a scenario that classifies the sessions of a particular SQL Server user by mapping them to a Resource Governor workload group that limits CPU usage in such cases.
Use Resource Governor to Limit CPU Usage by Backup Compression (Transact-SQL)
I know this is third party but it's free and powerful. I would check out Http://Dbatools.io
In addition you can specify buffer size, number of files (Striping). Etc. definitely worth a look.
-
Almost every parameter/option offered by
Backup-DbaDatabase
indbatools
is available via the nativeBackup database
T-SQL. Usingdbatools
here isn't really necessary, it'll just be acting as a different front-end. I'm a huge advocate fordbatools
but it's not needed to address the OP's optimization goals.alroc– alroc2020年07月07日 16:24:35 +00:00Commented Jul 7, 2020 at 16:24