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 Thu 21 Aug 2014, 12:07
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
Linux swap partition
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 2 of 2 [30 Posts]   Goto page: Previous 1, 2
Author Message
rarsa


Joined: 29 May 2005
Posts: 3053
Location: Kitchener, Ontario, Canada

PostPosted: Tue 30 Jan 2007, 22:42    Post subject:  

Gn2 wrote:
That ONLY occurs if physcial RAM is insufficient and tasks are VERY memory intensive.
Gn2 is also right.

Maybe you heard something else and you wrongly interpreted the other way arround

Regarding the size of the partition:
If you NEED a large swap partition you'll most likelly experience a lot of trashing.

that is different than

If you HAVE a large swap ...

Regarding the multiple swap partitions

Maybe you heard that if you have multiple swap partitions in DIFFERENT HDDs you may get better swap performance.

If you create multiple swap partitions, the situation can only degrade as fragmented files take longer to retrieve than files that are in a continious space.

_________________
http://rarsa.blogspot.com Covering my eclectic thoughts
http://www.kwlug.org/blog/48 Covering my Linux How-to
Back to top
View user's profile Send private message Visit poster's website 
Gn2


Joined: 16 Oct 2006
Posts: 936
Location: virtual - Veni vidi, nihil est adpulerit

PostPosted: Wed 31 Jan 2007, 00:18    Post subject:  

Puppy is NOT generic use of Linux - the strengths also limit how it may be used

Care to Sizing of Swap partition/s makes (temporary storage) fragmentation (non-contiguous sectors) highly unlikely

Careful partition considerations at O/System install time, of placement of any sub folders in dedicated optional partitions
ESP if for Swap - even on same drive - will enhance seek & execute load times.

Locating a swap partition on drive other than root file system frees CPU time slices = the thread forks, true multi-tasks.

USE of tmpfs is explained HERE
Please refer also to Maximising Swappage > & use of niceness options.

Prioritizing (see man/info nice) swap usage in conjunction w/tmpfs goes far to enhance system responce
These benefits may be - depending on use and Cfg of platform - little noticed or critical.

Placing /tmp in RAM (Puppy) is very unwise.- there is already limitations due to pivotal mounting & unionfs.

= Puppy may be modified - Wink but then is NOT Puppy !
Back to top
View user's profile Send private message 
ndujoe1

Joined: 04 Dec 2005
Posts: 698

PostPosted: Tue 05 Jun 2007, 09:05    Post subject: Linux Swap and OpenOffice .sfs puppy 2.15CE  

After reading the postings on the Linux swap partition issue I must confess that I am thoroughly confused.

When I installed the Open Office .sfs file in Puppy LInux 2.15CE setup with a live CD a personal file size of 1 GB. 256 MB of ram. The Open office application got to the boot up screen but nothing happened thereafter.

MU suggested in a posting that I install a swap partition and then Open Office will operate properly.

I was going to use the 2 x ram that I saw elsewhere but now I am not sure and don't want to complicate things or compromise my hard drive life. It is a 40 GB hard drive.

Any guidance at this point. Thanks.
Back to top
View user's profile Send private message 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 11014
Location: Arizona USA

PostPosted: Tue 05 Jun 2007, 10:09    Post subject:  

Don't worry about it. With 256 MB of RAM, Puppy won't need to use the swap memory much, if ever. Just make a 256 MB swap partition and see what happens. If you make it bigger, the worst that will happen is that most of it will never be used, and you will have effectively lost that much capacity of the hard disk drive. Still, better to have too much (swap) memory than not enough. Smile
Back to top
View user's profile Send private message 
Sage

Joined: 04 Oct 2005
Posts: 4781
Location: GB

PostPosted: Tue 05 Jun 2007, 10:11    Post subject:  

Careful reading of the foregoing suggest that you start with a single swap partition of 256Mb. If you see/hear lots of disk thrashing, you could try increasing the swap to 512Mb, but, since RAM is so incredibly cheap, adding another 256Mb of RAM would give better results overall, unless you have the SiS735 chipset which doesn't like two sticks of SDRAM and sometimes ditto DDRAM.
Notwithstanding, Puppy is a bad choice for really big apps like OOoo - it was never intended to be other than a compact distro (cf. Gn2 above). Fedora7, out last week would be an excellent choice if you don't want fancy 3D graphics, otherwise MEPIS or PCLinuxOS are well liked. If you want the bees knees in graphics use a distro that has no connection with the restrictive laws of the USA.
By-the-by, this Forum needs Gn2 around to spice up the discourse and lend a little culture to events as well as erudition. Come in Gn2.

