Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 09 May 2002 09:19:51 -0400
From:      "MikeM" <MyRaQ@mgm51.com>
To:        freebsd-stable@freebsd.org
Subject:   Steadily increasing memory usage on a lightly loaded server
Message-ID:  <200205090919510568.03BA6562@sentry.24cl.com>

next in thread | raw e-mail | index | archive | help
I'm running a web server that is lightly loaded, only about 15MB of=
 bandwidth usage per day.  Ever since the recent kernel patches, I have=
 been noticing that the memory usage is slowly, but surely, notching up.=
  The server has about 700MB of memory.  About a day after a reboot, the=
 top command shows all except for 40MB being used, but I do not see any=
 process that is using it.  About three days after a reboot, swap starts to=
 be used, albeit only a little swap.  I've been running 4.5 on this server=
 since it came out, and I never saw these symtpoms until the recent kernel=
 patches.  How can I find out what is using all this memory?

Following are three snapshots:  (1)dmesg   (2)top command right after a=
 reboot (3)top command after 5 days of running.

(1)dmesg****************************************
Copyright (c) 1992-2002 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
        The Regents of the University of California. All rights reserved.
FreeBSD 4.5-RELEASE-p4 #7: Fri May  3 10:02:00 EDT 2002
    mike@[snip]:/usr/obj/usr/src/sys/STABLE4FW
Timecounter "i8254"  frequency 1193182 Hz
CPU: Pentium III/Pentium III Xeon/Celeron (797.48-MHz 686-class CPU)
  Origin =3D "GenuineIntel"  Id =3D 0x686  Stepping =3D 6
  Features=3D0x383fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,=
MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE>
real memory  =3D 805224448 (786352K bytes)
avail memory =3D 778473472 (760228K bytes)
Preloaded elf kernel "kernel" at 0xc0468000.
Pentium Pro MTRR support enabled
md0: Malloc disk
npx0: <math processor> on motherboard
npx0: INT 16 interface
pcib0: <ServerWorks NB6635 3.0LE host to PCI bridge> on motherboard
pci0: <PCI bus> on pcib0
pci0: <S3 Savage 4 graphics accelerator> at 1.0
fxp0: <Intel Pro 10/100B/100+ Ethernet> port 0x2200-0x223f mem=
 0xfea00000-0xfeafffff,0xfeb7f000-0xfeb7ffff irq 10 at device 2.0 on pci0
fxp0: Ethernet address 00:06:29:1f:27:61
inphy0: <i82555 10/100 media interface> on miibus0
inphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
isab0: <ServerWorks IB6566 PCI to ISA bridge> at device 15.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <ServerWorks ROSB4 ATA33 controller> port 0x700-0x70f at device=
 15.1 on pci0
ata0: at 0x1f0 irq 14 on atapci0
ohci0: <OHCI (generic) USB controller> mem 0xfeb7e000-0xfeb7efff irq 7 at=
 device 15.2 on pci0
usb0: OHCI version 1.0, legacy support
usb0: <OHCI (generic) USB controller> on ohci0
usb0: USB revision 1.0
uhub0: (unknown) OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
pcib1: <ServerWorks NB6635 3.0LE host to PCI bridge> on motherboard
pci1: <PCI bus> on pcib1
ahc0: <Adaptec aic7892 Ultra160 SCSI adapter> port 0x2300-0x23ff mem=
 0xeffff000-0xefffffff irq 9 at device 3.0 on pci1
aic7892: Ultra160 Wide Channel A, SCSI Id=3D7, 32/255 SCBs
orm0: <Option ROM> at iomem 0xc0000-0xc9fff on isa0
fdc0: direction bit not set
fdc0: cmd 3 failed at out byte 1 of 3
atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=3D0x100>
sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0
sio0: type 16550A, console
sio1: configured irq 3 not in bitmap of probed irqs 0
ppc0: parallel port not found.
IP packet filtering initialized, divert disabled, rule-based forwarding=
 disabled, default to deny, logging limited to 10
 packets/entry by default
