SharePoint 2013 SPDistributedCacheService 介绍与配置

SharePoint 2013 SPDistributedCacheService 是SharePoint  server 2013引入的一种缓存机制,它通常用于以下功能的缓存:

  • Newsfeeds
  • Authentication
  • OneNote client access
  • Security Trimming
  • Page load performance (直接影响页面加载和反应速度)
有些Cache 是不通过 SPDistributedCacheService 缓存的,例如:
  • Blob Cache (图片,脚本等),它们只缓存在WEF server 上
  • Output cache (Asp.net 页面缓存), 也只缓存在WEF server 上

其实 SPDistributedCacheService 是利用 Window server 2012 的AppFabricCachingService来构建的分布式缓存系统。
安装 SharePoint 2013 准备套件时会自动安装 AppFabricCachingService
以下是 AppFabricCachingService的逻辑架构图:



 SharePoint 2013 中, Cluster  configuration 存放在 SharePoint_Config 数据库中, Cache server 可以是任意WEF server 和 app server 

下面介绍如何配置  SPDistributedCacheService:
   1. 在任意想部署Cache的WEF 或 App server 上依次运行下列 SharePoint power shell   命令
              

a.  倒入 power shell 网络安全模块 

          Import-ModuleNetSecurity

b.  开启防火墙规则

           Set-NetFirewallRule-DisplayName "File and Printer Sharing (Echo Request -ICMPv4-In)"  -Enabled True 

c. 将本机加入到 Cache host cluster (集群)

         Add-SPDistributedCacheServiceInstance 

4. 将本机缓存大小设置为 2G, 系统默认为本机内存的 5% 

         Update-SPDistributedCacheSize-CacheSizeInMB 2048

注意:单机机缓存大小不要超过 16 G,且不要超出本机总内存的40%


2. 运行以下命令验证配置结果

   a. Get-CacheHost 



b. Get-CacheHostConfig -ComputerName rtatstuswspapp2 –CachePort  22233


通过笔者的测试,配置了SPDistributedCacheService 之后,叶面加载效率大概提升10~20 倍。


  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值