WARNING: This comment " Still, better to have too much (swap) memory than not enough. :)" sneaked in whilst I was penning a considered reply. It is not only wrong, a total misunderstanding of all the preceding discussion, but I hope anyone following it will use the County Court to extract the cost of a new HD from the perpetrator.
Back to top
View user's profile Send private message 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 11014
Location: Arizona USA

PostPosted: Tue 05 Jun 2007, 10:41    Post subject:  

Sage is right that adding RAM is the best solution, but I'll stand by my statement that too much swap memory is nothing more than a waste of hard disk space. Smile
_________________
Puppy Help 101 - an interactive tutorial for Lupu 5.25
Back to top
View user's profile Send private message 
GuestToo
Puppy Master

Joined: 04 May 2005
Posts: 4078

PostPosted: Tue 05 Jun 2007, 11:06    Post subject:  

my swap space is about 900 megs, but i have /tmp mounted as a tmpfs file system ... that is, my /tmp is in ram and uses the swap space if needed

i usually compile apps in /tmp, and i often download large files, like 700 meg iso's, to /tmp ... which means i'm downloading to the swap space

if i burn a cd, i often use dvdisaster to read an iso file from the cd, which i usually put in /tmp, then i make an error correction file for the iso

i could use /tmp, which on my machine is ram+swap space, as temporary storage for iso files when i burn a cd, but i usally pipe mkisofs directly to cdrecord, so i usually don't need any temporary space
Back to top
View user's profile Send private message 
Runemaster


Joined: 05 Aug 2006
Posts: 180
Location: Albany, GA U.S.

PostPosted: Tue 05 Jun 2007, 15:59    Post subject:  

Reading this thread makes me think back to the days of messin with 'doze. XP's default Virtual memory (swap file) size is set to 2.0gb regardless of system memory, and with everyone out there gobbling up these $300 comps
that only come with 256 system memory. This makes windows yet again sound more and more inefficient. Although like with many of you have said circumstances usually dictate the size of the swap file needed. But I would bet money on the fact that if you limited it to 1.0gb (based on what the averge person uses the pc for) performance would slightly increase. Unless your running a program like SolidWorks (engineering program, graphically intense) or playing Rome - Total War which was sponsored by the history channel a while back, in which case my freind would often get the system message saying the his virtual memory is dangerously low with hiw 256meg, 2.0gb virtual memory.

_________________
Adventurer: I seek knowledge and strength.

Seer:Knowledge comes from experience.....Strength comes from battleaxes.
Back to top
View user's profile Send private message MSN Messenger 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 11014
Location: Arizona USA

PostPosted: Tue 05 Jun 2007, 16:22    Post subject:  

Here's a quote from this web page:

Quote:
...If you don't have swap space, then anonymous mappings can't be flushed. They have to stay in memory until they're deleted. The kernel can only obtain clean memory and free memory by flushing out file-backed pages: programs, libraries, and data files. Not having swap space constrains and unbalances the kernel's page allocation. However unlikely it is that the data pages will be used again — even if they're never used again — they still need to stay in memory sucking up precious RAM. That means the kernel has to do more work to write out file-backed pages, and to read them back in after they're discarded. The kernel needs to throw out relatively valuable file-backed pages, because it has nowhere to write relatively worthless anonymous pages.

Not only this, but flushing pages to swap is actually a bit easier and quicker than flushing them to disk: the code is much simpler, and there are no directory trees to update. The swap file/partition is just an array of pages. This is another reason to give the kernel the option of flushing to swap as well as to the filesystem...

If I read it right, not having enough swap space actually causes Linux to thrash the disk, in an effort to keep some RAM free for immediate use. There is nothing in the article that suggests there is a penalty for having too much swap memory. There may be a limit of 2048 MB of swap that Linux will recognize. Obviously, swap space which is never used could have been used for recording files to disk.

Here's another, later article, explaining Linux' virtual memory management.

Last edited by Flash on Tue 05 Jun 2007, 16:40; edited 2 times in total
Back to top
View user's profile Send private message 
Runemaster


Joined: 05 Aug 2006
Posts: 180
Location: Albany, GA U.S.

PostPosted: Tue 05 Jun 2007, 16:29    Post subject:  

I've noticed that Windows also does this as well before i upgraded my dad's laptop from 256 to 512. most likely used as "elbow room" if you see what I mean.
_________________
Adventurer: I seek knowledge and strength.

Seer:Knowledge comes from experience.....Strength comes from battleaxes.
Back to top
View user's profile Send private message MSN Messenger 
ndujoe1

Joined: 04 Dec 2005
Posts: 698

PostPosted: Tue 05 Jun 2007, 23:34    Post subject: Swap Partition Open Office .sfs solved  

I created a small swap partition 256 mb and the Open Office .sfs came up fine.
Back to top
View user's profile Send private message 
Pence

