| 阅读上一个主题 :: 阅读下一个主题 |
| 作者 |
留言 |
zmoon 道童
注册时间: 2003-03-06 文章: 244
|
发表于: Mon 2008-03-24 13:37:32 发表主题: lighttpd 启用了fam,有点疑问 |
|
|
启用fam后,系统整体的cpu占用比原来高了几个百分点,高的几个百分点主要是fam进程,请问这样做是否值得?
我的意思是高几个百分点没有关系,但是否能带来其他的好处,比如提高负载能力,或者提高了响应速度。
生产环境,不敢随意做压力测试,但目前至少未发现有性能下降的现象。
环境 freebsd7.0 i386 lighttpd+php+mysql _________________ http://www.zmoon.org 个人Blog
从winnt4.0用到win2000 再到Linux
,其实俺发现俺喜欢的是 FreeBSD and OpenBSD |
|
| 返回页首 |
|
 |
zmoon 道童
注册时间: 2003-03-06 文章: 244
|
发表于: Mon 2008-03-24 14:05:49 发表主题: |
|
|
看TOP 信息 fam好像使用了select调用 不是kqueue调用,是不是这是cpu占用高的原因?
顺便说一句,系统中的所有软件都是通过port安装
last pid: 62798; load averages: 0.10, 0.08, 0.07 up 8+13:46:44 14:01:47
62 processes: 1 running, 61 sleeping
CPU states: 6.2% user, 0.0% nice, 1.9% system, 0.2% interrupt, 91.7% idle
Mem: 282M Active, 925M Inact, 197M Wired, 45M Cache, 112M Buf, 35M Free
Swap: 3007M Total, 3007M Free
PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND
62577 www 1 4 0 14156K 9348K accept 0 0:17 5.27% php-cgi
59386 root 1 44 0 16504K 14584K select 0 75:36 0.10% fam
62253 www 1 4 0 9516K 5984K kqread 1 0:14 0.10% lighttpd
863 mysql 7 44 0 425M 211M ucond 0 140:46 0.00% mysqld
59381 www 1 4 0 10052K 6688K sbwait 1 1:21 0.00% lighttpd _________________ http://www.zmoon.org 个人Blog
从winnt4.0用到win2000 再到Linux
,其实俺发现俺喜欢的是 FreeBSD and OpenBSD |
|
| 返回页首 |
|
 |
yes298 道童
注册时间: 2007-12-13 文章: 298
|
发表于: Tue 2008-03-25 11:23:11 发表主题: |
|
|
大大, 我之前曾想用lighttpd的fam功能, 但不成功,
出現無法使用php-cgi的情況, 請問你是如何配置可以用到的呢?
我的环境是: FreeBSD v7.0 (x64). _________________ 熱心幫助他人, 即是幫助自己 ...
對新手, 盡可能去扶持一下, 又有何妨呢?
非常鄙視那些有點技術,就自以為是, 沾沾自喜的人, 不幫人也罷, 還出言諷刺新手, 別忘了, 你亦曾為新手 ... |
|
| 返回页首 |
|
 |
zmoon 道童
注册时间: 2003-03-06 文章: 244
|
发表于: Tue 2008-03-25 11:32:59 发表主题: |
|
|
很简单, 但是要开好几个tcp /udp 端口,从安全角度,感觉有点得不偿失
cd /usr/ports/devel/fam/files
# more pkg-message.in
************************************************************************
1. In order to run this port, please add the following line to /etc/rpc if
it is not already there:
--------------------------------------------------------------------
sgi_fam 391002
--------------------------------------------------------------------
2. To run fam from inetd (the recommended method), then please add the
following lines to /etc/inetd.conf if they are not already there:
--------------------------------------------------------------------
# FAM: File Alteration Monitor [devel/fam]
sgi_fam/1-2 stream rpc/tcp wait root %%LOCALBASE%%/bin/fam fam
--------------------------------------------------------------------
After modifying /etc/inetd.conf, you must (as root) run:
killall -HUP inetd
Fam also requires that portmapper is running. Add the appropriate
entry to /etc/rc.conf:
For 4.x:
Add portmap_enable="YES" and either reboot or run /usr/sbin/portmap.
For 5.x and later:
Add rpcbind_enable="YES" and either reboot or run /etc/rc.d/rpcbind start.
************************************************************************ _________________ http://www.zmoon.org 个人Blog
从winnt4.0用到win2000 再到Linux
,其实俺发现俺喜欢的是 FreeBSD and OpenBSD |
|
| 返回页首 |
|
 |
ilangilang 半仙
注册时间: 2006-03-31 文章: 104
|
发表于: Tue 2008-03-25 17:02:05 发表主题: |
|
|
我按照你说的做了,一访问网站lighttpd就挂了,奇怪
| 代码: |
2008-03-25 17:12:30: (server.c.1110) could not open a fam connection, dieing.
2008-03-25 17:12:30: (server.c.1110) could not open a fam connection, dieing.
2008-03-25 17:12:30: (server.c.1110) could not open a fam connection, dieing.
2008-03-25 17:12:30: (server.c.1110) could not open a fam connection, dieing.
2008-03-25 17:12:30: (server.c.1110) could not open a fam connection, dieing.
2008-03-25 17:12:30: (server.c.1110) could not open a fam connection, dieing.
2008-03-25 17:12:30: (server.c.1110) could not open a fam connection, dieing. |
_________________ 串珠饰品批发网
手工爱好者
手工制作网站大全 |
|
| 返回页首 |
|
 |
ilangilang 半仙
注册时间: 2006-03-31 文章: 104
|
|
| 返回页首 |
|
 |
|
|
您不能发布新主题 您不能在这个论坛回复主题 您不能在这个论坛编辑自己的文章 您不能在这个论坛删除自己的文章 您不能在这个论坛发表投票
|
|