REL30001

- SQL Server Toolbox

@erincon
@SQSummit13

Eladio Rincón
erincon@solidq.com

Depto. Relacional, MVP, MCT
Factores que Limitan la Escalabilidad
Producto
Hardware
Aplicaciones
Combinación

3
Ciclo de Vida de Software en Servidor
Baseline

Identify
bottlenecks
Measure
Performance

Make
Changes
4
Cuatro Áreas/Medidas a Actuar
Sintéticas
Unitarias
Concurrencia
Vida Real
Cuatro Áreas/Medidas a Actuar
Vida Real
Concurrencia
Unitarias
Sintéticas
Vida Real – MCR
Medir
Contextualizar

Reaccionar
Medir
Uso de Recursos
Latencias
Aprox. Waits & Queues

8
Medir: Waits & Queues

9
Herramientas para Medir y Contexto
El Medieval
Windows Performance Monitor
PAL (http://pal.codeplex.com)
SQL Server Profil...
DEMO
Revisión Herramientas
TSQL-CSI, PAL
Definir Baseline e Históricos
Spotlight
Idera
SQL Sentry
System Center
Nagios
¿Monitor de ERP?
¿Relación entre
indicadores...
Cuatro Áreas/Medidas a Actuar
Vida Real
Concurrencia
Unitarias
Sintéticas
Herramientas para Medir y Contexto
Medir
Windows Performance Monitor
SQL Server Profiler
DMVs, DMFs (2005+)
Analizar
PAL, ...
DEMO
Revisión Herramientas
RML Tools
Cuatro Áreas/Medidas a Actuar
Vida Real
Concurrencia
Unitarias
Sintéticas
Medidas Sintéticas
Recursos
FTDW
Hyper-V
tpc.org

Herramientas
Fabricantes
Independientes
Mediciones de E/S: Herramientas
Para reproducir patrones E/S que genera
Microsoft SQL Server
SQLIO
– De Microsoft, línea d...
Sintáxis SQLIO
Parm Description
-o
# of outstanding I/O requests

-k
-s
-b
-f
-F
-t

R or W (read or write)
Duration (seco...
Guías para usar SQLIO
Archivos Grandes (>cache de SAN)
SAN auto-tuning necesita tiempo
Realiza pruebas de:
– Lectura vs Es...
Procedimiento de uso de SQLIO
Ejecutar

• Crear .bat y ejecutar test
• Params: -s, -o, - b, -f

Parsear

• Jonathan Kehayi...
DEMO
Usando SQLIO
IOMeter – Configuración

23
IOMeter – Resultados

24
DEMO
Paseo por IOMeter
Conclusiones
Debes medir SQL Server para:
•
Conocer límites
•
Anticiparte a problemas, y
•
Mantenerlo en marcha

Por donde...
Si quieres disfrutar de las mejores sesiones de
nuestros mentores de España y Latino América,
ésta es tu oportunidad.
http...
Upcoming SlideShare
Loading in …5
×

Toolbox de SQL Server, herramientas para facilitar trabajo del DBA

821 views

Published on

http://summit.solidq.com/madrid/2013/
SQL Server es muy popular por la facilidad de gestión y administración de que goza en el mercado; en la siguiente sesión conocerá qué utilidades, herramientas y scripts tiene disponibles en la comunidad para poder analizar y explotar su infraestructura hasta el más bajo nivel. Estas herramientas serán presentadas desde el punto de vista de ciclo de vida de su infraestructura (los cuatro bolígrafos BIC).

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
821
On SlideShare
0
From Embeds
0
Number of Embeds
6
Actions
Shares
0
Downloads
11
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • Como cuando llega a una nueva ciudad, necesita conocer el funcionamiento natural del entorno; transporte público, POIs, accesos, congestión, etc.Un servidor SQL Server es parecido; tiene unos recursos por los que compiten los usuariosAproximación Waits&Queueshttp://www.google.es/url?sa=t&rct=j&q=&esrc=s&frm=1&source=web&cd=1&cad=rja&ved=0CCwQFjAA&url=http%3A%2F%2Fdownload.microsoft.com%2Fdownload%2F4%2F7%2Fa%2F47a548b9-249e-484c-abd7-29f31282b04d%2FPerformance_Tuning_Waits_Queues.doc&ei=ZS-zUd7KLOGw7AaK0oGADA&usg=AFQjCNFRIebSlMLnry8gH99CQklhdmokJw&sig2=jsQ0DOuuKLK3PRgiWW_Xng&bvm=bv.47534661,d.ZWUAnalizandométricas#UsersRequests per second (RPS) Disk I/O per second (IOPS) Disk Megabytes transferred per second (MBPS) Disk I/O latency
  • PAL: http://pal.codeplex.comBaseliningwithperfmon:http://technet.microsoft.com/en-us/library/cc781394(v=ws.10).aspxhttp://blogs.technet.com/b/askperf/archive/2009/11/06/ten-tips-and-tricks-for-server-baselines.aspxhttp://blogs.lessthandot.com/index.php/DataMgmt/DBAdmin/sql-server-dba-tip-baselineDMVs:Troubleshooting Performance Problems in SQL Server 2008 (also available for SQL Server 2005) –  This whitepaper is where I first turn people when they want to start learning about how to fix their performance issues with SQL Server.  It hasn’t been updated for SQL Server 2012, but the concepts remain the same, and the approaches recommended are just as valid.SQL Server 2005 Performance Tuning using the Waits and Queues – Similar to the first item, here’s another white paper in desperate need of an update but with information just as useful today as when it was first written.  When you look at how many DBAs performance tune their environments today, the roots of those methodologies are found in this white paper.  In fact, many third party monitoring tools are built around this white paper.RMTools:http://www.microsoft.com/en-us/download/details.aspx?id=8161TSQL-CSI:http://www.solidq.com/ib-es/servicios/sqlserver-relacional/Pages/Servicio-TSQL-CSI-de-SolidQ.aspx
  • PAL:http://pal.codeplex.comTSQL-CSI:http://www.solidq.com/ib-es/servicios/sqlserver-relacional/Pages/Servicio-TSQL-CSI-de-SolidQ.aspx
  • PAL: http://pal.codeplex.comBaseliningwithperfmon:http://technet.microsoft.com/en-us/library/cc781394(v=ws.10).aspxhttp://blogs.technet.com/b/askperf/archive/2009/11/06/ten-tips-and-tricks-for-server-baselines.aspxhttp://blogs.lessthandot.com/index.php/DataMgmt/DBAdmin/sql-server-dba-tip-baselineDMVs:Troubleshooting Performance Problems in SQL Server 2008 (also available for SQL Server 2005) –  This whitepaper is where I first turn people when they want to start learning about how to fix their performance issues with SQL Server.  It hasn’t been updated for SQL Server 2012, but the concepts remain the same, and the approaches recommended are just as valid.SQL Server 2005 Performance Tuning using the Waits and Queues – Similar to the first item, here’s another white paper in desperate need of an update but with information just as useful today as when it was first written.  When you look at how many DBAs performance tune their environments today, the roots of those methodologies are found in this white paper.  In fact, many third party monitoring tools are built around this white paper.RMTools:http://www.microsoft.com/en-us/download/details.aspx?id=8161TSQL-CSI:http://www.solidq.com/ib-es/servicios/sqlserver-relacional/Pages/Servicio-TSQL-CSI-de-SolidQ.aspx
  • PAL: http://pal.codeplex.comBaseliningwithperfmon:http://technet.microsoft.com/en-us/library/cc781394(v=ws.10).aspxhttp://blogs.technet.com/b/askperf/archive/2009/11/06/ten-tips-and-tricks-for-server-baselines.aspxhttp://blogs.lessthandot.com/index.php/DataMgmt/DBAdmin/sql-server-dba-tip-baselineDMVs:Troubleshooting Performance Problems in SQL Server 2008 (also available for SQL Server 2005) –  This whitepaper is where I first turn people when they want to start learning about how to fix their performance issues with SQL Server.  It hasn’t been updated for SQL Server 2012, but the concepts remain the same, and the approaches recommended are just as valid.SQL Server 2005 Performance Tuning using the Waits and Queues – Similar to the first item, here’s another white paper in desperate need of an update but with information just as useful today as when it was first written.  When you look at how many DBAs performance tune their environments today, the roots of those methodologies are found in this white paper.  In fact, many third party monitoring tools are built around this white paper.RMTools:http://www.microsoft.com/en-us/download/details.aspx?id=8161TSQL-CSI:http://www.solidq.com/ib-es/servicios/sqlserver-relacional/Pages/Servicio-TSQL-CSI-de-SolidQ.aspx
  • Busca los límitesArquitecturas de Referencia:http://www.microsoft.com/en-us/sqlserver/solutions-technologies/data-warehousing/reference-architecture.aspxMAP para Physicalto Virtual: http://technet.microsoft.com/en-us/solutionaccelerators/hh324976.aspxTPCC: http://www.tpc.org/
  • http://www.toadworld.com/platforms/sql-server/w/wiki/10406.san-performance-tuning-with-sqlio.aspxDownload:IOMeterhttp://www.iometer.org/SQLIO Disk Subsystem Benchmark Toolhttp://www.microsoft.com/en-us/download/details.aspx?id=20163ParsingIOMeter:http://vmktree.org/iometer/
  • You can also capture processor latency with –LP
  • Explain that you need to use big files to avoid files being cached on San cache. It is OK to have SAN cache enabled but your database needs to be bigger than your SAN cache so adjust the file size appropriately.The performance gain using multipath can be from none (or worst performance) to near linear increase in performance.Some SANs have auto-tuning features that improve performance against a load after a time. Set a duration of the tests that allows your SAN to autotune.Different IO sizes can have a big impact on the performance. SQL Server page is 8KB but lots of IO are bigger than 8KB (due to read-ahead for example)If have a OLAP system you will probably be more interested on sequential speed and if you have a OLTP you are more concerned about random IOPS. Anyway, if you currently know how your load is, you can test the storage against sequential and random loads and then calc your own “performance” based on the read/writes and random/sequential distribution you have.SQL Server produces a high number of outstanding Ios during some operations (checkpoint for example). This increases the performance if the hardware can cope with it. It is better than you know the limit of outstanding IO you can support until the performance per IO decreases.
  • Toolbox de SQL Server, herramientas para facilitar trabajo del DBA

    1. 1. REL30001 - SQL Server Toolbox @erincon @SQSummit13 Eladio Rincón erincon@solidq.com Depto. Relacional, MVP, MCT
    2. 2. Factores que Limitan la Escalabilidad Producto Hardware Aplicaciones Combinación 3
    3. 3. Ciclo de Vida de Software en Servidor Baseline Identify bottlenecks Measure Performance Make Changes 4
    4. 4. Cuatro Áreas/Medidas a Actuar Sintéticas Unitarias Concurrencia Vida Real
    5. 5. Cuatro Áreas/Medidas a Actuar Vida Real Concurrencia Unitarias Sintéticas
    6. 6. Vida Real – MCR Medir Contextualizar Reaccionar
    7. 7. Medir Uso de Recursos Latencias Aprox. Waits & Queues 8
    8. 8. Medir: Waits & Queues 9
    9. 9. Herramientas para Medir y Contexto El Medieval Windows Performance Monitor PAL (http://pal.codeplex.com) SQL Server Profiler DB Engine Tuning Advisor El Renacimiento DMVs, DMFs, y Planes Ejecución (2005+) SQL Performance Data Collectors y XEs RML Tools TSQL CSI by SolidQ
    10. 10. DEMO Revisión Herramientas TSQL-CSI, PAL
    11. 11. Definir Baseline e Históricos Spotlight Idera SQL Sentry System Center Nagios ¿Monitor de ERP? ¿Relación entre indicadores?
    12. 12. Cuatro Áreas/Medidas a Actuar Vida Real Concurrencia Unitarias Sintéticas
    13. 13. Herramientas para Medir y Contexto Medir Windows Performance Monitor SQL Server Profiler DMVs, DMFs (2005+) Analizar PAL, DB Engine Tuning Advisor RML Tools Planes Ejecución
    14. 14. DEMO Revisión Herramientas RML Tools
    15. 15. Cuatro Áreas/Medidas a Actuar Vida Real Concurrencia Unitarias Sintéticas
    16. 16. Medidas Sintéticas Recursos FTDW Hyper-V tpc.org Herramientas Fabricantes Independientes
    17. 17. Mediciones de E/S: Herramientas Para reproducir patrones E/S que genera Microsoft SQL Server SQLIO – De Microsoft, línea de comando IOMeter – OpenSource, GUI, dev. por Intel
    18. 18. Sintáxis SQLIO Parm Description -o # of outstanding I/O requests -k -s -b -f -F -t R or W (read or write) Duration (seconds) Size of the IO request in bytes Type of IO to issue (‘random’ or ‘sequential’) parameters file # of threads
    19. 19. Guías para usar SQLIO Archivos Grandes (>cache de SAN) SAN auto-tuning necesita tiempo Realiza pruebas de: – Lectura vs Escritura – Aleatorio vs Secuencial – Tamaños diferentes de operación – Diferentes colas (outstanding IO)
    20. 20. Procedimiento de uso de SQLIO Ejecutar • Crear .bat y ejecutar test • Params: -s, -o, - b, -f Parsear • Jonathan Kehayias, Linchi Shea • O, tu Método Analizar • Excel
    21. 21. DEMO Usando SQLIO
    22. 22. IOMeter – Configuración 23
    23. 23. IOMeter – Resultados 24
    24. 24. DEMO Paseo por IOMeter
    25. 25. Conclusiones Debes medir SQL Server para: • Conocer límites • Anticiparte a problemas, y • Mantenerlo en marcha Por donde empezar, depende de: • Urgencia, Necesidad/Sponsors, Presupuesto • Cuantos más bolis BIC, mejor 26
    26. 26. Si quieres disfrutar de las mejores sesiones de nuestros mentores de España y Latino América, ésta es tu oportunidad. http://summit.solidq.com/madrid/ Síguenos: 29

    ×