1.12k likes | 1.37k Views
Very Large Databases. Administration. @ murilocmiranda http://www.sql.pt/ murilo.miranda@gmail.com. AGENDA. AGENDA. What is a VLDB? Typical Troubles OS Config Instance Config DB Config Maintenance. VLDB??. VLDB??. There’s no official definition. VLDB??.
E N D
Very Large Databases Administration @murilocmiranda http://www.sql.pt/ murilo.miranda@gmail.com
AGENDA What is a VLDB? Typical Troubles OS Config Instance Config DB Config Maintenance
VLDB?? There’s no official definition.
VLDB?? There’s no official definition. Typically occupying TB range.
VLDB?? There’s no official definition. Typically occupying TB range. Billions of rows.
VLDB?? There’s no official definition. Typically occupying TB range. Billions of rows. Typically: OLAP or OLTP with large amount of users.
VLDB?? Wikipedia… A very large database, or VLDB, is a database that contains an extremely high number of tuples (database rows), or occupies an extremely large physical filesystem storage space. The most common definition of VLDB is a database that occupies more than 1 terabyte or contains several billion rows, although naturally this definition changes over time.
SQL vs. VLDB Maximum database size
SQL vs. VLDB Maximum database size 524,272 TB
16 TB SQL vs. VLDB Maximum data file size 2 TB Maximum log file size A limit of 32.767 files which can be distributed between 32.767 filegroups.
Typical Troubles Maintenance
Typical Troubles Backups Maintenance
Typical Troubles Backups Maintenance Indexes
Typical Troubles Backups Maintenance Indexes Statistics
Typical Troubles Backups Maintenance Indexes Statistics Disaster Recovery
Typical Troubles Performance Backups Maintenance Indexes Statistics Disaster Recovery
OS CONFIG • Perform Volume Maintenance
Turning on Instant Initialization to speed up data file growth • and restores. OS CONFIG
OS CONFIG • Storage Layout
Plan an efficient storage layout. OS CONFIG
Plan an efficient storage layout. OS CONFIG • Normally, the more spread, the more effective.
Plan an efficient storage layout. OS CONFIG • Normally, the more spread, the more effective. • Suggestion: SQL BIN SQL DATA SQL IDX SQL LOGS SQL TMP
OS CONFIG • Mountpoints
Mountpoints could be a good strategy. OS CONFIG
Mountpoints could be a good strategy. OS CONFIG Mountpointsare persistent directories that point to disk volumes.
Pros: OS CONFIG • Scalable. • Save drive letters (limited to 26). • Easy to add. • No need to restart SQL Server.
Cons: OS CONFIG • Looks like a simple folder. • Need a different approach to monitor.
OS CONFIG So, if you don’t know the server….
OS CONFIG • Partition Alignment
Setting the partition offset properly can improve up to 30% the performance. OS CONFIG
Setting the partition offset properly can improve up to 30% the performance. OS CONFIG • Partition alignment increases throughput (bytes/sec) and reduce disk queues.
Setting the partition offset properly can improve up to 30% the performance. OS CONFIG • Partition alignment increases throughput (bytes/sec) and reduce disk queues. A partition that is track misaligned will occasionally cause 2 I/O operations instead of one.
OS CONFIG Unless performed at the time of partition creation, the default alignment offset(31,5 Kb) will result in unaligned partitions on versions of Windows up to and including Windows Server 2003.
OS CONFIG This offset is associated with hidden sectors, which basically store partition information.
OS CONFIG This offset is associated with hidden sectors, which basically store partition information. • Considering that: • Each disk sector has 512 bytes. • Win. 2003 has 63 hidden sectors.
OS CONFIG This offset is associated with hidden sectors, which basically store partition information. • Considering that: • Each disk sector has 512 bytes. • Win. 2003 has 63 hidden sectors. 512 * 63 = 31,5 Kb
OS CONFIG Example: Stripe Unit Size: 64Kb* Allocation Unit Size: 64Kb Optimal values * Defined by storage team.
OS CONFIG Example: Stripe Unit Size: 64Kb* Allocation Unit Size: 64Kb Optimal values Data (Alloc. Unit Size) Stripe Size * Defined by storage team.
OS CONFIG Optimal solution: Data (Alloc. Unit Size) Stripe Size
OS CONFIG • Best Practice: • Set an offset of 1024 Kb. • This value works for mostly disks out there. • Allocation Unit Size = Stripe Unit Size. The rule: Offset / Allocation unit = INTEGER Eg: 1024/64=16
WARNIG Some I/O subsystem vendors intercepting what Windows is trying to do and are still creating partitions with the incorrect offset– Even for Windows 2008+. ALWAYS check!
OS CONFIG Anti-Virus in servers… is really a need?
OS CONFIG • Cost money to license. • Maintenance costs. • Can cause problems in Prod. • Can’t protect to zero-day exploits.
OS CONFIG What can we do instead?
OS CONFIG • Keep the servers patched. • Configure the firewall properly. • Restrict server’s access. • You can install AV… in workstations!