Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Mon 24 Nov 2014, 13:57
All times are UTC - 4
 Forum index » House Training » Beginners Help ( Start Here)
A big tmp with small memory
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 5 [70 Posts]   Goto page: 1, 2, 3, 4, 5 Next
Author Message
Moose On The Loose


Joined: 24 Feb 2011
Posts: 534

PostPosted: Mon 16 May 2011, 10:40    Post subject:  A big tmp with small memory
Subject description: When operating from RAM, having a huge file in tmp can be trouble
 

This only applies to the case where a puppy that is operating from RAM needs to make a really huge file that will not be needed for the long term. It is a way to make /tmp be a directory on a hard drive instead of being in RAM.

I have only tried this on 4.31 but it should work on all puppy systems

1)
Mount a hard disk and make a directory on it to serve as the new
tmp for your system.
Lets say it is /mnt/sda1/BigTmp

2)
Bring up a terminal and do the following command:
Code:

cd /
mv tmp tmpold ; ln -s /mnt/sda1/BigTmp tmp


3)
Now hit the ctrl-alt-backspace to force the Xorg to restart and get over the fact that you pulled the rug out from under it for a moment.


Once this is done, it appears that puppy will operate from RAM even if you make a very huge file. That is everything of puppy except the /tmp directory remains in RAM. Only the /tmp is moved to a hard disk.

Last edited by Moose On The Loose on Wed 18 May 2011, 10:22; edited 2 times in total
Back to top
View user's profile Send private message 
bigpup


Joined: 11 Oct 2009
Posts: 5384
Location: Charleston S.C. USA

PostPosted: Mon 16 May 2011, 11:27    Post subject:  

The tmp directory is a temporary place for files to be written and stored.
Many programs use tmp, for just what it sounds like, a temporary storage location.
It normally gets emptied when you shutdown or reboot.
It has no effect on memory use.

A swap file or swap partition are used to aid memory use.
They act as a added storage area for memory. A quick access location.
Back to top
View user's profile Send private message 
Shep

Joined: 08 Nov 2008
Posts: 851
Location: GIRT-BY-SEA

PostPosted: Mon 16 May 2011, 22:16    Post subject: Re: A big tmp with small memory
Subject description: When running out of RAM, having a huge file in tmp can be trouble
 

Moose On The Loose wrote:
I have only tried this on 4.31 but it should work on all puppy systems

I think you will mange to confuse readers here, Moose. You start off by, it seems, endorsing the idea of moving the directory for temporary files (a scratchpad directory I like to think of it) to the hard drive, especially when the system is running with restricted RAM. Otherwise, some of that RAM will be squandered for /tmp when it could be better used for processing, etc., and the space available for files in /tmp will be small.

Then you provide what seems like the appropriate way to go about it by creating a link to a directory on the hard drive. Finally, you sum up the idea as:
Quote:
Once this is done, it appears that puppy will run out of RAM even if you make a very huge file.

Is there a crucial not missing from here? I think you mean to say that puppy can be now work with tmp files larger even than the available RAM because with your construct these tmp files are no longer being stored in RAM? N'est ce pas?

Operation may slow down for some applications, because storing and retrieving from the HDD will be slower than from RAM, but all things considered, including disk buffering, the differences may go unnoticed.

Once you clear up the ambiguity, this will be a useful posting. Cool

To elaborate, when viewing youtube videos, I notice that the media player stores a copy of the video file in the /tmp directory, so someone operating with restricted RAM will soon find there is a limit to the size of the video that they can view before /tmp fills up, unless they follow your suggestion of moving /tmp out of RAM and onto a larger capacity drive.

I haven't tried this myself, but I am wondering whether there is a need to take deliberate steps to clear the /tmp directory at shutdown (or startup)? When /tmp is in volatile RAM it can simply overlooked when creating the savefile, but when linked to non-volatile memory, maybe you need to clear it explicitly?
Back to top
View user's profile Send private message 
Bruce B


Joined: 18 May 2005
Posts: 11131
Location: The Peoples Republic of California

PostPosted: Tue 17 May 2011, 09:16    Post subject:  

After moving to Lupu 5.20, I noticed /tmp is not used as a directory,
rather as a mount point. (Frugal install on hard disk)

Input:

mount | grep /tmp

And mount outputs:

tmpfs on /tmp type tmpfs (rw,relatime,size=134346472k)

~

_________________
New! Puppy Linux Links Page
Back to top
View user's profile Send private message 
Moose On The Loose


Joined: 24 Feb 2011
Posts: 534

PostPosted: Tue 17 May 2011, 21:31    Post subject:  

