ext3 buffer leak/memory leak?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Hi,

I am a new ext3 user and I am having some problems.  I seem to have
introduced a memory leak after adding ext3 support to the kernel.  I noticed
when running top or viewing /proc/meminfo my free memory pool seems to be
decreasing while my buffers are increasing (around the same rate).  I am
currently using a root partition and a /var partition.  I have listed the
ext3 boot messages below.

kjournald starting.  Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.

I tried to simplify the problem by only having one partition (root).  On the
first boot I get the same behavior, on the second boot things seem to work a
lot better (my buffer pool is around 5K and the free memory pool seems
stable.  Also there are more ext3 boot messages, I have listed them below.

EXT3-fs: INFO: recovery required on readonly filesystem.
EXT3-fs: write access will be enabled during recovery.
kjournald starting.  Commit interval 5 seconds
EXT3-fs: recovery complete.
EXT3-fs: mounted filesystem with ordered data mode.
VFS: Mounted root (ext3 filesystem) readonly.
EXT3 FS 2.4-0.9.6, 11 Aug 2001 on ide0(3,2), internal journal

I took a quick look at the source code.  On the first boot it looks like the
MS_RDONLY flag is not set in the super block.  On the second boot this flag
seems to be set.  I am not a file system expert and I am not sure what is
exactly going on here.  I am assuming this flag indicates whether the file
system is mounted as read/write or read-only.  If this is true I am not sure
why it is not set correctly on the first boot, and why it is never set
corretly if I am using a var partition.

Have I done something wrong?  How should I go about debugging and fixing
this problem?  Any help would be greatly appreciated.  I have listed the
steps I took for enabling ext3 below as well as listing some screen output.


	Enabling ext3 on a 2.4.10-1 kernel 
	###################################

	-	Added e2fsprogs-1.23-2.src.rpm from redhat 7.2
	-	Added lilo-21.4.4-14.src.rpm
	-	I Also (later) added util-linux-2.11f-9.src.rpm.  I think
this is for swap?
	-	I enabled the following pre_compile flags in the
configuration file
			o	CONFIG_EXT3_FS
			o	CONFIG_JBD
	-	I modified the /etc/fstab to look something like this 
			o	LABEL=/                 /
ext3    defaults        1 1
			o	LABEL=/var              /var
ext3    defaults        1 2
			o	none                    /proc
proc    defaults        0 0
			o	 none
	-	I modified the /etc/filesystems file to look something like
this
			o	 ext3
			o	 ext2
			o	 nodev proc
			o	 nodev devpts
			o	 iso9660
			o	 vfat
			o	 hfs
	-	I formated the disk using the following commands
			o	mke2fs -L / -j /dev/hda3
			o	mount -t ext3 /dev/hda3 /mnt
			o	cd /mnt
			o	untared my filesystem
			o	cd /
			o	umount /mnt
	-	I then executed lilo to write the boot record



		Screen output from top
		###################

Mem:   513680K av,   15768K used,  497912K free,       0K shrd,    2516K
buff
Swap:       0K av,       0K used,       0K free                    7616K
cached

  PID USER     PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME COMMAND
    1 root       0   0   524  524   460 S     0.0  0.1   0:08 init
    2 root       9   0     0    0     0 SW    0.0  0.0   0:00 keventd
    3 root      18  19     0    0     0 SWN   0.0  0.0   0:00 ksoftirqd_CPU0
    4 root       9   0     0    0     0 SW    0.0  0.0   0:00 kswapd
    5 root       9   0     0    0     0 SW    0.0  0.0   0:00 kreclaimd
    6 root       9   0     0    0     0 SW    0.0  0.0   0:00 bdflush
    7 root       9   0     0    0     0 SW    0.0  0.0   0:00 kupdated
    8 root       9   0     0    0     0 SW    0.0  0.0   0:00 kjournald
   85 root      11   0     0    0     0 SW    0.0  0.0   0:00 kjournald
  155 root       9   0   628  628   524 S     0.0  0.1   0:00 syslogd
  160 root       9   0   536  536   404 S     0.0  0.1   0:00 klogd
  170 rpc        9   0   644  644   544 S     0.0  0.1   0:00 portmap
  197 root      11   0   888  872   704 S     0.0  0.1   0:00 xinetd
  204 root      11   0  1080 1080   740 S     0.0  0.2   0:00 login
  207 root      11   0  1108 1108   868 S     0.0  0.2   0:00 bash
  239 root      14   0   924  924   744 R     0.0  0.1   0:00 top 10:35pm
up 3 min,  1 user,  load average: 0.01, 0.04, 0.01
16 processes: 15 sleeping, 1 running, 0 zombie, 0 stopped
CPU states:  0.0% user,  0.0% system,  0.0% nice, 100.0% idle
Mem:   513680K av,   15776K used,  497904K free,       0K shrd,    2524K
buff
Swap:       0K av,       0K used,       0K free                    7616K
cached

  PID USER     PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME COMMAND
    1 root       0   0   524  524   460 S     0.0  0.1   0:08 init
    2 root       9   0     0    0     0 SW    0.0  0.0   0:00 keventd
    3 root      18  19     0    0     0 SWN   0.0  0.0   0:00 ksoftirqd_CPU0
    4 root       9   0     0    0     0 SW    0.0  0.0   0:00 kswapd
    5 root       9   0     0    0     0 SW    0.0  0.0   0:00 kreclaimd
    6 root       9   0     0    0     0 SW    0.0  0.0   0:00 bdflush
    7 root       9   0     0    0     0 SW    0.0  0.0   0:00 kupdated
    8 root       9   0     0    0     0 SW    0.0  0.0   0:00 kjournald
   85 root      11   0     0    0     0 SW    0.0  0.0   0:00 kjournald
  155 root       9   0   628  628   524 S     0.0  0.1   0:00 syslogd
  160 root       9   0   536  536   404 S     0.0  0.1   0:00 klogd
  170 rpc        9   0   644  644   544 S     0.0  0.1   0:00 portmap
  197 root      11   0   888  872   704 S     0.0  0.1   0:00 xinetd
  204 root      11   0  1080 1080   740 S     0.0  0.2   0:00 login
  207 root      11   0  1108 1108   868 S     0.0  0.2   0:00 bash
  239 root      14   0   924  924   744 R     0.0  0.1   0:00 top 10:35pm
up 3 min,  1 user,  load average: 0.01, 0.04, 0.01
16 processes: 15 sleeping, 1 running, 0 zombie, 0 stopped


	screen output from cat /proc/meminfo

top___cat /proc/meminfo 
        total:    used:    free:  shared: buffers:  cached:
Mem:  526008320 27017216 498991104        0 13283328  7798784
Swap:        0        0        0
MemTotal:       513680 kB
MemFree:        487296 kB
MemShared:           0 kB
Buffers:         12972 kB
Cached:           7616 kB
SwapCached:          0 kB
Active:            348 kB
Inact_dirty:     20240 kB
Inact_clean:         0 kB
Inact_target:   104856 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:       513680 kB
LowFree:        487296 kB
SwapTotal:           0 kB
SwapFree:            0 kB
[root@warthog11 /root]# cat /proc/meminfo 
        total:    used:    free:  shared: buffers:  cached:
Mem:  526008320 27025408 498982912        0 13291520  7798784
Swap:        0        0        0
MemTotal:       513680 kB
MemFree:        487288 kB
MemShared:           0 kB
Buffers:         12980 kB
Cached:           7616 kB
SwapCached:          0 kB
Active:            356 kB
Inact_dirty:     20240 kB
Inact_clean:         0 kB
Inact_target:   104856 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:       513680 kB
LowFree:        487288 kB
SwapTotal:           0 kB
SwapFree:            0 kB






+++++++++++++++++++++++
Stephen Fitzgerald
Software Engineer
Malachite Technologies
Main:(603) 766 - 2700
Voice:(603) 766 - 2799
Mail: sfitzgerald@malachitetech.com



This e-mail message and any attachments are confidential and may be
privileged.  If you are not the intended recipient, please notify Malachite
(tm) Technologies, Inc. immediately -- by replying to this message or by
sending an e-mail to postmaster@malachitetech.com -- and destroy all copies
of this message and any attachments. Thank you. 






[Index of Archives]         [Linux RAID]     [Kernel Development]     [Red Hat Install]     [Video 4 Linux]     [Postgresql]     [Fedora]     [Gimp]     [Yosemite News]

  Powered by Linux