Hay escenarios en los que SharePoint tiene que manejar grandes volúmenes de información y en estos casos es posible que puedan surgir problemas de rendimiento. En esta sesión veremos las consideraciones y buenas prácticas a tener en cuenta tanto en el motor de SQL Server como en el modelado y diseño de las estructura de SharePoint, código de los webparts y demás configuraciones.
Optimizando SharePoint para grandes volúmenes de información con RBS
1. #SQSummit13
@erincon
Optimizando SharePoint para
grandes volúmenes de información
CB40001
Mentor y Director Dpto Relacional
erincon@solidq.com
MVP SQL Server
Eladio Rincón
@jquintozamora
SharePoint and Search Specialist
jquinto@solidq.com
MSCA, MCITP, MCPD SharePoint
José Quinto Zamora
2. EN CUMPLIMIENTO CON LA LEY 15/1999 DE PROTECCION DE DATOS DE
CARÁCTER PERSONAL, PONEMOS EN TU CONOCIMIENTO QUE
ESTA SESIÓN VA A SER GRABADA
POR SOLIDQ Y QUE ESTA GRABACIÓN PODRÍA SER UTILIZADA COMO MATERIAL
DE MARKETING Y HACERSE PUBLICA A TRAVÉS DE DIVERSOS MEDIOS, COMO
POR EJEMPLO NUESTRA PAGINA WEB.
TENIENDO EN CUENTA QUE TU IMAGEN PUEDE APARECER EN ESA GRABACIÓN,
SI NO DESEAS APARECER, ROGAMOS NOS LO COMUNIQUES POR LOS MEDIOS
QUE YA CONOCES.
COMUNICADO
2
3. Agenda
1. Introducción
– Componentes de SharePoint
– Arquitecturas
2. Retos del Binomio SharePoint – SQL Server
• Buenas practicas del Front-End
• Buenas practicas del Back-End
3. Introducción y Caso Práctico de RBS
4. Conclusiones
3
4. Componentes de SharePoint 2013
- Servidores Web – Front-End
- NLB configurado a parte
- Servidores de Aplicaciones
- Request Management *
- Distributed Cache *
- Office Web App en servidor separado
- Search + components
- Servidor(es) de BD – Back-End
- Separación de Roles
- Comunicaciones entre Servidores
- Latencia
- Ancho de banda
4
6. Arquitectura Tipo-Medium
Caso Real de Granja
Mediana
- Usuarios = 4000
- #Documentos >= 1M
- Total GB = 300 GB
6
Front-End
Balanceo de carga
Back-End
Cluster de SQL Server
Servidor de Aplicaciones
- Search: Crawl, Index
-
Excel, Visio, Metadatos, …
7. Arquitectura Tipo-Large
- MSFT: Intranet
Empresarial
de Colaboración
- Usr = 90.000/día
- RPS = 700
- RPD= 19.000.000
- #Items: 23 M
7
4 Servidores Frontales
en Balanceo de Carga
BackEnd – Cluster de
SQL Server
4 Servidor de
Aplicaciones
32 GB RAM, 2 Quad @
2,33, HW NLB, 300GB
64GB, 4 six core @
2,4, HW NLB, 300GB, 1
Gigabit
32 GB, 4 quad @2.4, (1.25
TB * 7), SQL Data (4), Logs
(1), TempBD (1), Backup (1)
8. Y en mi caso, ¿Qué arquitectura
debería usar?
Capacity Planning
1. Usuarios Concurrentes
2. Peticiones por Segundo (RPS)
3. Peticiones por Día (RPD)
4. Usuarios Activos por Día
5. Distribución de la Carga de Trabajo
8
18. Latencias en Servidor ¿RBS?
18
Mucho contenido y grande
• >= 1MB
Muchos lectores
• Gestión Memoria
Pocos cambios
• En archivos candidatos
Límites de recursos
• Memoria, CPU, Disco
19. ¿Qué es RBS?
19
SQL Server
Application
RBS Client
Library
Provider
Library
Application
Database
RBS Aux
Resources
BLOB Store
(File Group
And tables)
Local FILESTREAM
20. ¿Qué es RBS?
20
SQL Server
Application
RBS Client
Library
Provider
Library
Application
Database
RBS Aux
Resources
BLOB Store
Database
BLOB Store
(File Group and tables)
Remote FILESTREAM
***** a través de terceros *****
21. ¿Qué es RBS?
21
***** a través de terceros *****
SQL Server 2
SQL Server 1
Application
RBS Client
Library
Provider
Library
Application
Database
RBS Aux
Resources
BLOB Store
Database
BLOB Store
(File Group and tables)
Remote FILESTREAM
22. Cuando no usar RBS para SharePoint
22
Reducción de espacio
Bases de datos más grande
Mejores Backups
Mejores lecturas < 1MB
Sin mantenimiento
***** sin terceros *****
24. Conclusiones
1. Tomemos el tiempo necesario para evaluar
métricas antes de decidir arquitectura
2. Hagamos un mantenimiento de las mismas
3. Integremos ambos equipos DBA y SPAdmin para
conseguir resultados optimos
24
WorkingwithResquest Management: http://blogs.technet.com/b/speschka/archive/2012/09/14/working-with-request-manager-in-sharepoint-2013.aspx¿Qué es Request Management? http://blogs.technet.com/b/hablamoss/archive/2013/03/13/sps-2013-request-management-m-243-dulo-principal-y-terminolog-237-a.aspxSP2013 Topologias.http://zoom.it/t7G3#fullSP2013 Ejemplo de MS: http://zoom.it/AgjL#fullExplica Distributed Cache: http://zoom.it/t7G3#fullConexión entre ServidoresSoportadasgranjas con servidores en distintos Data Center, siempreque:Latencia sea <1ms al 99,9%Velocidad de ancho de banda sea comomínimo 1 gigabit porsegundo
Optimizar el servidor de desarrollo: http://www.spdeveloper.co.in/sharepoint2013/optimizing-the-configuration-of-development-farm.aspxApropiado para:Entornos de desarrollo y pruebasEntornos con menos de 100 usuariosConsejos:Limitar el uso de memoria de los servicios de búsqueda (noderunner)Limitar el uso de memoria de CachéDistribuidaLimitar la creación de Aplicaciones Web (w3wp)
Aquí hay dos opciones, o bien hacer lo que la mayoría de consultores de SharePoint, es decir, fijarnos en las recomendaciones que da Microsoft para entornos similares y por seguridad, incrementar algo los recursos hardware o bien estudiar los distintos casos reales que están funcionando bien similares al nuestro. Ajustarnos a esos parámetros iniciales y hacer un seguimiento de los recursos, contadores de rendimiento, etc. En las dos slides siguientes veremos dos casos reales de implementación de granja mediana y grande.
Enterprise intranet collaborationenvironmenttechnical case study (SharePoint Server 2010): http://technet.microsoft.com/en-us/library/ff758650.aspx
Realizar un estudio de características de nuestro sistemaCapacityPlanningUsuarios ConcurrentesPeticiones por Segundo (RPS)Peticiones por Día (RPD)Usuarios Activos por DíaDistribución de la Carga de Trabajo
EL objetivo de esta demostración es ver las distintas opciones que tenemos para ver las estadísticas de uso de nuestro SharePoint 2013.Comentar que el Web AnalitycsService ya no está y que lo han integrado con la búsqueda en su lugar.Ver como se configuran los logs de IISVer como se seleccionan más camposComentar que no tiene límite de retenciónVer como se configura el Logging de SharePointDesde la CA todos los posibles eventos que tenemosVer la ruta de LOGS como genera los UsageEcharle un vistazo a la BD de WSS_Logging y comentar el proceso que lleva para estar ahíComentar que tiene límite de retención por defecto de 14. (máximo limite 31)Analizar datos con LogParser 2.2 del IISAnalizar datos con PowerPivoty PivotTableInformación de Apoyo:Analyzing your SharePoint Server 2013 IIS LogsTo discover key metrics about an existing SharePoint Server 2013 deployment, such as how many users are active, how heavily they are using the system, what kind of requests are coming in, and from what kind of clients they originate, it is necessary to extract data from ULS and IIS logs. One of the easiest ways to acquire this data is to use Log Parser, a powerful tool available free for download from Microsoft. Log Parser can read and write to a number of textual and binary formats, including all the IIS formats.For detailed information about how to analyze SharePoint Server 2013 usage using Log Parser, read Analyzing Microsoft SharePoint Products and Technologies Usage (http://www.microsoft.com/downloads/details.aspx?familyid=f159af68-c3a3-413c-a3f7-2e0be6d5532e&displaylang=en&tm). You can download Log Parser 2.2 at http://www.microsoft.com/downloads/details.aspx?FamilyID=890CD06B-ABF8-4C25-91B2-F8D975CF8C07&displaylang=en. SharePoint 2010 Capacity Management: Log Parserhttp://blogs.msdn.com/b/mohamed_el_ashmawi/archive/2011/09/23/sharepoint-2010-capacity-management-log-parser.aspxhttp://blogs.msdn.com/b/jimmiet/archive/2010/08/07/10047368.aspx
BLOB Cache: consiste en habilitar una caché a nivel de WFE donde se almacenan los archivos tipo blob (grandes), los cuales en lugar de ir a pedirse al SQL Server, son proporcionados directamente por el servidor web. Ideal para entornos de balanceo de carga donde se realizan muchas peticiones de lectura.Para configurarlo, hay que hacerlo a nivel de web.config de cada servidor web:We need to change the web.config to enable the BLOB cache. Find the BlobCache tag on the configuration/SharePoint node on the web.config. Here is an example of a configured Blob Cache:<BlobCache location=”C:\BlobCache\14″ path=”\.(gif|jpg|jpeg|jpe|jfif|bmp|dib|tif|tiff|ico|png|wdp|hdp|css|js|asf|avi|flv|m4v|mov|mp3|mp4|mpeg|mpg|rm|rmvb|wma|wmv)$” maxSize=”10″ enabled=”true” max-age=”36000″ />The location attribute defines where SharePoint is going to save the cached files.The path attribute represents a regex defining the file extensions to be cached.The maxSize attribute defines the maximum size of the cache in Giga bytes.The enabled attribute defines if the cache is enabled.The max-age attribute defines the maximum time in seconds the browsers can cache the files locally and avoid making requests for these file to the server. This setting affect how the users’ browser cache the files defined on the path attribute.Más info: http://rajinihasan.blogspot.com.es/2011/02/sharepoint-blobcache-explained.htmlObject CacheCaché que se encarga de hacer el cacheo de objectos SharePoint, tales como listas, bibliotecas, sitesettings y page layouts, etc..Más info: http://technet.microsoft.com/en-us/library/cc261797.aspxOutPut CacheEs una caché de HTML evita el tener que mandar a renderizar le contenido a SharePoint, simplemente sirve el HTML cacheado. Ideal para entornos de publicación con muchas Request Per Second.Caché configuration: http://myspworld.wordpress.com/2012/05/09/sharepoint-2010-cache-configuration/Kerberos: http://windows-scripting.org/2010/11/01/sharepoint-performance-tuning/
Configuracion de memoria: SQL Max Memory = TotalPhyMem - (NumOfSQLThreads * ThreadStackSize) - (1GB * CEILING(NumOfCores/4))NumOfSQLThreads = 256 + (NumOfProcessors*- 4) * 8 ThreadStackSize = 2MB on x64 or 4 MB on 64-bit (IA64) (* IfNumOfProcessors > 4, else 0)Validar que el collation por defecto en la instancia es: Latin1_General_CI_AS_KS_WSEl grado máximo de paralelismo en la instancia de SQL Server debe estar configurado a 1
Separación de archivos por naturaleza: separar datos y logs fundamentalmenteTambién separar datos de tempdb
Ubicación de archivos normalmente para Archivos de datos: crearlos de igual tamaño vigilar su crecimiento teóricamente SQL Server distribuye de forma homogeneraAlmacenamiento de archivosDependeMultiples ArchivosCuanto antesDificil reorganizerNúmero de FilegroupsSólouno
Por defecto todo sucede en un único coreUtilizando ResourceGovernor se puede “sobre-escribir” el valor por defectoRecomendación: utilizar ResourceGovernor para que las tareas de mantenimiento se ejecuten bajo un usuario concreto que tiene habilitados múltiples cores para esas operaciones.Las operaciones DBCC por defecto en SQL Server se realizan multi-coreAl estar el grado de paralelismo a 1 se harán con 1 sólo coreEs deseable hacerlo multi-core.Si por casualidad tiene otra isntalacion SQL Server que necesita deshabilitar paralelismo para dbcccheckdb: trace flag 2528
http://technet.microsoft.com/en-us/library/ee748649.aspxMost optimal use of RBSBecause RBS is a solution created for a specific set of conditions, there is an optimal use of RBS in which the benefits outweigh the costs. The optimal environment for using RBS is an environment where the following is true:You want to store fewer large BLOBs (256 KB or larger) for read-intensive or read-only access.The resources on the computer that is running SQL Server might become a performance bottleneck.The expense of high-cost drive space is greater than the expense of increased IT operations complexity that might be introduced by using RBS.Least optimal use of RBSRBS is not a good solution for all environments. The costs will outweigh the benefits in some circumstances. The least optimal environment for using RBS would be an environment where the following is true:You want to store many small BLOBs (256 KB or less) for write-intensive access.The resources on the computer that is running SQL Server are not a performance bottleneck.The expense of increased IT operations complexity that might be introduced by using RBS is greater than high-cost drive space.
Cuando las lecturas son de menos de 1MB (hay literatura que indica <256Kb) no existen mejorasSi el % de accesos a estos documentos no es alto, no sirve para muchoLos backups siguen siendo necesarios porque el Filestream está incluido en los backups