bigpup wrote:
The tmp directory is a temporary place for files to be written and stored.
Many programs use tmp, for just what it sounds like, a temporary storage location.
It normally gets emptied when you shutdown or reboot.
It has no effect on memory use.

A swap file or swap partition are used to aid memory use.
They act as a added storage area for memory. A quick access location.


If you do as I suggest, the files in /tmp will not be in RAM or in the swap space. If you are going to put something huge into /tmp even just for a few minutes, you can run out of space if /tmp is in fact in RAM.
Back to top
View user's profile Send private message 
Moose On The Loose


Joined: 24 Feb 2011
Posts: 534

PostPosted: Tue 17 May 2011, 21:43    Post subject: Re: A big tmp with small memory
Subject description: When running out of RAM, having a huge file in tmp can be trouble
 

Shep wrote:
Moose On The Loose wrote:
I have only tried this on 4.31 but it should work on all puppy systems

I think you will mange to confuse readers here,


Yes it appears that I did manage to confuse at least one. I had assumed that there would be no need to explain the meaning of the title since it seemed so obvious to me but just in case others are reading along and not getting it.

If you want to make a file that is perhaps as big at 10G in /tmp because perhaps you are converting video from one format to another by converting it to DVD format as an intermediate step, you can't do it while running out of a smallish RAM.

If you follow my suggestion, you can then do the operation using the hard disk space.

Quote:

Then you provide what seems like the appropriate way to go about it by creating a link to a directory on the hard drive. Finally, you sum up the idea as:
Quote:
Once this is done, it appears that puppy will run out of RAM even if you make a very huge file.

Is there a crucial not missing from here? I think you mean to say that puppy can be now work with tmp files larger even than the available RAM because with your construct these tmp files are no longer being stored in RAM? N'est ce pas?

No the "not" is not the issue here. It is that I intended to mean that puppy is running out of RAM other than the /tmp and the huge file you are working with.

Quote:

Operation may slow down for some applications, because storing and retrieving from the HDD will be slower than from RAM, but all things considered, including disk buffering, the differences may go unnoticed.

Yes, the HDD is slower than RAM but it may be the best you can do when the file is really huge.

Quote:

Once you clear up the ambiguity, this will be a useful posting. Cool

To elaborate, when viewing youtube videos, I notice that the media player stores a copy of the video file in the /tmp directory, so someone operating with restricted RAM will soon find there is a limit to the size of the video that they can view before /tmp fills up, unless they follow your suggestion of moving /tmp out of RAM and onto a larger capacity drive.

I haven't tried this myself, but I am wondering whether there is a need to take deliberate steps to clear the /tmp directory at shutdown (or startup)? When /tmp is in volatile RAM it can simply overlooked when creating the savefile, but when linked to non-volatile memory, maybe you need to clear it explicitly?


I didn't think of that but when I checked, the directory I used is now empty. Perhaps as puppy shuts down, it deletes the files.
Back to top
View user's profile Send private message 
Shep

Joined: 08 Nov 2008
Posts: 851
Location: GIRT-BY-SEA

PostPosted: Wed 18 May 2011, 08:34    Post subject: Re: A big tmp with small memory
Subject description: When running out of RAM, having a huge file in tmp can be trouble
 

Moose On The Loose wrote:
Yes it appears that I did manage to confuse at least one.


Probably many more than one, now that I have deciphered the problem. We are speaking different languages . Surprised

Quote:
When running out of RAM, having a huge file in tmp can be trouble


I read this as a warning. Confused

Quote:
I had assumed that there would be no need to explain the meaning of the title


There is, but for a reason which you may not have foreseen.

When I read "running out of RAM" I interpreted it in the same vein as "running low on RAM" meaning needing more RAM than is available. Having puzzled over your clarification and gained no clarity, and re-read it 7 times with no better understanding, a light bulb clicked and I suddenly realized what you mean by "running out of RAM". That would be a frugal install, wouldn't it? Nothing whatever to do with "encountering RAM limits".
Quote:
Once this is done, it appears that puppy will run out of RAM even if you make a very huge file.

You can see why I imagined you were missing a crucial "not". And why I was then doubly perplexed when you said you weren't. Confused

It's crazy just how easy it is to get seriously derailed by differences in idioms. But all sorted now. Laughing
Back to top
View user's profile Send private message 
Béèm


Joined: 21 Nov 2006
Posts: 11782
Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win

PostPosted: Wed 18 May 2011, 09:18    Post subject:  

Moose,
Your title is absolutely unclear.
I still don't get if you are giving advice, like a how to do things, or if you have a problem.

Please rephrase your title to reflect what your issue is.

