Memory Usage whilst file copying

Please post any bugs you have found
Post Reply
Message
Author
Jeff

Memory Usage whilst file copying

#1 Post by Jeff »

I am not sure whether this is a bug but it is annoying me.

I am using puppy 0.98 but have found similar issues with 1.01 and 1.02 when I have used install 2 to hard disk.

It seems that copying files from the same partition or from mounted partitions uses an amount of memory the size of the files copied. I am having trouble reclaiming this memory usage. Is it something that I am experiencing ? Should I be using a swap partition or something else? Is there a solution?

Any help is appreciated before permanent hair loss :--)

Jeff

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#2 Post by BarryK »

I don't know if that's a bug though... the memory manager isn't releasing the memory, but that doesn't mean you will run out of memory.
Is there some situation in which this causes a problem?

Guest

#3 Post by Guest »

The machine I'm using has 256Mb of memory. After mounting a cdrom I find that copying the contents of said cd to root or whatever will cause memory to exceed 256MB as per Rox DockApp memory indicator. Certain programs will shut down and memory returned to 33MB for Puppy 0.98. I know this is extreme but wondered if anyone experienced anything like this. Dismounting cdrom does return some of the memory but not all. The issue for me was to escape Windows (TM) gobbling effect on memory but I seem to find Linux does something similar. Unless I'm doing something wrong.

Can anyone replicate this issue or offer a solution...

Many Thanks
Jeff.

GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#4 Post by GuestToo »

as far as i know, under normal conditions, a memory manager will try to use as much of your ram as possible ... if it doesn't, it is not making efficient use of your ram

at the moment, i am not running Puppy (i'm running Vector Linux actually) ... i have Azureus, Firefox, and xawtv running ... typing "free" tells me i have about 2 megs of ram free (about 99% of my ram is being "used") ... if have about 506 megs free of my swap space (less than 1% being used)

this is good
the hard drive is much much slower than ram

normally, your ram should quickly be almost completely "used" ... your swap space should not be used much (there should definitely not be a lot of thrashing)

when you shut down a program, the memory manager often keeps part or all of it in ram, just in case you need it again ... that ram is available if it needs to be used ... so if you have Firefox installed on your hard drive, the first time you use it, you will hear a lot of disk activity, but if you shut it down and start it again, it will popup more quickly, and the hard drive may not be accessed at all ) ... because Firefox was left in ram, in case you wanted it again)

as for copying files ... Windows (including WinXP) seems to copy files a tiny block (about 1k or so) at a time ... this is very inefficient ... if you copy a large file, you can hear the hard drive working hard as the drive head flicks furiously back and forth between the 2 areas of the drive ... i have a program installed that takes as much ram space as it can, copies as much of the file to ram as it can, and writes that large block to the hard drive all in one big chunk ... this is much more efficient, faster, quieter, and doesn't wear out your hard drive as fast ... yes, it uses more ram to do it, but that's good ... it's what ram is for ... Linux doesn't force files to be copied a tiny chunk at a time, which is good ... yes, it uses more ram ... but that's a good thing

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#5 Post by BarryK »

Jeff,
I've never experienced the problem you describe, of programs shutting down.
With 256M RAM, the memeory manager should be able to handle the situation.

Anyway, create a swap partition or a swap file.
After creating it, you can put the "swapon" command into /etc/rc.d/rc.local so it starts up every time.

Jesse
Posts: 466
Joined: Sun 08 May 2005, 16:07
Location: Auckland, NZ

#6 Post by Jesse »

Hi Jeff,

don't forget that the root disk is sometimes a memory disk, depending on your boot method, copying a cd to the memory disk may fill it up. send us output from a rxvt "df -h" so we can see how you are set up.
My root memory disk reports 982MB available, but it is limited by my computers physical ram of 650MB.
there is a commad line call "sync" it flushes all unwritten sectors to disk, not sure if it will help.

Jesse

Guest

#7 Post by Guest »

df -h

gives

Filesystem Size Used Available Use% Mounted
rootfs 1.9G 230.4M 1.6G 12% /
/dev/hda5 1.9G 230.4M 1.6G 12% /
/dev/ram0 10.6M 13.0k 10.1M 0% /mnt/ram0

So it could be how I have set things up. Unfortunately real-life prevents me from looking into more until next weekend but thanks for the advice.

Regards
Jeff.

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#8 Post by BarryK »

...um, /dev/ram0, what's that there for?

Guest

#9 Post by Guest »

Memory caching of thumbnails

Jeff

Post Reply