why socket for communication between master and worker used the so large memory?

MCoder shangtefa at gmail.com
Fri Mar 29 10:04:54 UTC 2013


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     19849       root    4u     unix 0xffff81047e144f00
 1677964949 socket
nginx     19849       root    6u     unix 0xffff8102dce9dcc0
 1677964950 socket
nginx     19849       root    7u     unix 0xffff81047e532340
 1677964951 socket
nginx     19849       root    8u     unix 0xffff81027785a980
 1677964954 socket
nginx     19849       root    9u     unix 0xffff81047bd8ac80
 1677964955 socket
nginx     19849       root   10u     unix 0xffff8102b7574900
 1677964957 socket
nginx     19849       root   12w     unix 0xffff81010e285100
 1677964958 socket
nginx     25389     nobody    3u     unix 0xffff8102dce9dcc0
 1677964950 socket
nginx     25389     nobody    4u     unix 0xffff81047e144f00
 1677964949 socket
nginx     25389     nobody    7u     unix 0xffff81027785a980
 1677964954 socket
nginx     25389     nobody    8u     unix 0xffff8102b7574900
 1677964957 socket
nginx     25390     nobody    3u     unix 0xffff8102b7574380
 1677964948 socket
nginx     25390     nobody    4u     unix 0xffff81027785a980
 1677964954 socket
nginx     25390     nobody    6u     unix 0xffff8102b7574900
 1677964957 socket
nginx     25390     nobody    7u     unix 0xffff81047e532340
 1677964951 socket
nginx     25391     nobody    3u     unix 0xffff8102b7574380
 1677964948 socket
nginx     25391     nobody    4u     unix 0xffff8102b7574900
 1677964957 socket
nginx     25391     nobody    6u     unix 0xffff8102dce9dcc0
 1677964950 socket
nginx     25391     nobody    9u     unix 0xffff81047bd8ac80
 1677964955 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

# netstat -na | grep ESTABLISHED | wc -l
87
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20130329/a9327628/attachment-0001.html>


More information about the nginx mailing list