share point 2013 distributed cache

38
Issy-les-moulineaux, FR 20 JUIN 2013 Réunion Club UGSF 2013

Upload: michael-nokhamzon

Post on 14-Dec-2014

2.690 views

Category:

Technology


0 download

DESCRIPTION

Le cache distribué de SharePoint, ou les AppFabric, Comment, Pourquoi, Où ?

TRANSCRIPT

Page 1: Share point 2013 distributed cache

Issy-les-moulineaux, FR

20 JUIN 2013

Réunion Club UGSF 2013

Page 2: Share point 2013 distributed cache

Distributed Cache sous SharePoint 2013

Page 3: Share point 2013 distributed cache

Speaker : Michael Nokhamzon33

SharePoint Architect@ : [email protected] : Mickey75019www: http://mickey75019.wordpress.com

Page 4: Share point 2013 distributed cache

Speaker : Nabil Babaci

MVP SharePoint@: [email protected]: http://dotnet4ever.fr CodePlex: https://www.codeplex.com/site/users/view/nabilbabaci

Page 5: Share point 2013 distributed cache

Agenda

1. Qu’est ce que le cache ?2. Pourquoi le cache ?3. Planifier le cache4. Configurer le cache5. Quelques exemples6. Un peu de Debug7. Etat de santé8. Un peu d’archi si on a le

temps

Page 6: Share point 2013 distributed cache

Le Cache

Page 7: Share point 2013 distributed cache

Définition du cache

• Une mémoire qui enregistre temporairement des copies de données

• Diminuer le temps d'accès (R/W)• Intermédiaire

Page 8: Share point 2013 distributed cache

Qu’est-ce que le cache ?

Databases

Web Services

Application Servers

Identity Services

Hard Disks

Memory

Cache Service

Cache Cluster

Page 9: Share point 2013 distributed cache

Pourquoi le cache ?

Pourquoi le cache ? Gagner de la charge processeur (Puissance de traitement) Gagner de la bande passante

Pourquoi partager le cache ? Multiplier les bénéfices du cache

Pourquoi le cache distribué ? Il est extensible … dans une certaine mesure Plus résistant en cas de panne

Page 10: Share point 2013 distributed cache

Les inconvénients du Cache

Les données obsolètes Changement de sources, modification extrêmement fréquentes Expiration de minuterie et événements dotés, expulsion manuelle du

nœud

Le cache n’est pas aussi fort que la source de données Les BDD sont faites pour être en haute dispo, sauvegardes,

redondantes Pas le cache

Le cache a besoin de mémoire Plus d'espace mémoire et disque requis ; moins de temps réseau et

traitement requis

Page 11: Share point 2013 distributed cache

Les Caches de SharePoint

SharePoint 2007

Cache de sortie des

pages Asp.Net

Blob

FileStream Cache

Cache des objet

Distributed Cache

SP 2010SP 2013

Page 12: Share point 2013 distributed cache

SharePoint 2013 Distributed Cache Service

Installation et démarrage sur tous les Serveurs Activé par défaut sauf le SQL. Arrêt via CA, Powershell est préféré

Page 13: Share point 2013 distributed cache

Cache Setup

Compte de Ferme qui éxécute le Cache Service- AppFabric Caching Service

Identique au Sync User Profil ( setup et diminution des privilèges)

Page 14: Share point 2013 distributed cache

General Cache Server Sizing Guidelines

Serveurs de cache utilisent environ 50 % de la mémoire allouée pour le fonctionnement général

16 Go par Serveur de Cache ( si >Timeout possible pour le vidage de cache) 2 Go pour OS

Au-dessus cela fonctionnera, mais le vidage du cache peut prendre plus de temps que prévu pour l’effacer, il se peut que le serveur affiche des timeouts

Avec un serveur à 14 Go de RAM :50% * = 7 Go de stockage et de 7 Go pour le cache

Dans l’exemple précèdent,