Joined: 30 Jul 2005
Posts: 201

PostPosted: Wed 06 Jun 2007, 12:33    Post subject:  

Looks like Ubuntu created a 747.0 mb swap partition on my computer.Seems to work fine with Puppy also.
Back to top
View user's profile Send private message 
pigshed

Joined: 23 May 2008
Posts: 198
Location: France

PostPosted: Fri 13 Jun 2008, 12:48    Post subject: Large swap can give problems  

Just an example of a potential problem with having an oversized swap partition.

On an old PIII 600 laptop with 320mb ram, I'd followed the old theories of double the memory for the swap file (an xubuntu installation also did the same thing). So I had a 690mb swap file.

Running Puppy Dingo 4.00 this didn't seem to present any problems, it just sat there unused and wasted as Dingo easily fitted into RAM.

Installing Muppy 8.3e Standard, the machine was painfully slow ..

As the swap was over 650mb (the size of the main muppy file), Muppy was loading itself into the swap and running from there... Reduce the swap down to 256mb, and it flies !

I wonder if this affects all puplets running on machines where there is insufficient RAM to load everything into memory - yet with a large enough swap file to accommodate the main SFS ?? for instance for similar machines to mine with 320mb ram so other linux distro's would have created a 700mb ish swap file already on the HD ? Or is this a Muppy quirk ? As a linux/puppy newby, whilst trying different distro's this would have put me off and I'd have been none the wiser and would probably have moved on and wondered what all the fuss was over the new puppy ... Smile

Cheers, Adam.
Back to top
View user's profile Send private message 
alienjeff


Joined: 08 Jul 2006
Posts: 2291
Location: Winsted, CT - USA

PostPosted: Thu 03 Jul 2008, 00:41    Post subject:  

WhoDo wrote:
For the average user, if you have 512Mb RAM or more your swap partition is superfluous in Puppy, and most other distros. It simply won't ever be used so why waste the space?

When running Puppy v2.12 on a machine with a gig of RAM, I go into swap usage fairly regularly. So the operative words in #4 of WhoDo's list are "average users." It's more a matter of personal computing habits than strict HW considerations.

_________________
hangout: ##b0rked on irc.freenode.net
diversion: http://alienjeff.net - visit The Fringe
quote: "The foundation of authority is based upon the consent of the people." - Thomas Hooker

Back to top
View user's profile Send private message 
PupGeek

Joined: 06 Sep 2009
Posts: 388

PostPosted: Sat 02 Jan 2010, 16:00    Post subject:  

Agreed jeff. I have made ProducerPup available, and it has GIMP. I have gotten the distro to run on an old 400 MHz Pentium II box with 320 MB RAM with a 1GB swap partition and it ran well. While running it on a 2.6 GHz system containing 512 MB RAM and no swap, GIMP kept on crashing with 6 Megapixel images until i plugged a flash drive in and activated the 1 GB swap on it.

To those who say puppy is not meant to run large apps, it may not be intended to run such apps in live or frugal mode, but I'm pretty sure that a full HDD install would pretty much eliminate such limitations associated with using large apps with a live session...... by nature it does not have to load the main .sfs file into RAM, thus, freeing up more memory and having to use swap a lot less.

I can also agree that more RAM is a better way to go than increasing swap... I usually format a 1GB swap partition simply because it is a nice round figure. If you notice excessive HD access while a swap is in use, the true solution is adding more memory. And I like the analogy of RAM being a workbench and swap being the drawers.


Also, a few tips for reducing your dependence on RAM and swap:


    Use Roxapps or .sfs files instead of including them in the remaster.

    If you have an available partition or free HD or flash drive space, try moving directories such as "my-roxapps" and "my-documents" to that partition and linking them into your /root directory instead.... this will eliminate the need to keep the contents of those directories loaded into RAM or swap.

    If a roxapp needs certain directories to exist in your system directories, then have the AppRun script link those directories or files to those locations and also remove the links when the app shuts down. Removing the links is important to maintain a clean filesystem and keep your pup_save file from constantly expanding.

    Remember that when puppy is booted in live or frugal mode, its main .sfs is loaded into RAM and your pup_save file may be as well, so anything that can keep the pup_save file to a minimum can help reduce your dependence on swap space. Thinking about that, maybe running a plain-jane puppy and using roxapps and sfs modules is better for performance. Sfs files are good because they do not load into RAM when simply mounted. Combining their use with a roxapp's AppRun script to do all the preparations and export all environment variables is a good way to run apps in puppy while not taking up needless amounts of RAM.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 2 of 2 [30 Posts]   Goto page: Previous 1, 2
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Users ( For the regulars )
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.0998s ][ Queries: 12 (0.0055s) ][ GZIP on ]