稍微調幾樣..
kern.ipc.somaxconn=1024
The kern.ipc.somaxconn sysctl variable limits the size of the listen queue for accepting new TCP connections. The default value of 128 is typically too low for robust handling of new connections in a heavily loaded web server environment. For such environments, it is recommended to increase this value to 1024 or higher. The service daemon may itself limit the listen queue size (e.g. sendmail(8), or Apache) but will often have a directive in its configuration file to adjust the queue size. Large listen queues also do a better job of avoiding Denial of Service (DoSDoSDoSDoSDoS) attacks. |
#禁止看到對方
security.bsd.see_other_uids=0
#防止Dos
net.inet.tcp.blackhole=2
net.inet.udp.blackhole=1
darren2000 發表在 痞客邦 留言(0) 人氣(47)
1. 看CPU
#psrinfo -v
#psrinfo | grep on-line | wc -l
# /usr/platform/`uname -i`/sbin/prtdiag -v
# /usr/platform/`uname -m`/sbin/prtdiag -v
darren2000 發表在 痞客邦 留言(0) 人氣(270)
用tcpdump工具去看
tcpdump -n -e -ttt -r /var/log/pflog
顯示table內容
pfctl -t sshguard -T show
PF中文手冊
http://www.freebsdchina.org/forum/topic_24641.html
darren2000 發表在 痞客邦 留言(0) 人氣(75)
要增加apche效能可以用mod_cache
httpd.conf加入
# Sample Cache Configuration # LoadModule cache_module modules/mod_cache.so <IfModule mod_cache.c> #LoadModule disk_cache_module modules/mod_disk_cache.so <IfModule mod_disk_cache.c> CacheRoot c:/cacheroot CacheSize 256 CacheEnable disk / CacheDirLevels 5 CacheDirLength 3 </IfModule> LoadModule mem_cache_module modules/mod_mem_cache.so <IfModule mod_mem_cache.c> CacheEnable mem / MCacheSize 4096 MCacheMaxObjectCount 100 MCacheMinObjectSize 1 MCacheMaxObjectSize 2048 </IfModule> </IfModule> |
mod_mem_cache沒看到這個module,據說沒實作..
詳細中文解釋
其他調校介紹:
http://linuxgazette.net/123/vishnu.htmlhttp://httpd.apache.org/docs/2.0/misc/perf-tuning.htmldarren2000 發表在 痞客邦 留言(0) 人氣(819)
首先..
cp /usr/local/share/mysql/my-medium.cnf /etc/my.cnf
如果mysql只開放本機使用的話,在/etc/my.cnf加入
[mysqld]
[...]
bind-address=127.0.0.1
讓mysql只監聽lookback介面
darren2000 發表在 痞客邦 留言(0) 人氣(185)
裝這個mod_evasive20
apache20:
httpd.conf加入
LoadModule evasive20_module libexec/apache2/mod_evasive20.so
<IfModule mod_evasive20.c>
darren2000 發表在 痞客邦 留言(0) 人氣(110)
寫的很詳細,有了基礎認識
http://isv.sun.com.cn/techdocs/20060714ten_reasones_to_use_zfs.html
darren2000 發表在 痞客邦 留言(0) 人氣(46)
swap不夠用時,freebsd可以讓你創一個新空間來做swap,作法很簡單~
用dd創一個檔案,例如需要100m,bs,count請看dd(1)
#dd if=/dev/zero of=/usr/swap0 bs=1024k count=100
# chmod 0600 /usr/swap0
darren2000 發表在 痞客邦 留言(0) 人氣(111)
solaris上也可跟bsd一樣新增swap空間,作法如下
看目前使用中的swap的空間
#swap -l
看swap空間使用狀況
darren2000 發表在 痞客邦 留言(0) 人氣(260)
darren2000 發表在 痞客邦 留言(0) 人氣(93)