DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2008-11-10 20:54:12

perssinaasappel
Member
From: Europe
Registered: 2008-10-22
Posts: 59

lighttpd + php memory usage

Is it normal for lighttpd and php to eat a lot of memory?
The only webpages running are nzbgetweb v1.2 and musicbrowser v0.16

Code:

Mem: 47036K used, 14764K free, 0K shrd, 10864K buff, 14460K cached
CPU:   0% usr   0% sys   0% nice  99% idle   0% io   0% irq   0% softirq
Load average: 0.00 0.00 0.00
  PID  PPID USER     STAT   VSZ %MEM %CPU COMMAND
25994  1674 root     S     5084   8%   0% sshd: root@pts/0
26014 26001 root     R     1360   2%   0% top
 1686     1 root     S    14548  24%   0% /ffp/sbin/lighttpd -f /ffp/etc/lighttpd.conf
 1436     1 root     S    11164  18%   0% /web/webs
20541  1697 root     S     8436  14%   0% /ffp/bin/php-cgi
 1699  1696 root     S     8436  14%   0% /ffp/bin/php-cgi
 1696  1686 root     S     8396  14%   0% /ffp/bin/php-cgi
 1697  1686 root     S     8396  14%   0% /ffp/bin/php-cgi
<snip>

When I reboot the NAS, lighttpd mem usage drops from 24% to 5%.

Code:

Mem: 43488K used, 18312K free, 0K shrd, 13500K buff, 17540K cached
CPU:   0% usr   0% sys   0% nice  99% idle   0% io   0% irq   0% softirq
Load average: 0.36 0.28 0.11
  PID  PPID USER     STAT   VSZ %MEM %CPU COMMAND
 1704  1701 root     R     1360   2%   0% top
 1696  1685 root     S     8396  14%   0% /ffp/bin/php-cgi
 1695  1685 root     S     8396  14%   0% /ffp/bin/php-cgi
 1698  1695 root     S     8396  14%   0% /ffp/bin/php-cgi
 1697  1696 root     S     8396  14%   0% /ffp/bin/php-cgi
 1699  1673 root     S     5084   8%   0% sshd: root@pts/0
 1477     1 root     S     4928   8%   0% /usr/sbin/samba/smbd -D
 1482  1477 root     S     4928   8%   0% /usr/sbin/samba/smbd -D
 1436     1 root     S     4084   7%   0% /web/webs
 1481     1 root     S     2968   5%   0% /usr/sbin/samba/nmbd -D
 1685     1 root     S     2784   5%   0% /ffp/sbin/lighttpd -f /ffp/etc/lighttpd.conf
<snip>

Any comments will be appreciated.

Last edited by perssinaasappel (2008-11-10 21:34:38)


CH3SNAS • 1.05b5 • ffp 0.5 • 2x WD Caviar Green WD5000AACS • nzbget(web)

Offline

 

#2 2008-11-12 23:04:18

perssinaasappel
Member
From: Europe
Registered: 2008-10-22
Posts: 59

Re: lighttpd + php memory usage

I'm not sure if it's exactly what I'm experiencing but it looks like bug #1387 on the lighttpd web pages.
Maybe a quick and dirty solution is to reboot lighttpd with cron once a day or so.

Last edited by perssinaasappel (2008-11-12 23:06:16)


CH3SNAS • 1.05b5 • ffp 0.5 • 2x WD Caviar Green WD5000AACS • nzbget(web)

Offline

 

#3 2008-11-15 18:13:49

perssinaasappel
Member
From: Europe
Registered: 2008-10-22
Posts: 59

Re: lighttpd + php memory usage

In my case musicbrowser is creating the problems.
When I checked, lighttpd was eating up 146% of memory!
This happens when I want to play big music file in embedded flash player.
If you play in flash the file seems to be downloaded to the client PC.
While downloading memory usage goes sky high. (See attached file.)

So be warned if you'r using musicbrowser with the embedded flash player like me. sad

I'm rebooting the daemon every night via cron trying to release memory.

Code:

45 6 * * * /mnt/HD_a2/ffp/bin/pkill -f /ffp/sbin/lighttpd > /ffp/log/reboot_lighttpd.log 2>&1
46 6 * * * /mnt/HD_a2/ffp/sbin/lighttpd -f /ffp/etc/lighttpd.conf >> /ffp/log/reboot_lighttpd.log 2>&1

One question about the pkill command, is it really releasing the clogged memory used by lighttpd?

When I look with top after the kill command it shows: Mem: 60260K used, 1540K free, ...
When I reboot the NAS top shows: Mem: 43624K used, 18176K free, ...

Big difference if you ask n00b like me and wondering if pkill really gives memory back?
Any ideas on this?

Last edited by perssinaasappel (2008-11-16 00:15:20)


Attachments:
Attachment Icon lighttpd_load-webmix.jpg, Size: 62,258 bytes, Downloads: 100

CH3SNAS • 1.05b5 • ffp 0.5 • 2x WD Caviar Green WD5000AACS • nzbget(web)

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB