Skip to contentSkip to conversation

Run linux in ramdisk(tmpfs) and use a mounted HD for files cause memory and CPU overflow!

DISCUSSION Ewerton Romulo 3 participants 12 messages Jun 27, 2005 – Jun 30, 2005 VFS

lore
Share & tools
lore
#0 lore raw

I am building a very small linux system to boot off an IDE-HD module and run from a ramdisk.
He´s working well and have no problem funtion like that. I´m using
linux kernel 2.4.30!
But some times I need to mount a partion on HD and use a directory to
save many files in it!
I mount it, create a directory there but ... when I try to use the HD
mount with the directory, save many files in it, the memory go up .. up ... and the linux stop working!!!
If I umount the partion everything return to function well. When I mount the partion again and begin to put files in it ... the
problem return!
I try to mount partion using ext2 and ext3 ... the problem is the
same!!!
I believe that has something not working well with how the ramdisk or
initrd use the HD mounted!!!
I apreciate any help ...
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#1 lore raw
Quoted 2 lines · Ewerton Romulo

I am building a very small linux system to boot off an IDE-HD module and run from a ramdisk.

Ramdisk *OR* tmpfs? They are completely different things.

Quoted 4 lines

He´s working well and have no problem funtion like that. I´m using
linux kernel 2.4.30!
But some times I need to mount a partion on HD and use a directory to
save many files in it!

How large are those "many files"? Where do the data come from?

Quoted 4 lines

I mount it, create a directory there but ... when I try to use the HD
mount with the directory, save many files in it, the memory go up .. up ... and the linux stop working!!!o
If I umount the partion everything return to function well.

How do you umount it, when it stopped working?!

Anyway, could you provide contents of /proc/meminfo, /proc/slabinfo, /proc/mounts and /proc/swaps when the bad things are happening?

Quoted 4 lines

When I mount the partion again and begin to put files in it ... the
problem return!
I try to mount partion using ext2 and ext3 ... the problem is the
same!!!

I'd be surprised if there was a difference. The filesystems are quite similar.

-------------------------------------------------------------------------------
Jan 'Bulb' Hudec <[email protected]>

#2 lore raw

Thanks for answer Jan

Quoted 4 lines
Quoted 2 lines

I am building a very small linux system to boot off an IDE-HD module and run from a ramdisk.

Ramdisk *OR* tmpfs? They are completely different things.

Sorry. I can say that is a ramdisk formatted to use tmpfs
filesystem! If I need to select one, so can I say that is a tmpfs!

Quoted 7 lines
Quoted 4 lines

He´s working well and have no problem funtion like that. I´m using
linux kernel 2.4.30!
But some times I need to mount a partion on HD and use a directory to
save many files in it!

How large are those "many files"? Where do the data come from?

Any files!! Any size!!! From any where!!! If I´d like to save a .txt file ... or download a .tgz file and save in it .. a gif figure to
using later ... just a jpeg ... a HTML file ... a big movie file ..
a mp3 file ... just a .bin ... or linux module ... download from ftp ... any size ... any file ... from any where!! If I mount a partion on HD and put things in it ... consumes memory (RAM) ... and problem appear!!!
Not important if the file is big or not, if I put things there I had this problem!!
Suppose that I had 100MB in a partion mounted HD !!! If I put many 3KB txt in there ... I think that I´ll not problem with memory!!! But it´s consumes my memory!!!

Quoted 7 lines
Quoted 4 lines

I mount it, create a directory there but ... when I try to use the HD
mount with the directory, save many files in it, the memory go up .. up ... and the linux stop working!!!o
If I umount the partion everything return to function well.

How do you umount it, when it stopped working?!

No! I umount before it´s stopped!!! Before memory go 100% .. And
things back to normal!

Quoted 2 lines

Anyway, could you provide contents of /proc/meminfo, /proc/slabinfo, /proc/mounts and /proc/swaps when the bad things are happening?

I´ll take a look in it and post here!

Quoted 8 lines
Quoted 5 lines

When I mount the partion again and begin to put files in it ... the
problem return!
I try to mount partion using ext2 and ext3 ... the problem is the
same!!!

I'd be surprised if there was a difference. The filesystems are quite similar.

In this case I only use it to see if I had different result! I try
to mount a fat partion too!! Same result!!!
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#3 lore raw
Quoted 9 lines · Ewerton Romulo

Thanks for answer Jan

Quoted 4 lines
Quoted 2 lines

I am building a very small linux system to boot off an IDE-HD module and run from a ramdisk.

Ramdisk *OR* tmpfs? They are completely different things.

Sorry. I can say that is a ramdisk formatted to use tmpfs
filesystem! If I need to select one, so can I say that is a tmpfs!

Sorry, it isn't. Nothing can be formated to use tmpfs, because tmpfs is no-device filesystem. Tmpfs lives in RAM, but directly, without a ramdisk. On the other hand ramdisk emulates a block device with memory and has to be formated with some block device filesystem -- which tmpfs isn't.

[skipped lot of exclamation marks with intersparsed small bits of text]

Quoted 4 lines
Quoted 2 lines

Anyway, could you provide contents of /proc/meminfo, /proc/slabinfo, /proc/mounts and /proc/swaps when the bad things are happening?

I´ll take a look in it and post here!

Ok. _when_ you post it, there will be something to talk about.

