share point 2013 distributed cache
DESCRIPTION
TRANSCRIPT
SharePoint 2013 Distributed Cache
Agenda Qu’est ce que le cache ?
Pourquoi le cache ?
Quelques exemples
Un peu d’archi si on a le temps
Qu’est-ce que le cache ?
Qu’est-ce que le cacheDatabases
Web Services
Application Servers
Identity Services
Hard Disks
Memory
Cache Service
Cache Cluster
Pourquoi le cache ? Pourquoi le cache ? Gagner de la charge processeur 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
Les désavantages du Cache Les données mises en cache peuvent devenir obsolètes Changement de sources Atténuations : Expiration de minuterie et événement dotés, expulsion manuelle Le cache n’est pas aussi fort que la source de données Les BDD sont faites pour être en haute dispo, sauvegardable, et redondantes Pas le cache Les mesures d'atténuation : Cache hautement disponible, ou chute dans la
source Le cache a besoin de mémoire Plus d'espace mémoire et disque requis ; moins de temps réseau et traitement
requis Atténuation : Ne pas utiliser de cache
Les Caches de SharePoint Blob Cache
Les bases de données – Les lectures disques sont plus rapides qu’un A/R vers la BDD Cache de sortie des pages Asp.Net
Copie en local des pages HTML Cache des objets
Les requêtes CrossSite (pas besoin de rééxécuter la requête) Filesystem Cache
Sérialiser les objets persistants de SharePoint (configDB) Distributed Cache
Stocke différentes données des services SharePoint
SharePoint 2013 Distributed Cache Service SharePoint install et démarre le Distributed Cache sur tout les serveurs de la ferme.
C’est une option active par défaut sur tous les serveurs sauf le SQL. Il est possible d’arrêter le service via la CA, mais il est recommandé d’utiliser la commande gracefully disponible uniquement en PowerShell
Cache Setup C’est le compte de ferme éxécute le Cache Service
AppFabric Caching ServiceMême principe que le service de synchronisation des profiles avec SharePoint pendant le setup, ensuite vous pouvez diminuez les privileges du compte.
General Cache Server Sizing GuidelinesServeurs de cache utilisent environ 50 % de la mémoire allouée pour les frais généraux
RAM Maximum recommandée est 16Go par serveur de cache
Au-dessus de cela fonctionnera, mais le vidage du cache que peut prendre plus de temps que prévu pour l’effacer, il ce peut que le serveur affiche des timeout
Vous devez allouer 2 Go de RAM pour le système d'exploitationCela laisse un maximum de 14 Go de cache :7 Go de stockage et de 7 Go pour le cache
Les informations concernant le sizing peuvent vous aider à determiner combien de cache vous avez besoin.
Dans l’exemple precedent, prenez le total de volumétrie de stockage / 7Gb = Nb de servers de caches dont vous aurez besoin.
Cache ImplementationIl est recommandé d’utiliser des serveurs dédiés pour le cache. (Pas de role WFE ou de Service Apps)
The data as a whole is divided and distributed between all cache servers
If a server goes down unexpectedly, user performance will suffer until other servers become populated with the data that was lost This process can be accelerated with:
User Profile Service - Feed Cache Repopulation Job timer jobClear-SPDistributedCacheItem, Update-SPRepopulateMicroblogLMTCache and Update-SPRepopulateMicroblogFeedCache PowerShell cmdlets
If you know you are going to bring a cache server down you should do so gracefully with the Stop-SPDistributedCacheServiceInstance cmdlet This copies the data to other cache servers to minimize the performance
impact
SharePoint Distributed CachesActivityFeed
ActivityFeedLMT
LogonToken
ServerToAppServerAccessToken
ViewState
Search
SecurityTrimming
Default
Access
Bouncer
Let’s get in Depth !
AppFabric Infrastructure Architecture Physique
Architecture Logique Haute disponibilité
Configuration Caches Cache Hosts
Planification des besoins mémoire
SharePoint Cache: Infrastructure et Management
Logs, Configuration Checks, et Compteurs PerfMon
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 noeuds de la ferme
AppFabric Logical Architecture Named Caches: Conteneurs des éléments du cache
Cached Objects: Clé/Valeur individuelle stocké dans un cache nommé
Regions: Collections d’objets mis en cache.
Les objets peuvent être places directement
dans un cache ou une region spécifique.
High Availability Requirements: Windows Enterprise Edition, ≥ 3 Hôtes
SharePoint 2013 does not support
PowerShell Demo AFCache Configuration PowerShell Demo
Cache Configuration Expiration TimeToLive
Eviction “LRU” and “None”
Secondaries
Notifications
Write-Behind and Read-Through
PowerShell Demo Cache Host Configuration PowerShell Demo
Cache Host Configuration Communication Ports Cache Port (22233) Cluster Port (22234) Arbitration Port (22235) Replication Port (22236)
Size
HighWatermark and LowWatermark
IsLeadHost
Memory Requirements Initial allocation is 5% of total physical memory at time of provisioning of Cache Service
CacheSize + 100MB must be available at time of service start
Change cache size: Update-SPDistributedCacheSize Set-AFCacheHostConfiguration
Recommendations: Dedicate a machine to AppFabric Allocate 50% of available physical memory Machine should have no more than 16GB of RAM
Throttling Less than 15% physical memory available Less than 4% of allocated cache host size available
Dynamic Memory not supported
Watermarks
SharePoint Cache Infrastructure Each Object or Region in a cache is stored once Will be lost if host is shutdown
SharePoint has trouble with hosts still in cluster but not actually available
Stopping a host: Stop-SPDistributedCacheServiceInstance –Graceful Remove-SPDistributedCacheServiceInstance
Starting a host: Start-SPServiceInstance Add-SPDistributedCacheServiceInstance
New-SPConfigurationDatabase -SkipRegisterAsDistributedCacheHost
SharePoint Cache Management Get/Set-SPDistributedCacheClientSetting
Clear-SPDistributedCacheItem
Not supported to: Read or Write to SharePoint caches Create additional named caches via SharePoint object model Create additional named caches on SharePoint Distributed Cache
servers via AF PowerShell
Need an AppFabric cache for a custom application? Create a separate cluster for it.
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
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
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
Cache Server Performance There are performance counters; there are also counts exposed
via 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)
Cache Service Health The following health rules have been created to help you track the
Cache Service (look in the Availability section for most): One of the cache hosts in the cluster is down (Availability) Firewall client settings on the cache host are incorrect (Configuration) Cache host is in throttled state (Availability) The high availability node for SharePoint distributed cache is not available
(Availability) – happens when there are less than 2 servers running the cache service There exists at least one cache host in the cluster, which SP doesn't know
about (Configuration) – happens when the cache service is disabled in SharePoint but AppFabric Caching Service is running on the machine
Cached objects have been evicted (Configuration) – indicates eviction happened across the cache cluster. Not bad in and of itself but may be a clue if it happens frequently and/or there are perf issues
Summary Configuration details stored in Config DB
10 SharePoint Caches created Using SharePoint caches for other purposes is not supported Custom caches not supported; deploy to alternate servers
High Availability/Redundancy not available for SharePoint caches
AppFabric PowerShell cmdlets can be used to monitor and manipulate the caches