Puppy Swap File Questions

Using applications, configuring, problems
Message
Author
peb
Posts: 18
Joined: Mon 24 Oct 2005, 20:28

#16 Post by peb »

I'm running Puppy 4.x. I tried to look for swp and sys using pfind to serach files and file content.Searches for file content seemed to run, but eventually hung (0% activity and blanked dialogs) without returning anything. I don't have any confidence in the lack of results. Pfind didn't find any files with the .swp extension

When I looked at running processes, it showed the process

grep -i -l pagefile.sys /proc/acpi/event

I ran md5 hashes on pagefile.sys at random intervals, and after shutting down and rebooting the computer. No change in hash file results whatsoever. So, it doesn't look like the pagefile.sys is being used.

The info provides some comfort that the pagefile.sys is not being tampered with, but without searching all the scripts for both .swp and .sys, I wouldn't call the evidence conclusive.

Bruce B

#17 Post by Bruce B »

peb wrote:I'm running Puppy 4.x. I tried to look for swp and sys using pfind to serach files and file content.Searches for file content seemed to run, but eventually hung (0% activity and blanked dialogs) without returning anything. I don't have any confidence in the lack of results. Pfind didn't find any files with the .swp extension
1) my experience is, it is more the exception than the rule that Puppy makes a pupswap.swp file. So much more the exception than the rule, I don't expect it to do it, as a rule.

Moreover, it may have been some versions that made this file and other versions not. Even at that, only in some circumstances. Example: maybe not on an NTFS, but yes on other file systems. On the other hand;

2) it is my experience that in an hdd install, Puppy will look for the file at the highest level and activate it if found. This is a fair behavior rule without many exceptions, I'm aware of. Although likely there are exceptions, considering the vast array of install types and Puppy versions.

The name it looks for is pupswap.swp, so if you make one with that name in the right location, I expect Puppy to activate it on its own.

3) if you make a file by another name or location, you will need to activate it, this is usually done by users in the file /etc/rc.d/rc.local with a command line this:

swapon /filelocation/file_name

peb
Posts: 18
Joined: Mon 24 Oct 2005, 20:28

#18 Post by peb »

