richliu's blog

Linux, 工作, 生活.

richliu's blog header image 2

[Wordpress] Wordpress Peformance : 自家架 Wordpress 加速法.

四月 24th, 2007 · 2 Comments

我的 Blog 一開始就是自己架的, 之前放的機器是 PIII-700*2 + 1G RAM.
開啟要花大概 15 秒以上. 當時不以為意, 所以就偷吃步, 改用 WP-Cache,
加上了以後, 大概就是 5 秒上下, 應該是可以接受的 Performance 了.

不過這根本不是問題的根源呀

之後 Blog 移到自己家中, 改放在 P4 1.6G + 768M RAM 的機器上.
因為改用 gzip 的關係, 所以 WP-Cache 就沒有啟用了, 後來就一直在 13 秒上下.

直到看到這一篇
Wordpress Performance: Why My Site Is So Much Faster Than Yours

其實也沒有什麼特別的技巧.
一個是就是使用 eaccelerator 這個 PHP 的加速器和 Encoder.
不過我加上去之後, 大概只有增加 0.5 秒左右的速度, Gentoo 順手裝還算方便
所以就加上去吧 :)

其他的調 Apache 就看看吧, Loading 不大, 調整也不會差到多少 :)

其中最有用的就是替 MySQL 加上 Query Cache, 如果是 Gentoo
在 /etc/mysql/my.cnf 中的 [mysqld] 加上這二行

query_cache_type = 1

query_cache_size = 26214400

再重新啟動 mysql 就可以了

/etc/init.d/mysql restart

這個參數是替 MySQL 加上 query cache 26MBytes, 根據實測的結果
Pageview 10000/days 大概 20MBytes 上下. 個人視狀況增加刪減.

加上去之後, 原來是 13 秒上下, 現在變成 5 秒上下.
而原來晚上 Loading 接近 1 的站台, 增加了這個參數, 大概降到 0.3-0.4 之間.

為什麼不早點知道這個參數啊~~~~~~~~~~~~~~~
超好用的. 所以現在我的 Blog Loading 速度就快很多了.
連帶的某些相關站台速度也順多了 :)

[Tags] Gentoo, Wordpress , MySQL , eaccelerator , performance [/Tags]

On this day..

No tag for this post.

Related posts

Tags: Blog/wiki 記錄 · Gentoo · Linux · Network

2 responses so far ↓

  • shonyu // 四月 24, 2007 at 6:11 下午
    Using Mozilla Firefox Mozilla Firefox 2.0.0.3 on Windows Windows XP

    感謝皮董~~

    [回應]

  • tenz // 四月 29, 2007 at 12:53 上午
    Using Unbranded Firefox Unbranded Firefox 2.0 on Windows Windows XP

    似乎真的有效,拜謝有錢劉大長輩.. XD

    [回應]

Leave a Comment