Yii Framework Forum: cache不要乱用 - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

cache不要乱用 Rate Topic: -----

#1 User is offline   Maosong 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 33
  • Joined: 26-December 09

Posted 06 September 2012 - 09:43 PM

之前做了个项目达到50W PV后,出现服务器资源明显增加、php-fpm进程cpu占用时常100%、网站无法打开等情况。
经过分析瓶颈在磁盘io层面,经排查程序中对每个用户的信息做了file-cache,改为db-cache后得到明显改善。

在该场景下cache已经起不到任何作用了,属于鸡肋型。另外file-cache还是要慎用的,某些情况下文件系统性能远不如数据库。
0

#2 User is offline   riverlet 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 52
  • Joined: 21-August 10
  • Location:Beijing

Posted 09 September 2012 - 10:29 PM

是的,或者改为内存型的缓存吧。
0

#3 User is offline   xiaosha 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 8
  • Joined: 16-February 12

Posted 17 November 2012 - 01:24 AM

使用 MEMcaChe
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users