acd0: CDROM <CRN-8241B> at ata0-master using PIO4
Waiting 15 seconds for SCSI devices to settle
pass2 at ahc0 bus 0 target 8 lun 0
pass2: <IBM FTlV1 S2 0> Fixed Processor SCSI-2 device
pass2: 3.300MB/s transfers
da0 at ahc0 bus 0 target 0 lun 0
da0: <IBM-PSG DDYS-T18350M  M S9AA> Fixed Direct Access SCSI-3 device
da0: 160.000MB/s transfers (80.000MHz, offset 63, 16bit), Tagged Queueing=
 Enabled
da0: 17357MB (35548320 512 byte sectors: 255H 63S/T 2212C)
da1 at ahc0 bus 0 target 1 lun 0
da1: <IBM-ESXS ST336605LC    !# B243> Fixed Direct Access SCSI-3 device
da1: 160.000MB/s transfers (80.000MHz, offset 63, 16bit), Tagged Queueing=
 Enabled
da1: 34715MB (71096640 512 byte sectors: 255H 63S/T 4425C)
Mounting root from ufs:/dev/da0s1a



2)top command right after a reboot ***************************************
last pid:   264;  load averages:  0.07,  0.07,  0.03
up 0+00:03:00  10:19:07
31 processes:  1 running, 30 sleeping
CPU states:  0.0% user,  0.0% nice,  0.0% system,  0.0% interrupt,  100%=
 idle
Mem: 11M Active, 10M Inact, 22M Wired, 32K Cache, 26M Buf, 707M Free
Swap: 500M Total, 500M Free

  PID USERNAME PRI NICE  SIZE    RES STATE    TIME   WCPU    CPU COMMAND
  253 root       2   0  2140K  1768K select   0:00  0.00%  0.00% sshd
  264 root      28   0  1904K  1140K RUN      0:00  0.00%  0.00% top
  245 postfix    2   0  1072K   836K select   0:00  0.00%  0.00% nqmgr
  146 root       2   0  6296K  4368K select   0:00  0.00%  0.00% httpd
  186 mysql      2   0 35096K  4808K poll     0:00  0.00%  0.00% mysqld
  102 root       2   0   940K   636K select   0:00  0.00%  0.00% syslogd
  254 mike      10   0   636K   436K wait     0:00  0.00%  0.00% sh
  256 root      18   0  1252K   896K pause    0:00  0.00%  0.00% csh
  238 root       2   0  1008K   768K select   0:00  0.00%  0.00% master
  246 postfix    2   0  1056K   832K select   0:00  0.00%  0.00% cleanup
  258 root      10   0  1048K   828K wait     0:00  0.00%  0.00% bash
  249 postfix    2   0  1064K   868K select   0:00  0.00%  0.00% smtp
  106 root       2   0  2496K  1560K select   0:00  0.00%  0.00% ntpd
  248 root       2   0  1092K   856K select   0:00  0.00%  0.00% local
  149 root      10   0   644K   444K wait     0:00  0.00%  0.00% sh
  244 postfix    2   0  1016K   796K select   0:00  0.00%  0.00% pickup
  247 postfix    2   0  1016K   764K select   0:00  0.00%  0.00%=
 trivial-rewrit
  184 root       2   0   912K   584K select   0:00  0.00%  0.00%=
 couriertcpd
  250 root       3   0   948K   660K ttyin    0:00  0.00%  0.00% getty
  252 root       3   0   948K   660K ttyin    0:00  0.00%  0.00% getty
  251 root       3   0   948K   660K ttyin    0:00  0.00%  0.00% getty
  157 root       2   0  1056K   632K select   0:00  0.00%  0.00%=
 authdaemond.pl
  117 root      10   0   984K   740K nanslp   0:00  0.00%  0.00% cron
  242 root       2   0  2096K  1592K select   0:00  0.00%  0.00% sshd
  115 root       2   0  1056K   780K select   0:00  0.00%  0.00% inetd
  188 root      -6   0   884K   476K piperd   0:00  0.00%  0.00% logger
  133 root       2   0  2096K  1588K select   0:00  0.00%  0.00% adminsshd
  207 www        2   0  6296K  4368K select   0:00  0.00%  0.00% httpd
  208 www       18   0  6296K  4368K lockf    0:00  0.00%  0.00% httpd
  174 root       2   0  1056K   632K select   0:00  0.00%  0.00%=
 authdaemond.pl
  175 root       2   0  1056K   632K select   0:00  0.00%  0.00%=
 authdaemond.pl