/ (50% * = Nb de servers de caches dont vous aurez besoin.

Page 15: Share point 2013 distributed cache

Cache Implementation Serveurs dédiés pour le cache. (Pas de role WFE ou de Service Apps) Les données dans leur ensemble sont divisées et distribuées entre tous les

serveurs de cache Si un serveur tombe en panne de façon inattendue, la performance de

l'utilisateur va souffrir jusqu'à ce que d'autres serveurs se remplissent avec les données perdues

-> Ce processus peut être accéléré avec des commandes PowerShell :

- Clear-SPDistributedCacheItem- Update-SPRepopulateMicroblogLMTCache- Update-SPRepopulateMicroblogFeedCache- Stop-SPDistributedCacheServiceInstance

Page 16: Share point 2013 distributed cache

SharePoint Distributed CachesCache Name TTL Configuration Location

ActivityFeed 168 hours UserProfileApplication.FeedCacheTTLHours

ActivityFeedLMT 168 hoursUserProfileApplication. FeedCacheLastModifiedTimeTtlDeltaHours

LogonToken 10 hours SPSecurityTokenServiceManager.WindowsTokenLifetime

ServerToAppServerAccessToken 24 hours (hard coded)

ViewState 31 minutes SPWebApplication.FormDigestSettings.Timeout + 1

Search    

SecurityTrimming    

Default    

Access 1 hour (hard coded)

Bouncer 1 hour (hard coded)

Page 17: Share point 2013 distributed cache

Let’s get in Depth !App Fabric

Page 18: Share point 2013 distributed cache

AppFabric Physical Architecture

Cache Cluster: Collection de serveurs permettant un accès unique au Distributed Cache Service.

Cache Cluster Configuration: Stock la configuration des données de la ferme

Cache Host: Membre des nœuds de la ferme

Page 19: Share point 2013 distributed cache

AppFabric Logical Architecture

Named Caches: Conteneurs des éléments du cache Cached Objects: Clé/Valeur individuelle stockée dans un

cache nommé Regions: Collections d’objets mis en cache. Les objets peuvent être placés directement

dans un cache ou une région spécifique.

Page 20: Share point 2013 distributed cache

SharePoint Cache Infrastructure

Chaque objet ou region du cache est stocké UNE SEULE FOIS Sera perdu du host si éteint…

SharePoint peut avoir des problèmes avec les hôtes qui ne sont pas disponible.

Stopping a host: Stop-SPDistributedCacheServiceInstance –Graceful Remove-SPDistributedCacheServiceInstance

Starting a host: Start-SPServiceInstance Add-SPDistributedCacheServiceInstance

New-SPConfigurationDatabase -SkipRegisterAsDistributedCacheHost

Page 21: Share point 2013 distributed cache

High Availability

Requirements: Windows Enterprise Edition, ≥ 3 Hôtes SharePoint 2013, pas de support

Page 22: Share point 2013 distributed cache

PowerShell Demo

AFCache Configuration PowerShell Demo Connect-AFCacheClusterConfiguration Get-AFCache Get-AFCache | % { Get-AFCacheConfiguration –CacheName $_.CacheName}

Page 23: Share point 2013 distributed cache

Cache Configuration

Page 24: Share point 2013 distributed cache

Cache Configuration

Expiration TimeToLive

Eviction “LRU” and “None”

Secondaries Notifications Write-Behind and Read-Through

Page 25: Share point 2013 distributed cache

Cache Host Configuration

Communication Ports Cache Port (22233) Cluster Port (22234) Arbitration Port (22235) Replication Port (22236)

Size HighWatermark and LowWatermark IsLeadHost ( Gestion du cluster)

Page 26: Share point 2013 distributed cache

Memory Requirements

Allocation initiale de 5% de la mémoire physique totale ( Caching Service) CacheSize + 100MB doit être disponible dès le démarrage du service Changer le cache size:

Update-SPDistributedCacheSize Set-AFCacheHostConfiguration

Recommendations: Machine AppFabric dédiée Alloue 50% de la mémoire physique disponible >16GB of RAM

Throttling Moins de 15% sur la mémoire physique disponible Moins 4% du cache alloué disponible

Dynamic Memory n’est pas supporté

Page 27: Share point 2013 distributed cache

Watermarks

Page 28: Share point 2013 distributed cache

SharePoint Cache Management

Get/Set-SPDistributedCacheClientSetting Clear-SPDistributedCacheItem Non supporté pour :

Lire ou Ecrire dans les caches de SharePoint Créer des caches nommés supplémentaires via le modèle d'objet

SharePoint Créer des caches nommés supplémentaires sur les serveurs de cache

distribué SharePoint via AF PowerShell Besoin d'un cache d'AppFabric pour une application

personnalisée? Créer un cluster séparé pour cette application.

Page 29: Share point 2013 distributed cache

Configuration Checks

Cluster Get-AFCacheCluster Test-AFCacheClusterConnection Export-AFCacheClusterConfiguration

Host Get-AFCacheHostConfiguration Get-AFCacheStatistics –Name Get-AFCacheClusterHealth

Cache Get-AFCache | Format-Table –Autosize Get-AFCacheConfiguration Get-AFCacheStatistics -CacheName

Page 30: Share point 2013 distributed cache

Cache Tracking

Page 31: Share point 2013 distributed cache

Logs

Event Logs Microsoft-Windows-Application Server-System Services Microsoft-Windows-Application Server-Applications

DistributedCacheService.exe.config configuration/dataCacheConfig/log: location and logLevel

For PowerShell sessions Set-AFCacheAdminLogging Set-AFCacheConfigurationLogging

WCF Tracing Enable via system.diagnostics in DistributedCacheService.exe.config

Page 32: Share point 2013 distributed cache

PerfMon

AppFabric Caching: Cache and Host Total Eviction Runs (Cache and Host) Total Data Size Bytes (Cache and Host) Total Object Count (Cache and Host)

AppFabric Caching: Host Available Memory Percentage Gateway Process Time Total Available Memory Bytes Throttled Connections Count

.NET CLR Memory # Bytes in all Heaps % Time in GC

Memory Process/Working Set and Virtual Bytes

Page 33: Share point 2013 distributed cache

Cache Server Performance

Compteurs de performances dans Developer’s Dashboard # of reads # of writes # of hits # of misses time for read time for write Total I/O (how much data has been transferred in a given period of time)

Page 34: Share point 2013 distributed cache

Cache Service Health

Tracking du Cache Service : Si un des Cache Host dans le Cluster est down(Availability) Cache host est en état throttled (Availability) Le noeud de haute disponibilité pour le Cache Distribué de SP n'est

pas disponible (Availability) –arrive quand il ya moins de 2 serveurs exécutant le service de cache

Mauvais réglage Firewall sur le Cache Host (Configuration) Existe au moins un cache host dans le cluster et SP ne le sais

pas(Configuration) – arrive quant le service de cache est désactivé (SP) mais AppFabric Caching Service tourne

Objets mis en cache ont été expulsées(Configuration) – indique que “l’éviction” s’est déroulé

Page 35: Share point 2013 distributed cache

Conclusion

Page 36: Share point 2013 distributed cache

Conclusion Les details de la configuration sont stockés dans la

Config DB 10 SharePoint Caches

Caches personnalisés ne sont pas supportés; il faut utiliser des serveurs indépendant.

High Availability/Redundancy non disponible pour les caches de SharePoint

AppFabric PowerShell cmdlets peuvent être utilisés pour surveiller et manipuler les caches.

Page 37: Share point 2013 distributed cache

© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Questions?

Page 38: Share point 2013 distributed cache

© 2011-2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows 7 and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted

to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.