I searched /etc/* and found these references to a swap file. Only one file /etc/rc.d/rc.sysint seemed to make any references to a swap file. Puppy 4.1.2 is the version I'm using. I'm running from a CDROM with a pupsave file on the harddisk.

FOUND
/etc/rc.d/rc.sysinit:155: swapon $ONESWAP
/etc/rc.d/rc.sysinit:157: [ $? -eq 0 ] && SWAPON="yes"

155-158 tries to find a linux swap partition and turn it on


================================================================
FOUND
/etc/rc.d/rc.sysinit:161:if [ "$SWAPON" != "yes" ];then
/etc/rc.d/rc.sysinit:166: swapon /initrd${PUP_HOME}${SWAPFILE}
/etc/rc.d/rc.sysinit:168: [ $? -eq 0 ] && SWAPON="yes"
/etc/rc.d/rc.sysinit:172: swapon $SWAPFILE
/etc/rc.d/rc.sysinit:174: [ $? -eq 0 ] && SWAPON="yes"

160-176 in rc.sysint:
#if no go, try for a swap file...
if [ "$SWAPON" != "yes" ];then
SWAPFILE="/pupswap.swp"
[ "$PSWAPFILE" ] && SWAPFILE="`echo -n "$PSWAPFILE" | cut -f 3 -d ','`" #/etc/rc.d/PUPSTATE
if [ -f /initrd${PUP_HOME}${SWAPFILE} ];then
echo -n "Loading swap file ${SWAPFILE}..." >/dev/console
swapon /initrd${PUP_HOME}${SWAPFILE}
status_func $?
[ $? -eq 0 ] && SWAPON="yes"
fi
if [ -f $SWAPFILE ];then
echo -n "Loading swap file ${SWAPFILE}..." >/dev/console
swapon $SWAPFILE
status_func $?
[ $? -eq 0 ] && SWAPON="yes"
fi
fi

From this it seems the only file it looks for is called pupsave.swp and the only place it looks is PUPHOME; and a swapfile is turned on if found, but not created.

On the other hand, there's this statement that is included in the above that I can't figure out. Why is it there or needed? Maybe someone can elaborate.

[ "$PSWAPFILE" ] && SWAPFILE="`echo -n "$PSWAPFILE" | cut -f 3 -d ','`"

So, my conclusion is that for 4.1.2 running from a CDROM or USB, Puppy does NOT create a swapfile automatically and does not look for use pagefile.sys or other Windows swapfile. (From my search, no files made reference to Windows swap files such as pagefile.sys.)

Correct conclusion?

User avatar
rjbrewer
Posts: 4405
Joined: Tue 22 Jan 2008, 21:41
Location: merriam, kansas

#19 Post by rjbrewer »

Puppy looks for the swap files or swap partition you may have
created.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#20 Post by rcrsn51 »

This is interesting. I know that in previous versions (2.xx?) Puppy would automatically make a swap file. But I just checked in 4.00 and this feature is gone, as PaulBx1 stated above. Does anyone know when it first disappeared?

I suspect that BarryK's rationale for removing it goes like this:

Back when most users doing a coexist install were working with Win98 and FAT32, it was considered safe to make a swap file in the Windows partition. But as NTFS became the standard, there was concern about potential corruption when the swap file was created.

However, anyone installing Puppy into a separate partition must have already reworked their hard drive. So it would not be a problem for them to split off another partition for swap.

Was this another of those unilateral decisions made by the benevolent dictator? Still, swap files are handy and it might be nice to have an option in the Setup menu to create one.
Last edited by rcrsn51 on Fri 26 Dec 2008, 18:03, edited 1 time in total.

User avatar
rjbrewer
Posts: 4405
Joined: Tue 22 Jan 2008, 21:41
Location: merriam, kansas

#21 Post by rjbrewer »

In 4.00 and before a swap partition would show up in Mutt if
you had one.
When 4.xxx with desktop drive icons came along, one of the
icons would be for swap.
Now there is no icon or listing of swap in pmount or mutt.

Bruce B

#22 Post by Bruce B »

peb wrote: So, my conclusion is that for 4.1.2 running from a CDROM or USB, Puppy does NOT create a swapfile automatically and does not look for use pagefile.sys or other Windows swapfile. (From my search, no files made reference to Windows swap files such as pagefile.sys.)

Correct conclusion?
I feel safe in saying it is correct, even to the extent that I don't think Puppy every used a Windows swap file.

The exception being user hacking to get it to use it. My opinion on what I've read is somewhat like this:

Puppy requires a 'formatted' swap file. Maybe Windows doesn't and if not, the basis for an interchangeability, but entirely untested by me.

I don't think thoroughly tested by anyone I've read.

Bligh
Posts: 480
Joined: Sun 08 Jan 2006, 11:05
Location: California

#23 Post by Bligh »

Has anyone tried using a usb flash drive for a swap partition or file? Also why not just remove or delete the swap file?
Cheers

User avatar
ttuuxxx
Posts: 11171
Joined: Sat 05 May 2007, 10:00
Location: Ontario Canada,Sydney Australia
Contact:

#24 Post by ttuuxxx »

Bligh wrote:Has anyone tried using a usb flash drive for a swap partition or file? Also why not just remove or delete the swap file?
Cheers
In the past I've dedicated a 1 gig usb stick as a swap drip and it worked fine :)
no issues or problems, kind of like my 15gig pup_save file, only do that one on a ext3 partition :)
ttuuxx

If any of you want to try it, you can download the increased size pupsave file utility but once again for ext3 only I haven't tested on any other partition type and do not use it on windows partitions, they aren't made for that.
http://www.murga-linux.com/puppy/viewto ... h&id=14644
ttuuxxx
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games :)

DMcCunney
Posts: 889
Joined: Tue 03 Feb 2009, 00:45

#25 Post by DMcCunney »

Bruce B wrote:Personally, I'm a bit paranoid writing anything of any kind to NTFS. Paranoia is a fear lacking in foundation and I'm not sure of my foundation.

The foundation I have is (1) there was a time we couldn't with Linux, (2) then FOSS development achieved a level where we could, (3) I don't think MS ever released the NTFS specs, did they? (4) lastly it is Microsoft partition and not much trust there on my part.
Largely correct. I don't believe MS has ever properly documented NTFS, so support for it on other OSes has been a matter of reverse engineering.
Works fine as long as NTFS is the same, but if MS chooses to make changes, you might have issues. (And MS does make changes. For instance, NTFS 5 supports hard links, though it doesn't expose the functionality in any easy to find way. I use a freeware third-party utility to do it under XP. Vista supports true symbolic links. I have no idea what changed, but it only works in Vista.)
I found a nice set of Unix utility ports for Windows here:

http://unxutils.sourceforge.net/
It's a decent package, and a simpler alternative to installing the Cygwin environment. I grabbed it because it has a decent port of zsh among other things.

Another open source package I like on the Windoze side is Console. Console is a tabbed wrapper for console mode programs. It's designed for shells, but will happily run any console mode program. I've had it running with MS cmd.exe, JP Software's TCC-LE, Cygwin bash, unxutils zsh and several other things simultaneously. It works fine, and supports transparency.

See http://sourceforge.net/projects/console
______
Dennis

panzerpuppy
Posts: 632
Joined: Tue 02 Oct 2007, 07:39

#26 Post by panzerpuppy »

How can I create and enable a pupswap.swp file (not a swap partition) and use it with Puppy 4.1.2 or 4.2 ?

ArnaudN
Posts: 71
Joined: Sun 29 Apr 2007, 07:10
Location: France

#27 Post by ArnaudN »

Maybe this thread can help:
Fugitive blue screen when I use pagefile.sys for swap file
http://www.murga-linux.com/puppy/viewto ... 76&t=24578

User avatar
potchan
Posts: 109
Joined: Sat 05 Apr 2008, 11:46
Location: Pilots' Height Tel Aviv - Yaffo, Israel לינוקס_פותחן
Contact:

Max and Moritz HORROR fly show

#28 Post by potchan »

Hi Team,

As I read, the connections speed-up rapidly. In Japan it's already about a 100 Mbit (while I'm on 4). This fact leads me to think my Potchan future "victims" on the cloud should enjoy a swap from cloud as well.

My question relates to my future imaginary users Max and Moritz who use the remote swap on the same time. The swap area - apart from system area - will be writable.

Is there any chance the collision of their files on swap will cause a HORROR FLY EFFECT as on famous movie :evil: ? or is it safe since no way their file fractions merge each other :lol: ??

any thoughts ??
Timmo', the potchan (=opener) team at - [url]http://potchan.org[/url]. Taste it, love it, code in it.

wingfin
Posts: 1
Joined: Sat 20 Dec 2008, 16:28
Location: Canada
Contact:

How to stop the swap

#29 Post by wingfin »

Hi,

For example, using Gparted to clean up the hard drive. The swap partition cannot be unmounted and deleted... or can it?
A "pfix=noswap" would be the ideal solution.
I did try the boot with "noswap"... as of version 4.2.1 these is still no noswap parameter... or is there?

User avatar
rjbrewer
Posts: 4405
Joined: Tue 22 Jan 2008, 21:41
Location: merriam, kansas

#30 Post by rjbrewer »

swapoff /dev/sdxx

swapon /dev/sdxx

Inspiron 700m, Pent.M 1.6Ghz, 1Gb ram.
Msi Wind U100, N270 1.6>2.0Ghz, 1.5Gb ram.
Eeepc 8g 701, 900Mhz, 1Gb ram.
Full installs

hakar
Posts: 7
Joined: Sat 10 Oct 2009, 08:56

#31 Post by hakar »

how to make Puppy 4.2 to use the Linux-swap partition, the partition is (512 MB) as sda2 is mounted by Puppy but unused. 'Conky System Monitor' shows on 0 !! use

User avatar
Aitch
Posts: 6518
Joined: Wed 04 Apr 2007, 15:57
Location: Chatham, Kent, UK

#32 Post by Aitch »

Hakar

If you have reasonably large ram it may not get used unless you are doing something intensive, like compiling or video editing,

or maybe just conky not displaying it

I have 1 Gb ram and it's split between virtual puppy 214x9 and xp, I am on here, listening to CD, browsing with several tabs open, and it's still not using swap, as shown in Htop

Aitch :)

PaulBx1
Posts: 2312
Joined: Sat 17 Jun 2006, 03:11
Location: Wyoming, USA

#33 Post by PaulBx1 »

Use the "free" command in a console window.

gcmartin

Puppy Swap File Questions

#34 Post by gcmartin »

Does Puppy "automatically" look for and know to use a SWAP partition on disk when he's running from LiveCD?

User avatar
rjbrewer
Posts: 4405
Joined: Tue 22 Jan 2008, 21:41
Location: merriam, kansas

Re: Puppy Swap File Questions

#35 Post by rjbrewer »

gcmartin wrote:Does Puppy "automatically" look for and know to use a SWAP partition on disk when he's running from LiveCD?
Yes

Inspiron 700m, Pent.M 1.6Ghz, 1Gb ram.
Msi Wind U100, N270 1.6>2.0Ghz, 1.5Gb ram.
Eeepc 8g 701, 900Mhz, 1Gb ram.
Full installs

Post Reply