Oh, include also exact version of kernel you are using (including from which distribution or whether it's official kernel), contents of /proc/modules and if it's a kernel you compiled it's config.

Quoted 2 lines

In this case I only use it to see if I had different result! I try
to mount a fat partion too!! Same result!!!

That mostly rules out the filesystem driver. Ok.

-------------------------------------------------------------------------------
Jan 'Bulb' Hudec <[email protected]>

#11 lore raw
In reply to Ewerton Romulo
Quoted 2 lines

Sorry. I can say that is a ramdisk formatted to use tmpfs
filesystem! If I need to select one, so can I say that is a tmpfs!

It's really easy to answer the question "what filesystem type is it?". Just look in /proc/mounts. There's a line for each mounted filesystem, and the 3rd word is the filesystem type.

There's a lot of your story that doesn't seem to be in conventional terminology, so I don't really understand it.

But I'm starting to get a good idea of what you're trying to say. My guess is you have a filesystem of some kind on a ramdisk. As Jan says, we know it isn't "tmpfs", since that filesystem type doesn't live on a disk. But if you're using a ramdisk, I doubt it makes any difference how the data on it is formatted (i.e. the filesystem type).

Ramdisks have a characteristic similar to what you describe: A brand new ramdisk contains all zeroes and uses no memory. The more blocks you write to a ramdisk, the more real memory it occupies, and the memory is not reclaimable in any way by the memory manager and the amount is not limited by anything but the ramdisk size. If your ramdisk size is bigger than the amount of real memory you have (or just bigger than the amount you can spare), you will eventually kill your system if you keep putting data on the ramdisk.

Unmounting a filesystem that is on a ramdisk wouldn't get that memory back, but if unmounting stops you from writing any more, that might help. Destroying the ramdisk would get the memory back.

The way you fix that problem is by making sure you don't allocate more memory to ramdisks than you have. When you create a ramdisk, you say how big it is, and you should be able to spare a byte of real memory for every byte of ramdisk. It's a manual memory management task.

Or you might forget about ramdisks and use tmpfs instead.

BTW, what's with the exclamation points (!)? I think periods (.) are more appropriate, and definitely easier to read, here. Similarly, the ellipses (...) look like they're meant to be commas (,).

--
Bryan Henderson IBM Almaden Research Center
San Jose CA Filesystems

#4 lore raw
In reply to Jan Hudec

OK!

/proc/modules

via-rhine              10328   1
8139too                11996   1
mii                     1868   0 [via-rhine 8139too]
sch_ingress             1116   0 (unused)
sch_sfq                 2816 321
sch_htb                16896   2
cls_u32                 3960 108
cls_fw                  2004   1
ip_nat_quake3           1544   0 (unused)
ip_nat_mms              2352   0 (unused)
ip_nat_h323             2020   0 (unused)
ip_nat_amanda            708   0 (unused)
ip_nat_irc              1648   0 (unused)
ip_nat_ftp              2096   0 (unused)
ip_conntrack_quake3     1592   1
ip_conntrack_mms        2480   1
ip_conntrack_h323       1832   1
ip_conntrack_egg        2024   0 (unused)
ip_conntrack_amanda      968   1
ip_conntrack_irc        2344   1
ip_conntrack_ftp        3120   1
softdog                 1316   1

My /proc/mount is:
rootfs / rootfs rw 0 0
/dev/root / tmpfs rw 0 0
/proc /proc proc rw 0 0
devpts /dev/pts devpts rw 0 0
/dev/hda1 /test vfat rw 0 0

The tmpfs is my root that is descompression from a .tgz file in the beginning of boot.

I use kernel 2.4.30 oficial, no especific linux distribution!

#5 lore raw
Quoted 4 lines · Ewerton Romulo

OK!

/proc/modules
[snipped]

Only network stuff here. Since there is no problem when disk is not used, I think we can rule out network stuff.

Quoted 3 lines

My /proc/mount is:
rootfs / rootfs rw 0 0
/dev/root / tmpfs rw 0 0

So you are using tmpfs, *not* ramdisk. Tmpfs lives in memory and occupies amout of memory equal to amount of data stored. Unlike ramdisk, memory is reclaimed when you remove files from tmpfs and when you umount it.

Quoted 3 lines

/proc /proc proc rw 0 0
devpts /dev/pts devpts rw 0 0
/dev/hda1 /test vfat rw 0 0

Ok, got the picture.

Quoted 1 line

I use kernel 2.4.30 oficial, no especific linux distribution!

You should have included your config too, since you are using a custom one. We need to know what drivers you have compiled in your kernel. It's called .config and located in the build directory of the kernel.

And of course, you did not include the most important stuff -- /proc/meminfo, /proc/slabinfo, /proc/diskstats and /proc/vmstats from time when it exhibits the problem. Also you forgot about /proc/swaps (it may be empty or not even exist, but you should at least say so).

-------------------------------------------------------------------------------
Jan 'Bulb' Hudec <[email protected]>

#6 lore raw
In reply to Ewerton Romulo

Your subject line says "use a mounted HD for files." Does this mean you're putting these files into a filesystem that lives on a real, conventional disk device?

In your /proc mounts, I see one such filesystem mounted:

/dev/hda1 /test vfat rw 0 0

You also have a tmpfs filesystem mounted, which you mentioned a few times, but I believe all you really said about it is that it's your root filesystem. Or is this also the one in which you're stuffing files when the problem occurs?

/dev/root / tmpfs rw 0 0

Do you have reason to believe that the fact of having a tmpfs root filesystem is related to the problem?

--
Bryan Henderson IBM Almaden Research Center
San Jose CA Filesystems

#7 lore raw

OK! Let´s go!!!
Below I put the /proc/ files wanted ... before HD mount ... after HD mount ... when the memory problem occur ... and ... then when I umount HD!!! for better viee look txt attach!!!

The .config of the kernel is here:
http://www.rictec.com.br/claudio/coyote/kernel-2.4.30/config-224-ide

/proc/meminfo
total: used: free: shared: buffers: cached:

Mem:  31453184  5816320 25636864        0        0  2674688
Swap:        0        0        0
MemTotal:        30716 kB
MemFree:         25036 kB
MemShared:           0 kB
Buffers:             0 kB
Cached:           2612 kB
SwapCached:          0 kB
Active:           1360 kB
Inactive:         1276 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:        30716 kB
LowFree:         25036 kB
SwapTotal:           0 kB
SwapFree:            0 kB

/proc/slabinfo

slabinfo - version: 1.1

kmem_cache            56     72    108    2    2    1
ip_conntrack           3     11    336    1    1    1
tcp_tw_bucket          0     40     96    0    1    1
tcp_bind_bucket        2    203     16    1    1    1
tcp_open_request       0     59     64    0    1    1
inet_peer_cache        0      0     48    0    0    1
ip_fib_hash           13    203     16    1    1    1
ip_dst_cache           8     24    160    1    1    1
arp_cache              3     40     96    1    1    1
blkdev_requests     1536   1560     96   39   39    1
dnotify_cache          0      0     20    0    0    1
file_lock_cache        0      0     92    0    0    1
fasync_cache           0      0     16    0    0    1
uid_cache              0      0     32    0    0    1
skbuff_head_cache    189    198    176    9    9    1
sock                  18     27    864    2    3    2
sigqueue               0     29    132    0    1    1
kiobuf                 0      0     64    0    0    1
cdev_cache           238    312     48    4    4    1
bdev_cache             1     59     64    1    1    1
mnt_cache             10     59     64    1    1    1
inode_cache          853    872    464  107  109    1
dentry_cache         850    875    112   25   25    1
filp                  83    105    112    3    3    1
names_cache            0      2   4096    0    2    1
buffer_head          100    560     96    5   14    1
mm_struct             13     27    144    1    1    1
vm_area_struct       162    240     80    4    5    1
fs_cache              12    113     32    1    1    1
files_cache           13     18    416    2    2    1
signal_act            14     18   1296    5    6    1
size-131072(DMA)       0      0 131072    0    0   32
size-131072            0      0 131072    0    0   32
size-65536(DMA)        0      0  65536    0    0   16
size-65536             0      0  65536    0    0   16
size-32768(DMA)        0      0  32768    0    0    8
size-32768             0      1  32768    0    1    8
size-16384(DMA)        0      0  16384    0    0    4
size-16384             0      0  16384    0    0    4
size-8192(DMA)         0      0   8192    0    0    2
size-8192              0      1   8192    0    1    2
size-4096(DMA)         0      0   4096    0    0    1
size-4096              4      4   4096    4    4    1
size-2048(DMA)         0      0   2048    0    0    1
size-2048             94     94   2048   47   47    1
size-1024(DMA)         0      0   1024    0    0    1
size-1024             21     24   1024    6    6    1
size-512(DMA)          0      0    512    0    0    1
size-512              28     32    512    4    4    1
size-256(DMA)          0      0    256    0    0    1
size-256             115    120    256    8    8    1
size-128(DMA)          0      0    128    0    0    1
size-128             521    540    128   18   18    1
size-64(DMA)           0      0     64    0    0    1
size-64               88    118     64    2    2    1
size-32(DMA)           0      0     32    0    0    1
size-32              262    339     32    3    3    1

/proc/mounts

rootfs / rootfs rw 0 0
/dev/root / tmpfs rw 0 0
/proc /proc proc rw 0 0
devpts /dev/pts devpts rw 0 0

/proc/swaps
Filename Type Size Used Priority

After mounting ...

/proc/meminfo

total: used: free: shared: buffers: cached:

Mem:  31453184  5771264 25681920        0    32768  2678784
Swap:        0        0        0
MemTotal:        30716 kB
MemFree:         25080 kB
MemShared:           0 kB
Buffers:            32 kB
Cached:           2616 kB
SwapCached:          0 kB
Active:           1388 kB
Inactive:         1280 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:        30716 kB
LowFree:         25080 kB
SwapTotal:           0 kB
SwapFree:            0 kB

/proc/slabinfo

slabinfo - version: 1.1

kmem_cache            56     72    108    2    2    1
ip_conntrack           3     11    336    1    1    1
tcp_tw_bucket          0     40     96    0    1    1
tcp_bind_bucket        2    203     16    1    1    1
tcp_open_request       0     59     64    0    1    1
inet_peer_cache        0      0     48    0    0    1
ip_fib_hash           13    203     16    1    1    1
ip_dst_cache           5     24    160    1    1    1
arp_cache              1     40     96    1    1    1
blkdev_requests     1536   1560     96   39   39    1
dnotify_cache          0      0     20    0    0    1
file_lock_cache        0      0     92    0    0    1
fasync_cache           0      0     16    0    0    1
uid_cache              0      0     32    0    0    1
skbuff_head_cache    249    264    176   12   12    1
sock                  18     27    864    2    3    2
sigqueue               0     29    132    0    1    1
kiobuf                 0      0     64    0    0    1
cdev_cache           238    312     48    4    4    1
bdev_cache             2     59     64    1    1    1
mnt_cache             11     59     64    1    1    1
inode_cache          868    872    464  109  109    1
dentry_cache         864    875    112   25   25    1
filp                  83    105    112    3    3    1
names_cache            0      2   4096    0    2    1
buffer_head          144    560     96    5   14    1
mm_struct             11     27    144    1    1    1
vm_area_struct       145    240     80    4    5    1
fs_cache              10    113     32    1    1    1
files_cache           11     18    416    2    2    1
signal_act            12     18   1296    4    6    1
size-131072(DMA)       0      0 131072    0    0   32
size-131072            0      0 131072    0    0   32
size-65536(DMA)        0      0  65536    0    0   16
size-65536             0      0  65536    0    0   16
size-32768(DMA)        0      0  32768    0    0    8
size-32768             0      1  32768    0    1    8
size-16384(DMA)        0      0  16384    0    0    4
size-16384             0      0  16384    0    0    4
size-8192(DMA)         0      0   8192    0    0    2
size-8192              0      1   8192    0    1    2
size-4096(DMA)         0      0   4096    0    0    1
size-4096              4      4   4096    4    4    1
size-2048(DMA)         0      0   2048    0    0    1
size-2048            100    100   2048   50   50    1
size-1024(DMA)         0      0   1024    0    0    1
size-1024             22     24   1024    6    6    1
size-512(DMA)          0      0    512    0    0    1
size-512              28     32    512    4    4    1
size-256(DMA)          0      0    256    0    0    1
size-256             169    180    256   12   12    1
size-128(DMA)          0      0    128    0    0    1
size-128             521    540    128   18   18    1
size-64(DMA)           0      0     64    0    0    1
size-64               87    118     64    2    2    1
size-32(DMA)           0      0     32    0    0    1
size-32              266    339     32    3    3    1

/proc/mounts

rootfs / rootfs rw 0 0
/dev/root / tmpfs rw 0 0
/proc /proc proc rw 0 0
devpts /dev/pts devpts rw 0 0
/dev/hda1 /mnt vfat rw 0 0

/proc/swaps
Filename Type Size Used Priority

The problem occur!!!! Look memory free!!!!

/proc/meminfo
total: used: free: shared: buffers: cached:

Mem:  31453184 29626368  1826816        0    77824 22487040
Swap:        0        0        0
MemTotal:        30716 kB
MemFree:          1784 kB
MemShared:           0 kB
Buffers:            76 kB
Cached:          21960 kB
SwapCached:          0 kB
Active:           2060 kB
Inactive:        19996 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:        30716 kB
LowFree:          1784 kB
SwapTotal:           0 kB
SwapFree:            0 kB

/proc/slabinfo
slabinfo - version: 1.1

kmem_cache            56     72    108    2    2    1
ip_conntrack          11     11    336    1    1    1
tcp_tw_bucket          0     40     96    0    1    1
tcp_bind_bucket        2    203     16    1    1    1
tcp_open_request       0     59     64    0    1    1
inet_peer_cache        0      0     48    0    0    1
ip_fib_hash           13    203     16    1    1    1
ip_dst_cache           3     24    160    1    1    1
arp_cache              1     40     96    1    1    1
blkdev_requests     1536   1560     96   39   39    1
dnotify_cache          0      0     20    0    0    1
file_lock_cache        0      0     92    0    0    1
fasync_cache           0      0     16    0    0    1
uid_cache              0      0     32    0    0    1
skbuff_head_cache    334    352    176   16   16    1
sock                  18     27    864    2    3    2
sigqueue               0     29    132    0    1    1
kiobuf                 0      0     64    0    0    1
cdev_cache           238    312     48    4    4    1
bdev_cache             2     59     64    1    1    1
mnt_cache             11     59     64    1    1    1
inode_cache          898    904    464  113  113    1
dentry_cache         894    910    112   26   26    1
filp                  83    105    112    3    3    1
names_cache            0      2   4096    0    2    1
buffer_head        38920  38920     96  973  973    1
mm_struct             11     27    144    1    1    1
vm_area_struct       145    240     80    4    5    1
fs_cache              10    113     32    1    1    1
files_cache           11     18    416    2    2    1
signal_act            12     18   1296    4    6    1
size-131072(DMA)       0      0 131072    0    0   32
size-131072            0      0 131072    0    0   32
size-65536(DMA)        0      0  65536    0    0   16
size-65536             0      0  65536    0    0   16
size-32768(DMA)        0      0  32768    0    0    8
size-32768             0      1  32768    0    1    8
size-16384(DMA)        0      0  16384    0    0    4
size-16384             0      0  16384    0    0    4
size-8192(DMA)         0      0   8192    0    0    2
size-8192              0      1   8192    0    1    2
size-4096(DMA)         0      0   4096    0    0    1
size-4096              4      4   4096    4    4    1
size-2048(DMA)         0      0   2048    0    0    1
size-2048            106    108   2048   53   54    1
size-1024(DMA)         0      0   1024    0    0    1
size-1024             22     24   1024    6    6    1
size-512(DMA)          0      0    512    0    0    1
size-512              28     32    512    4    4    1
size-256(DMA)          0      0    256    0    0    1
size-256             247    255    256   17   17    1
size-128(DMA)          0      0    128    0    0    1
size-128             521    540    128   18   18    1
size-64(DMA)           0      0     64    0    0    1
size-64               87    118     64    2    2    1
size-32(DMA)           0      0     32    0    0    1
size-32              270    339     32    3    3    1

/proc/mounts

rootfs / rootfs rw 0 0
/dev/root / tmpfs rw 0 0
/proc /proc proc rw 0 0
devpts /dev/pts devpts rw 0 0
/dev/hda1 /mnt vfat rw 0 0

/proc/swaps
Filename Type Size Used Priority

HD umounted!!!! Look memory free!!!!

/proc/meminfo
total: used: free: shared: buffers: cached:

Mem:  31453184  9744384 21708800        0        0  2678784
Swap:        0        0        0
MemTotal:        30716 kB
MemFree:         21200 kB
MemShared:           0 kB
Buffers:             0 kB
Cached:           2616 kB
SwapCached:          0 kB
Active:           1364 kB
Inactive:         1272 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:        30716 kB
LowFree:         21200 kB
SwapTotal:           0 kB
SwapFree:            0 kB

/proc/slabinfo
slabinfo - version: 1.1

kmem_cache            56     72    108    2    2    1
ip_conntrack           2     22    336    1    2    1
tcp_tw_bucket          0     40     96    0    1    1
tcp_bind_bucket        2    203     16    1    1    1
tcp_open_request       0     59     64    0    1    1
inet_peer_cache        0      0     48    0    0    1
ip_fib_hash           13    203     16    1    1    1
ip_dst_cache           3     24    160    1    1    1
arp_cache              1     40     96    1    1    1
blkdev_requests     1536   1560     96   39   39    1
dnotify_cache          0      0     20    0    0    1
file_lock_cache        0      0     92    0    0    1
fasync_cache           0      0     16    0    0    1
uid_cache              0      0     32    0    0    1
skbuff_head_cache    337    352    176   16   16    1
sock                  18     27    864    2    3    2
sigqueue               0     29    132    0    1    1
kiobuf                 0      0     64    0    0    1
cdev_cache           238    312     48    4    4    1
bdev_cache             1     59     64    1    1    1
mnt_cache             10     59     64    1    1    1
inode_cache          853    904    464  107  113    1
dentry_cache         850    910    112   25   26    1
filp                  83    105    112    3    3    1
names_cache            0      2   4096    0    2    1
buffer_head          100  38920     96    5  973    1
mm_struct             11     27    144    1    1    1
vm_area_struct       145    240     80    4    5    1
fs_cache              10    113     32    1    1    1
files_cache           11     18    416    2    2    1
signal_act            12     18   1296    4    6    1
size-131072(DMA)       0      0 131072    0    0   32
size-131072            0      0 131072    0    0   32
size-65536(DMA)        0      0  65536    0    0   16
size-65536             0      0  65536    0    0   16
size-32768(DMA)        0      0  32768    0    0    8
size-32768             0      1  32768    0    1    8
size-16384(DMA)        0      0  16384    0    0    4
size-16384             0      0  16384    0    0    4
size-8192(DMA)         0      0   8192    0    0    2
size-8192              0      1   8192    0    1    2
size-4096(DMA)         0      0   4096    0    0    1
size-4096              4      4   4096    4    4    1
size-2048(DMA)         0      0   2048    0    0    1
size-2048            106    110   2048   53   55    1
size-1024(DMA)         0      0   1024    0    0    1
size-1024             21     24   1024    6    6    1
size-512(DMA)          0      0    512    0    0    1
size-512              28     32    512    4    4    1
size-256(DMA)          0      0    256    0    0    1
size-256             247    255    256   17   17    1
size-128(DMA)          0      0    128    0    0    1
size-128             521    540    128   18   18    1
size-64(DMA)           0      0     64    0    0    1
size-64               87    118     64    2    2    1
size-32(DMA)           0      0     32    0    0    1
size-32              270    339     32    3    3    1

/proc/mounts

rootfs / rootfs rw 0 0
/dev/root / tmpfs rw 0 0
/proc /proc proc rw 0 0
devpts /dev/pts devpts rw 0 0

/proc/swaps
Filename Type Size Used Priority

Below I put the /proc/ files wanted ... before HD mount ... after HD mount ... when the memory problem occur ... and ... then when I umount HD!!!

The .config of the kernel is here:
http://www.rictec.com.br/claudio/coyote/kernel-2.4.30/config-224-ide

/proc/meminfo
total: used: free: shared: buffers: cached:

Mem:  31453184  5816320 25636864        0        0  2674688
Swap:        0        0        0
MemTotal:        30716 kB
MemFree:         25036 kB
MemShared:           0 kB
Buffers:             0 kB
Cached:           2612 kB
SwapCached:          0 kB
Active:           1360 kB
Inactive:         1276 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:        30716 kB
LowFree:         25036 kB
SwapTotal:           0 kB
SwapFree:            0 kB

/proc/slabinfo

slabinfo - version: 1.1

kmem_cache            56     72    108    2    2    1
ip_conntrack           3     11    336    1    1    1
tcp_tw_bucket          0     40     96    0    1    1
tcp_bind_bucket        2    203     16    1    1    1
tcp_open_request       0     59     64    0    1    1
inet_peer_cache        0      0     48    0    0    1
ip_fib_hash           13    203     16    1    1    1
ip_dst_cache           8     24    160    1    1    1
arp_cache              3     40     96    1    1    1
blkdev_requests     1536   1560     96   39   39    1
dnotify_cache          0      0     20    0    0    1
file_lock_cache        0      0     92    0    0    1
fasync_cache           0      0     16    0    0    1
uid_cache              0      0     32    0    0    1
skbuff_head_cache    189    198    176    9    9    1
sock                  18     27    864    2    3    2
sigqueue               0     29    132    0    1    1
kiobuf                 0      0     64    0    0    1
cdev_cache           238    312     48    4    4    1
bdev_cache             1     59     64    1    1    1
mnt_cache             10     59     64    1    1    1
inode_cache          853    872    464  107  109    1
dentry_cache         850    875    112   25   25    1
filp                  83    105    112    3    3    1
names_cache            0      2   4096    0    2    1
buffer_head          100    560     96    5   14    1
mm_struct             13     27    144    1    1    1
vm_area_struct       162    240     80    4    5    1
fs_cache              12    113     32    1    1    1
files_cache           13     18    416    2    2    1
signal_act            14     18   1296    5    6    1
size-131072(DMA)       0      0 131072    0    0   32
size-131072            0      0 131072    0    0   32
size-65536(DMA)        0      0  65536    0    0   16
size-65536             0      0  65536    0    0   16
size-32768(DMA)        0      0  32768    0    0    8
size-32768             0      1  32768    0    1    8
size-16384(DMA)        0      0  16384    0    0    4
size-16384             0      0  16384    0    0    4
size-8192(DMA)         0      0   8192    0    0    2
size-8192              0      1   8192    0    1    2
size-4096(DMA)         0      0   4096    0    0    1
size-4096              4      4   4096    4    4    1
size-2048(DMA)         0      0   2048    0    0    1
size-2048             94     94   2048   47   47    1
size-1024(DMA)         0      0   1024    0    0    1
size-1024             21     24   1024    6    6    1
size-512(DMA)          0      0    512    0    0    1
size-512              28     32    512    4    4    1
size-256(DMA)          0      0    256    0    0    1
size-256             115    120    256    8    8    1
size-128(DMA)          0      0    128    0    0    1
size-128             521    540    128   18   18    1
size-64(DMA)           0      0     64    0    0    1
size-64               88    118     64    2    2    1
size-32(DMA)           0      0     32    0    0    1
size-32              262    339     32    3    3    1

/proc/mounts

rootfs / rootfs rw 0 0
/dev/root / tmpfs rw 0 0
/proc /proc proc rw 0 0
devpts /dev/pts devpts rw 0 0

/proc/swaps
Filename Type Size Used Priority

After mounting ...

/proc/meminfo

total: used: free: shared: buffers: cached:

Mem:  31453184  5771264 25681920        0    32768  2678784
Swap:        0        0        0
MemTotal:        30716 kB
MemFree:         25080 kB
MemShared:           0 kB
Buffers:            32 kB
Cached:           2616 kB
SwapCached:          0 kB
Active:           1388 kB
Inactive:         1280 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:        30716 kB
LowFree:         25080 kB
SwapTotal:           0 kB
SwapFree:            0 kB

/proc/slabinfo

slabinfo - version: 1.1

kmem_cache            56     72    108    2    2    1
ip_conntrack           3     11    336    1    1    1
tcp_tw_bucket          0     40     96    0    1    1
tcp_bind_bucket        2    203     16    1    1    1
tcp_open_request       0     59     64    0    1    1
inet_peer_cache        0      0     48    0    0    1
ip_fib_hash           13    203     16    1    1    1
ip_dst_cache           5     24    160    1    1    1
arp_cache              1     40     96    1    1    1
blkdev_requests     1536   1560     96   39   39    1
dnotify_cache          0      0     20    0    0    1
file_lock_cache        0      0     92    0    0    1
fasync_cache           0      0     16    0    0    1
uid_cache              0      0     32    0    0    1
skbuff_head_cache    249    264    176   12   12    1
sock                  18     27    864    2    3    2
sigqueue               0     29    132    0    1    1
kiobuf                 0      0     64    0    0    1
cdev_cache           238    312     48    4    4    1
bdev_cache             2     59     64    1    1    1
mnt_cache             11     59     64    1    1    1
inode_cache          868    872    464  109  109    1
dentry_cache         864    875    112   25   25    1
filp                  83    105    112    3    3    1
names_cache            0      2   4096    0    2    1
buffer_head          144    560     96    5   14    1
mm_struct             11     27    144    1    1    1
vm_area_struct       145    240     80    4    5    1
fs_cache              10    113     32    1    1    1
files_cache           11     18    416    2    2    1
signal_act            12     18   1296    4    6    1
size-131072(DMA)       0      0 131072    0    0   32
size-131072            0      0 131072    0    0   32
size-65536(DMA)        0      0  65536    0    0   16
size-65536             0      0  65536    0    0   16
size-32768(DMA)        0      0  32768    0    0    8
size-32768             0      1  32768    0    1    8
size-16384(DMA)        0      0  16384    0    0    4
size-16384             0      0  16384    0    0    4
size-8192(DMA)         0      0   8192    0    0    2
size-8192              0      1   8192    0    1    2
size-4096(DMA)         0      0   4096    0    0    1
size-4096              4      4   4096    4    4    1
size-2048(DMA)         0      0   2048    0    0    1
size-2048            100    100   2048   50   50    1
size-1024(DMA)         0      0   1024    0    0    1
size-1024             22     24   1024    6    6    1
size-512(DMA)          0      0    512    0    0    1
size-512              28     32    512    4    4    1
size-256(DMA)          0      0    256    0    0    1
size-256             169    180    256   12   12    1
size-128(DMA)          0      0    128    0    0    1
size-128             521    540    128   18   18    1
size-64(DMA)           0      0     64    0    0    1
size-64               87    118     64    2    2    1
size-32(DMA)           0      0     32    0    0    1
size-32              266    339     32    3    3    1

/proc/mounts

rootfs / rootfs rw 0 0
/dev/root / tmpfs rw 0 0
/proc /proc proc rw 0 0
devpts /dev/pts devpts rw 0 0
/dev/hda1 /mnt vfat rw 0 0

/proc/swaps
Filename Type Size Used Priority

The problem occur!!!! Look memory free!!!!

/proc/meminfo
total: used: free: shared: buffers: cached:

Mem:  31453184 29626368  1826816        0    77824 22487040
Swap:        0        0        0
MemTotal:        30716 kB
MemFree:          1784 kB
MemShared:           0 kB
Buffers:            76 kB
Cached:          21960 kB
SwapCached:          0 kB
Active:           2060 kB
Inactive:        19996 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:        30716 kB
LowFree:          1784 kB
SwapTotal:           0 kB
SwapFree:            0 kB

/proc/slabinfo
slabinfo - version: 1.1

kmem_cache            56     72    108    2    2    1
ip_conntrack          11     11    336    1    1    1
tcp_tw_bucket          0     40     96    0    1    1
tcp_bind_bucket        2    203     16    1    1    1
tcp_open_request       0     59     64    0    1    1
inet_peer_cache        0      0     48    0    0    1
ip_fib_hash           13    203     16    1    1    1
ip_dst_cache           3     24    160    1    1    1
arp_cache              1     40     96    1    1    1
blkdev_requests     1536   1560     96   39   39    1
dnotify_cache          0      0     20    0    0    1
file_lock_cache        0      0     92    0    0    1
fasync_cache           0      0     16    0    0    1
uid_cache              0      0     32    0    0    1
skbuff_head_cache    334    352    176   16   16    1
sock                  18     27    864    2    3    2
sigqueue               0     29    132    0    1    1
kiobuf                 0      0     64    0    0    1
cdev_cache           238    312     48    4    4    1
bdev_cache             2     59     64    1    1    1
mnt_cache             11     59     64    1    1    1
inode_cache          898    904    464  113  113    1
dentry_cache         894    910    112   26   26    1
filp                  83    105    112    3    3    1
names_cache            0      2   4096    0    2    1
buffer_head        38920  38920     96  973  973    1
mm_struct             11     27    144    1    1    1
vm_area_struct       145    240     80    4    5    1
fs_cache              10    113     32    1    1    1
files_cache           11     18    416    2    2    1
signal_act            12     18   1296    4    6    1
size-131072(DMA)       0      0 131072    0    0   32
size-131072            0      0 131072    0    0   32
size-65536(DMA)        0      0  65536    0    0   16
size-65536             0      0  65536    0    0   16
size-32768(DMA)        0      0  32768    0    0    8
size-32768             0      1  32768    0    1    8
size-16384(DMA)        0      0  16384    0    0    4
size-16384             0      0  16384    0    0    4
size-8192(DMA)         0      0   8192    0    0    2
size-8192              0      1   8192    0    1    2
size-4096(DMA)         0      0   4096    0    0    1
size-4096              4      4   4096    4    4    1
size-2048(DMA)         0      0   2048    0    0    1
size-2048            106    108   2048   53   54    1
size-1024(DMA)         0      0   1024    0    0    1
size-1024             22     24   1024    6    6    1
size-512(DMA)          0      0    512    0    0    1
size-512              28     32    512    4    4    1
size-256(DMA)          0      0    256    0    0    1
size-256             247    255    256   17   17    1
size-128(DMA)          0      0    128    0    0    1
size-128             521    540    128   18   18    1
size-64(DMA)           0      0     64    0    0    1
size-64               87    118     64    2    2    1
size-32(DMA)           0      0     32    0    0    1
size-32              270    339     32    3    3    1

/proc/mounts

rootfs / rootfs rw 0 0
/dev/root / tmpfs rw 0 0
/proc /proc proc rw 0 0
devpts /dev/pts devpts rw 0 0
/dev/hda1 /mnt vfat rw 0 0

/proc/swaps
Filename Type Size Used Priority

HD umounted!!!! Look memory free!!!!

/proc/meminfo
total: used: free: shared: buffers: cached:

Mem:  31453184  9744384 21708800        0        0  2678784
Swap:        0        0        0
MemTotal:        30716 kB
MemFree:         21200 kB
MemShared:           0 kB
Buffers:             0 kB
Cached:           2616 kB
SwapCached:          0 kB
Active:           1364 kB
Inactive:         1272 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:        30716 kB
LowFree:         21200 kB
SwapTotal:           0 kB
SwapFree:            0 kB

/proc/slabinfo
slabinfo - version: 1.1

kmem_cache            56     72    108    2    2    1
ip_conntrack           2     22    336    1    2    1
tcp_tw_bucket          0     40     96    0    1    1
tcp_bind_bucket        2    203     16    1    1    1
tcp_open_request       0     59     64    0    1    1
inet_peer_cache        0      0     48    0    0    1
ip_fib_hash           13    203     16    1    1    1
ip_dst_cache           3     24    160    1    1    1
arp_cache              1     40     96    1    1    1
blkdev_requests     1536   1560     96   39   39    1
dnotify_cache          0      0     20    0    0    1
file_lock_cache        0      0     92    0    0    1
fasync_cache           0      0     16    0    0    1
uid_cache              0      0     32    0    0    1
skbuff_head_cache    337    352    176   16   16    1
sock                  18     27    864    2    3    2
sigqueue               0     29    132    0    1    1
kiobuf                 0      0     64    0    0    1
cdev_cache           238    312     48    4    4    1
bdev_cache             1     59     64    1    1    1
mnt_cache             10     59     64    1    1    1
inode_cache          853    904    464  107  113    1
dentry_cache         850    910    112   25   26    1
filp                  83    105    112    3    3    1
names_cache            0      2   4096    0    2    1
buffer_head          100  38920     96    5  973    1
mm_struct             11     27    144    1    1    1
vm_area_struct       145    240     80    4    5    1
fs_cache              10    113     32    1    1    1
files_cache           11     18    416    2    2    1
signal_act            12     18   1296    4    6    1
size-131072(DMA)       0      0 131072    0    0   32
size-131072            0      0 131072    0    0   32
size-65536(DMA)        0      0  65536    0    0   16
size-65536             0      0  65536    0    0   16
size-32768(DMA)        0      0  32768    0    0    8
size-32768             0      1  32768    0    1    8
size-16384(DMA)        0      0  16384    0    0    4
size-16384             0      0  16384    0    0    4
size-8192(DMA)         0      0   8192    0    0    2
size-8192              0      1   8192    0    1    2
size-4096(DMA)         0      0   4096    0    0    1
size-4096              4      4   4096    4    4    1
size-2048(DMA)         0      0   2048    0    0    1
size-2048            106    110   2048   53   55    1
size-1024(DMA)         0      0   1024    0    0    1
size-1024             21     24   1024    6    6    1
size-512(DMA)          0      0    512    0    0    1
size-512              28     32    512    4    4    1
size-256(DMA)          0      0    256    0    0    1
size-256             247    255    256   17   17    1
size-128(DMA)          0      0    128    0    0    1
size-128             521    540    128   18   18    1
size-64(DMA)           0      0     64    0    0    1
size-64               87    118     64    2    2    1
size-32(DMA)           0      0     32    0    0    1
size-32              270    339     32    3    3    1

/proc/mounts

rootfs / rootfs rw 0 0
/dev/root / tmpfs rw 0 0
/proc /proc proc rw 0 0
devpts /dev/pts devpts rw 0 0

/proc/swaps
Filename Type Size Used Priority

#10 lore raw
In reply to Bryan Henderson
Quoted 7 lines

Your subject line says "use a mounted HD for files." Does this mean you're putting these files into a filesystem that lives on a real, conventional disk device?

In your /proc mounts, I see one such filesystem mounted:

/dev/hda1 /test vfat rw 0 0

Yes! That´s right!! The files is many .. that diferents sizes ..
so I can´t put it all in RAM!

Quoted 6 lines

You also have a tmpfs filesystem mounted, which you mentioned a few times, but I believe all you really said about it is that it's your root filesystem. Or is this also the one in which you're stuffing files when the problem occurs?

/dev/root / tmpfs rw 0 0

Well, my root filesystem is tmpfs, always ... only the new files
that I like to save, will be saved in a mount HD!

Quoted 3 lines

Do you have reason to believe that the fact of having a tmpfs root filesystem is related to the problem?

Well, the problem only happen when I mount HD and begin to save files in it!
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#8 lore raw
In reply to Ewerton Romulo

Is there some symptom besides MemFree being small? Does the system get slow? Ridiculously slow? Does it hang?

MemFree probably is not what you think it is. There's a common misconception that Linux memory is divided into used and free, and when the free memory is gone, you're done. In fact, memory has varying degrees of freeness. MemFree is the most free -- it's so free that it's wasted. It contains no data of any use whatsoever. To reduce waste, Linux tries to keep MemFree small. The numbers you have are normal.

The "Inactive" line is also quite free. This memory contains data that might be useful again later, but probably not, and is recreatable from another copy. So when Linux needs memory, it can simply throw out the contents of this memory and use it. Your "inactive" line shows you have plenty of memory available. It apparently contains the cached copy of all those files you wrote.

Some inactive memory is easier to reuse than other. If it contains dirty cache (buffered file writes), then Linux has to write the data to the disk before it can use the memory. So things slow down to disk speed. I would expect that to be the case in your scenario.

This stuff changes all the time, and with it the format of /proc/meminfo. Unlike most of the /proc/meminfos I've seen, this version has nothing about dirty pages in it, so it's hard to tell exactly where the system sits. I wonder if this information is somewhere else? Anybody?

There's one thing I don't get: Where is the tmpfs data? With no swap space and only a couple megabytes of page cache, I can't figure it out. Surely the root filesystem is bigger than a few megabytes? Does someone understand this?

--
Bryan Henderson IBM Almaden Research Center
San Jose CA Filesystems

#9 lore raw
Quoted 9 lines · Bryan Henderson

Is there some symptom besides MemFree being small? Does the system get slow? Ridiculously slow? Does it hang?

[...]

This stuff changes all the time, and with it the format of /proc/meminfo. Unlike most of the /proc/meminfos I've seen, this version has nothing about dirty pages in it, so it's hard to tell exactly where the system sits. I wonder if this information is somewhere else? Anybody?

I have noticed there are quite many buffer heads, but I am not sure what would be normal amount.

Quoted 4 lines

There's one thing I don't get: Where is the tmpfs data? With no swap space and only a couple megabytes of page cache, I can't figure it out. Surely the root filesystem is bigger than a few megabytes? Does someone understand this?

I believe he talked about small system. So it actually can be just a few megabytes. It obviously looks like setup for a router (with all the iptables stuff loaded), which needs just a busybox, iptables to set it up and perhaps ssh server so it can be reconfigured over network.

-------------------------------------------------------------------------------
Jan 'Bulb' Hudec <[email protected]>