(3)top command after 5 days of running.************************************
last pid: 12100;  load averages:  0.00,  0.00,  0.00    
 up  5+22:26:36  08:42:43
33 processes:  1 running, 32 sleeping
CPU states:  0.0% user,  0.0% nice,  0.0% system,  0.0% interrupt,  100%=
 idle
Mem: 23M Active, 618M Inact, 69M Wired, 40M Cache, 86M Buf, 1328K Free
Swap: 500M Total, 64K Used, 500M Free

  PID USERNAME PRI NICE  SIZE    RES STATE    TIME   WCPU    CPU COMMAND
  245 postfix    2   0  1080K   744K select   0:21  0.00%  0.00% nqmgr
  106 root       2   0  2504K  1204K select   0:11  0.00%  0.00% ntpd
  146 root       2   0  6344K  3692K select   0:10  0.00%  0.00% httpd
  186 mysql      2   0 35096K  3920K poll     0:03  0.00%  0.00% mysqld
  238 root       2   0  1008K   688K select   0:03  0.00%  0.00% master
  117 root      10   0   984K   644K nanslp   0:01  0.00%  0.00% cron
  102 root       2   0   948K   560K select   0:01  0.00%  0.00% syslogd
11209 www       18   0  6412K  3744K lockf    0:00  0.00%  0.00% httpd
  115 root       2   0  1056K   684K select   0:00  0.00%  0.00% inetd
11269 www       18   0  6920K  4552K lockf    0:00  0.00%  0.00% httpd
12100 root      28   0  1904K  1012K RUN      0:00  0.00%  0.00% top
12089 root       2   0  2140K  1460K select   0:00  0.00%  0.00% sshd
  133 root       2   0  2096K  1132K select   0:00  0.00%  0.00% adminsshd
  242 root       2   0  2096K  1120K select   0:00  0.00%  0.00% sshd
  157 root       2   0  1056K   492K select   0:00  0.00%  0.00%=
 authdaemond.pl
  184 root       2   0   912K   492K select   0:00  0.00%  0.00%=
 couriertcpd
  174 root       2   0  1056K   492K select   0:00  0.00%  0.00%=
 authdaemond.pl
  175 root       2   0  1056K   492K select   0:00  0.00%  0.00%=
 authdaemond.pl
11208 www       18   0  6400K  3736K lockf    0:00  0.00%  0.00% httpd
11272 www       18   0  6400K  3832K lockf    0:00  0.00%  0.00% httpd
11219 www       18   0  6400K  3736K lockf    0:00  0.00%  0.00% httpd
11270 www       18   0  6412K  3744K lockf    0:00  0.00%  0.00% httpd
11271 www        2   0  6400K  3836K select   0:00  0.00%  0.00% httpd
11273 www       18   0  6400K  3736K lockf    0:00  0.00%  0.00% httpd
12092 root      18   0  1252K   800K pause    0:00  0.00%  0.00% csh
12090 mike      10   0   636K   252K wait     0:00  0.00%  0.00% sh
12046 postfix    2   0  1000K   648K select   0:00  0.00%  0.00% pickup
12094 root      10   0  1048K   716K wait     0:00  0.00%  0.00% bash
  149 root      10   0   644K   256K wait     0:00  0.00%  0.00% sh
  250 root       3   0   948K   564K ttyin    0:00  0.00%  0.00% getty
  252 root       3   0   948K   564K ttyin    0:00  0.00%  0.00% getty
  251 root       3   0   948K   564K ttyin    0:00  0.00%  0.00% getty
  188 root      -6   0   884K   412K piperd   0:00  0.00%  0.00% logger




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200205090919510568.03BA6562>