_________________
Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
Consult Wikka
Use peppyy's puppysearch
Back to top
View user's profile Send private message 
rcrsn51


Joined: 05 Sep 2006
Posts: 9259
Location: Stratford, Ontario

PostPosted: Wed 18 May 2011, 09:43    Post subject:  

I was confused too. If the phrase "running out of RAM" was replaced with "working out of RAM", the intent might be more obvious.
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4378

PostPosted: Wed 18 May 2011, 10:01    Post subject:  

If you have a low RAM system, you should do a full install. It will solve this problem and many others.
_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
Bruce B


Joined: 18 May 2005
Posts: 11131
Location: The Peoples Republic of California

PostPosted: Wed 18 May 2011, 10:22    Post subject:  

Mount gives me this

Code:
tmpfs on /tmp type tmpfs (rw,relatime,size=134346472k)


The size is determined by calculations in init. This is what I get with
512MB RAM. A person can edit init and modify the size.

If the size is exceeded, it writes to the hard disk paging device. It seems
to me, the way Barry has it, it's the best of two worlds.

~

_________________
New! Puppy Linux Links Page
Back to top
View user's profile Send private message 
Moose On The Loose


Joined: 24 Feb 2011
Posts: 534

PostPosted: Wed 18 May 2011, 10:28    Post subject: Re: A big tmp with small memory
Subject description: When running out of RAM, having a huge file in tmp can be trouble
 

Shep wrote:

When I read "running out of RAM" I interpreted it in the same vein as "running low on RAM".


Ok I went back and made an edit to use the phrase "operating from". Yes for some reason because I knew what I meant, I could not see the other meaning when doing the proof read. With the new term. I think it is now clear, bet then I thought it was clear earlier too so what do I know about clear.


BTW: I was running from a CD at the time. Not installed at all. Normally I run as a full install. I tend to reboot to the live CD version to test any *.pets I make. (I can't share the *.pets as they are collections of business related things)
Back to top
View user's profile Send private message 
Moose On The Loose


Joined: 24 Feb 2011
Posts: 534

PostPosted: Wed 18 May 2011, 10:34    Post subject:  

rcrsn51 wrote:
I was confused too. If the phrase "running out of RAM" was replaced with "working out of RAM", the intent might be more obvious.


I elected to use "operating from" to completely avoid the "out of" as part of the phrase. Hopefully it is now totally clear. Question Or is it Question
Back to top
View user's profile Send private message 
Béèm


Joined: 21 Nov 2006
Posts: 11782
Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win

PostPosted: Wed 18 May 2011, 10:41    Post subject:  

Moose,

I don't see any change so I still don't get it.
You didn't edit the subject of your initial post.
Are you giving advice (how to do)?
Are you giving a warning?
Are you having an issue and are you requesting advice?

_________________
Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
Consult Wikka
Use peppyy's puppysearch
Back to top
View user's profile Send private message 
Bruce B


Joined: 18 May 2005
Posts: 11131
Location: The Peoples Republic of California

PostPosted: Wed 18 May 2011, 11:06    Post subject:  

/tmp doesn't want to unmount or move.
Code:
-rw-r--r-- 1 root root 22965 2011-05-17 07:59 bootkernel.log
-rw-r--r-- 1 root root  1232 2011-05-17 07:59 bootsysinit.log
drwx------ 2 root root    40 2011-05-18 07:13 mc-root/
drwx------ 2 spot spot    80 2011-05-18 07:03 orbit-spot/
-rw-r--r-- 1 root root  1878 2011-05-17 07:59 pup_event_backend_modprobe_protect.log
prw-r--r-- 1 root root     0 2011-05-17 07:59 pup_event_backend_modprobe_protect_pipe|
-rw-r--r-- 1 root root     0 2011-05-18 07:01 pup_event_frontend_d_curpos.log
-rw-r--r-- 1 root root   576 2011-05-17 07:59 pup_event_modprobe.conf
-rw-r--r-- 1 root root  1679 2011-05-17 07:59 pup_event_module_devpath_log
-rw-r--r-- 1 root root  9581 2011-05-18 07:01 udevtrace.log
-rw-r--r-- 1 root root  6044 2011-05-17 07:59 udevtrace-modem.log
-rw-r--r-- 1 root root  1302 2011-05-18 07:01 xerrs.log

/sbin/pup_event_backend_modprobe_protect --daemon, seems to
be what is primarily using /tmp and keeping it from being worked
with.

~

_________________
New! Puppy Linux Links Page
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 5 [70 Posts]   Goto page: 1, 2, 3, 4, 5 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Beginners Help ( Start Here)
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1053s ][ Queries: 11 (0.0038s) ][ GZIP on ]