why socket for communication between master and worker used the so large memory?
Maxim Dounin
mdounin at mdounin.ru
Fri Mar 29 10:41:26 UTC 2013
Hello!
On Fri, Mar 29, 2013 at 06:04:54PM +0800, MCoder wrote:
> my nginx is just a http tunul proxy http connection, and max connection is
> just lower than 100.
>
> # ps aux
> root 19849 0.0 0.0 18028 2452 ? Ss 2012 0:00 nginx:
> master process /usr/local/qqwebsrv/nginx/sbin/nginx
> nobody 25389 0.1 0.0 19752 4104 ? S Mar25 9:07 nginx:
> worker process
> nobody 25390 0.1 0.0 19752 4104 ? S Mar25 9:03 nginx:
> worker process
> nobody 25391 0.1 0.0 19752 4108 ? S Mar25 8:46 nginx:
> worker process
> nobody 25392 0.1 0.0 19760 4116 ? S Mar25 8:58 nginx:
> worker process
>
> # lsof | grep nginx | grep socket
> nginx 19849 root 3w unix 0xffff8102b7574380
> 1677964948 socket
[...]
> nginx 25392 nobody 3u unix 0xffff8102b7574380
> 1677964948 socket
> nginx 25392 nobody 6u unix 0xffff8102dce9dcc0
> 1677964950 socket
> nginx 25392 nobody 8u unix 0xffff81027785a980
> 1677964954 socket
> nginx 25392 nobody 12u unix 0xffff81010e285100
> 1677964958 socket
>
> # lsof |awk '$1=="nginx" && $NF == "socket" {n[$6]=$7} END {for (i in n) {m
> += n[i]} print m / (1024 * 1024 * 1024)}'
> 12.5018
What makes you think that what you are counting is memory? From
here it looks like NODE column, with SIZE/OFF colum omitted for
some reason (likely just empty). On a linux system here the
output looks like:
$ lsof | egrep 'socket|SIZE'
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
nginx 30299 mdounin 3u unix 0xffff880224f836c0 0t0 1953927 socket
nginx 30299 mdounin 6u unix 0xffff880413ff0380 0t0 1953928 socket
nginx 30300 mdounin 6u unix 0xffff880413ff0380 0t0 1953928 socket
--
Maxim Dounin
http://nginx.org/en/donation.html
More information about the nginx
mailing list