excessive RAM consumption - memory leak

Igor Sysoev is at rambler-co.ru
Tue Feb 26 09:47:39 MSK 2008


On Tue, Feb 26, 2008 at 07:15:29AM +0100, Todd HG wrote:

> After a lot of analysis I have found that Nginx was not the source of 
> the memory leak.

I suspect you has no memory leak at all. It's very typical for Unix systems
to keep free memory as small as possible (here is 11M only from 2G) :

last pid: 79350;  load averages:  0.39,  0.46,  0.41   up 33+17:16:00  09:43:53
21 processes:  1 running, 20 sleeping
CPU states: 25.8% user,  0.0% nice, 11.4% system,  9.8% interrupt, 53.0% idle
Mem: 103M Active, 1430M Inact, 378M Wired, 83M Cache, 63M Buf, 11M Free
Swap: 2096M Total, 4872K Used, 2091M Free

  PID USERNAME   THR PRI NICE   SIZE    RES STATE    TIME   WCPU COMMAND
67776 nobody       1   4  -10 87168K 85572K kqread 799:58 32.91% nginx
  843 root         1  96    0  5600K   728K select   2:04  0.00% sshd
  814 root         1  96    0  4612K   736K select   0:59  0.00% ntpd

> After setting up cache-control this did help a lot with bandwidth. Is 
> there a way to setup cache control on the same server to deal with 
> caching images one way, and .html, .css, and .js files another way in 
> the nginx.conf?

      location ~ \.(html|css|js)$ {
          expires ...
      }

      location ~ \.(jpg|jpeg|gif)$ {
          expires ...
      }


-- 
Igor Sysoev
http://sysoev.ru/en/





More information about the nginx mailing list