回文章列表
作者litjoejoe.bbs@ptt.cc (joejoe), 信區: 386bsd
標題[問題] 關於Freebsd上跑大負擔的 proxy 效能問題
時間批踢踢實業 (Fri Feb 9 16:19:49 2007)
轉信站: GIBBS!ccnews.ncku!news.ccns.ncku!news.mksh.phc!news.nsysu!ctu-gate!ctu-
Origin: sally.csie.ntu.edu.tw

※ 引述《litjoejoe (joejoe)》之銘言:
: ※ 引述《ychsiao.bbs@bbs.ychsiao.org (ychsiao)》之銘言:
: : http://proxy.nsysu.edu.tw/ <-建議先把裡面一些古早文件看完
: 恩 看過了
: 所以我用的是 24 個 cache_dir * 32 * 64
: 壓在 65535 以下
: : diskd
目前跑起來
遇到一個問題
處理的效能 真的比 之前用 linux 慢
squid 的設定都一樣...

我總共調整了 以下的參數

OS: FreeBSD (proxynew)

1.磁碟分割 切成 4個 Partition
  每個 Partition 在分為 2個 LABLE
  共 8 個 cache_dir
  newfs 參數下 -b 8192 -f 1024 -i 4096

2.squid cache_dir 用 diskd 跑
  /boot/loader.conf
  kern.ipc.msgmnb=16384   # Origin: 2048
  kern.ipc.msgmni=96      # Origin: 40
  kern.ipc.msgseg=2048    # Origin: 2048
  kern.ipc.msgssz=64      # Origin: 8
  kern.ipc.msgtql=5120     # Origin: 40
  kern.geom.debugflags=16
  machdep.hyperthreading_allowed=1

3.kernel 加
  options         SMP                     # Symmetric MultiProcessor Kernel
  options         MAXFILES=16384


OS:Dabian (proxyold)

1.磁碟分割為 8個  Partition
  4個 MA 4個 SL
  格式用 ext3

2.啟動squid 時 先下
  ulimit -HSd unlimited
  ulimit -HSn 32768
  ulimit -HSu unlimited

3.cache_dir 使用 aufs


測試的結果 如下...
http_ping -c 10 -i 2 -proxy proxynew:8080 http://www.hinet.net

63787 bytes from http://www.hinet.net: 380.109 ms (0.281c/125.689r/254.139d)
63787 bytes from http://www.hinet.net: 57.178 ms (0.318c/11.456r/45.404d)
63787 bytes from http://www.hinet.net: 17.407 ms (0.359c/1.187r/15.861d)
63787 bytes from http://www.hinet.net: 26.634 ms (0.269c/12.207r/14.158d)
63787 bytes from http://www.hinet.net: 25.731 ms (0.338c/11.974r/13.419d)
63787 bytes from http://www.hinet.net: 18.743 ms (0.356c/11.841r/6.546d)
63787 bytes from http://www.hinet.net: 15.524 ms (0.288c/1.198r/14.038d)
63787 bytes from http://www.hinet.net: 16.043 ms (0.366c/1.227r/14.45d)
63787 bytes from http://www.hinet.net: 8.054 ms (0.271c/1.22r/6.563d)
63787 bytes from http://www.hinet.net: 17.043 ms (0.935c/1.228r/14.88d)

http_ping -c 10 -i 2 -proxy proxyold:8080 http://www.hinet.net

63787 bytes from http://www.hinet.net: 8.312 ms (0.289c/1.268r/6.755d)
63787 bytes from http://www.hinet.net: 8.379 ms (0.371c/1.255r/6.753d)
63787 bytes from http://www.hinet.net: 8.435 ms (0.419c/1.255r/6.761d)
63787 bytes from http://www.hinet.net: 8.359 ms (0.33c/1.268r/6.761d)
63787 bytes from http://www.hinet.net: 8.414 ms (0.411c/1.246r/6.757d)
63787 bytes from http://www.hinet.net: 8.594 ms (0.352c/1.334r/6.908d)
63787 bytes from http://www.hinet.net: 8.529 ms (0.406c/1.36r/6.763d)
63787 bytes from http://www.hinet.net: 8.458 ms (0.33c/1.297r/6.831d)
63787 bytes from http://www.hinet.net: 8.515 ms (0.39c/1.344r/6.781d)
63787 bytes from http://www.hinet.net: 8.568 ms (0.44c/1.305r/6.823d)


明顯的 NEW 那台比較慢...
還有什麼可以調嗎?

--
※ 發信站: 批踢踢實業坊(ptt.cc) 
◆ From: 140.138.32.31
文章選讀←離開[主題上]主題下(k)上篇(j)下篇S/a搜尋 G串列 TAB精華 ↑↓捲 Pg/Space翻