swapfile manager

Core libraries and systems
Message
Author
PenguinPupLin
Posts: 130
Joined: Fri 23 Dec 2011, 09:21
Location: The Little Red Dot

Winfonts failed to use winxp pagefile as swap space in 214X

#46 Post by PenguinPupLin »

OK,noted,I'll leave the swappiness=60 on.
I have a question for Shinobar,hoped he sees this. Running winfonts in Classic Pup 214X-TOP failed to use WinXP pagefile as swap space. Free in MRrxvt didn't show any swap available.

PenguinPupLin
Posts: 130
Joined: Fri 23 Dec 2011, 09:21
Location: The Little Red Dot

#47 Post by PenguinPupLin »

Hi jpeps, thanks so much for your swapfilemanager pet. I've used it successfully. I've also tried winfonts pet to set swap space which in my case makes use of the pagefile.sys in my WinXP partition. Your swapfilemanager has this swappiness feature which winfonts doesn't(though I believe it can be done manually by adding a script somewhere). However,I'm not sure if my comparison is valid,after creating a swapfile with your pet,the bootup time for Puppy is about 1.5 to 2 minutes,whereas for winfonts it's faster,under 1 minute. Just my observation.
For those who do not wish to create a new partition in Windoze,either of these methods is useful,esp for those with less than 512MB RAM;in fact,even with 512 MB RAM,if you run modern browsers and play youtube videos online,it's barely enough,so having a swap file ,preferably equal in size to your RAM capacity,will markedly improve performance.
Last edited by PenguinPupLin on Mon 09 Jan 2012, 08:17, edited 1 time in total.

jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

#48 Post by jpeps »

PenguinPupLin wrote:However,I'm not sure if my comparison is valid,after creating a swapfile with your pet,the bootup time for Puppy is about 1.5 to 2 minutes,whereas for winfonts is faster,under 1 minute. Just my observation.
I tried with Slacko. I turned swap off and rebooted in 44 seconds. I turned it on and rebooted in 42 seconds.

Edit: Uninstalled swapfile manager and rebooted: 44 seconds. Summary...no increase in boot time.

PenguinPupLin
Posts: 130
Joined: Fri 23 Dec 2011, 09:21
Location: The Little Red Dot

#49 Post by PenguinPupLin »

jpeps wrote:
PenguinPupLin wrote:However,I'm not sure if my comparison is valid,after creating a swapfile with your pet,the bootup time for Puppy is about 1.5 to 2 minutes,whereas for winfonts is faster,under 1 minute. Just my observation.
I tried with Slacko. I turned swap off and rebooted in 44 seconds. I turned it on and rebooted in 42 seconds.

Edit: Uninstalled swapfile manager and rebooted: 44 seconds. Summary...no increase in boot time.
Sorry,it could be due to something else then.
Another interesting observation I've made is that after creating pupswap.swp for use in Pup214X-TOP9 but couldn't get it to work - error:swapon - invalid argument - I then rebooted into another puppy(wary511 as well as 431),and the pupswap.swp was automatically recognised on bootup without me having done any swapon setting other than the previous winfonts-set-pagefile procedure;it actually combined the two,i.e pupswap(512MB) + pagefile(768MB) = 1.3 GB as swap ! For now,I've deleted pupswap.swp to save harddisk space until Shinobar or someone else could point me to a solution for Pup214X-TOP9 to use swap file.

PenguinPupLin
Posts: 130
Joined: Fri 23 Dec 2011, 09:21
Location: The Little Red Dot

#50 Post by PenguinPupLin »

Hi jpeps,I tried swapfilemanager in Classic Pup 214X-TOP9 to create a swap file but it didn't work. First time I used the name pupswap.swp, swapon said invalid argument. Second time, used the default name swapfile,nothing happened. Free in console no swap available.
This very useful pet works well in my other puppies.eg Wary 511, Lighthouse ,puppy 431, but I haven't tried it in Legacy OS2, am quite sure it will run into the same problem as for Classic Pup as both are based on older kernels,k2.6.18.1 (puppy 2.14).
Hoped you'd look into it and come out with a solution as without swap space,Classic Pup 214X on my notebook runs slow and jerky. Thanks in advance.
Just curious: is your swap file in Linux (ext2/3/4?) partition or ntfs like in my case?

jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

#51 Post by jpeps »

PenguinPupLin wrote:Hi jpeps,I tried swapfilemanager in Classic Pup 214X-TOP9 to create a swap file but it didn't work. First time I used the name pupswap.swp, swapon said invalid argument. Second time, used the default name swapfile,nothing happened. Free in console no swap available.
This very useful pet works well in my other puppies.eg Wary 511, Lighthouse ,puppy 431, but I haven't tried it in Legacy OS2, am quite sure it will run into the same problem as for Classic Pup as both are based on older kernels,k2.6.18.1 (puppy 2.14).
Hoped you'd look into it and come out with a solution as without swap space,Classic Pup 214X on my notebook runs slow and jerky. Thanks in advance.
Just curious: is your swap file in Linux (ext2/3/4?) partition or ntfs like in my case?
Looks like you're cross-posting the same issue in multiple threads. It was already addressed here:

http://murga-linux.com/puppy/viewtopic. ... 8dee5a96dd

The problem appear to be your unique setup, since it works fine for others. I don't know about NTFS partitions for older distributions/kernels.

User avatar
killapup
Posts: 76
Joined: Wed 25 Apr 2012, 11:48
Location: Warwick, Qld, Australia

#52 Post by killapup »

Thanks, jpeps, for this utility, being a newbie to Linux, I've struggled with creating a swapfile/partition. This has saved my hair and fingernails, great work. I've yet to test it out fully but at least my system didn't crash or freeze.

It installed without a hitch in Slacko 5 and 5.3.3 on a system with only 112 Mb of available ram, hopefully it will help with the more resource-intense apps.

Keep up the good work.

jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

#53 Post by jpeps »

killapup wrote:
It installed without a hitch in Slacko 5 and 5.3.3 on a system with only 112 Mb of available ram, hopefully it will help with the more resource-intense apps.
wow...I thought Slacko required more ram...did you try Wary? Even with a gig of ram, my swap file kicks in during intense tasks like converting particularly dense files. I'm guessing that without out it, my computer would have frozen.

jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

#54 Post by jpeps »

Update to Version 4.5: Saves settings to init.d/swapmanager instead of editing profile.local.

User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

#55 Post by SFR »

Hey Jpeps

I just started to use this app (need more mem) and it's perfect solution for me, especially that I don't want to set up a separate partition for swap.

Just a minor glitch: I noticed every time I lauch the app, two files (named "0" & "4") are being created in /root.
Most likely lines 54 & 163:

Code: Select all

[ ${b} >4 ] && SIZE="$((${SIZE} + 1))"
...
if [ "$VAR" >0 ]; then
It doesn't seem to affect the app's functionality, but anyways it's better to report. :wink:

Thank you &
Greetings!
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]

jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

#56 Post by jpeps »

SFR wrote: It doesn't seem to affect the app's functionality, but anyways it's better to report. :wink:

Thank you &
Greetings!
You won't believe this, but:

Code: Select all

 [ "$b" \> "4" ]
ah....bash!

edit: unfortunately, that solution creates errors in some versions of bash and not others, so I'll leave it alone for now.

edit2: This seems to work in several versions of bash that I've tried:

Code: Select all

[ "${b}>4" ]
Uploaded a fix. Thanks for checking. Also uploaded a gtimer version that works out of the box with lucid (needs a gtkdialog variable which checks for the correct version).

User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

#57 Post by SFR »

Thanks for quick fix! :)

Greetings!
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]

live
Posts: 223
Joined: Wed 10 Feb 2010, 21:04

#58 Post by live »

Small display problem of swapfilemanager-4.6.pet under tahrpup64, see attached screenshot
Attachments
tahrpup64-swapfile46.png
(116.88 KiB) Downloaded 470 times

User avatar
pp4mnklinux
Posts: 375
Joined: Fri 23 Aug 2013, 06:56

trying

#59 Post by pp4mnklinux »

I recently installed this soft.

REALLY USEFUL for newbies

THANKS A LOT for u all
Distro: xenialpup64 7.5 XXL
Desktop Panel: JWM ~ FbBox 5.0

User avatar
d_vineet
Posts: 116
Joined: Mon 06 Aug 2018, 05:32
Location: Bharat

xenialpup64 7.5 : pre-existing swap file config - how to

#60 Post by d_vineet »

In Xenialpup7.5 64bit, I have installed swapfilemanager 4.6.
Although I already have a swapfile of 4G which was created by installer initially, I wish to decrease it.
If I use "Utilities" -- "Swapfile Manager" -- "setup wizard"--"create swap file", maybe it would create another swap file?
I don't wish to do that.
Is it possible to adjust the pre-existing swap file?
Thanks.

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#61 Post by bigpup »

Are you sure you actually have a swap file?
Sure you are not talking about the xenialpup64save being made 4GB?
That is not a swap file. Something totally different.

A true swap file.
The file should be named swapfile.
It should be located in /mnt/home/

If it is there as swapfile for the name.

The swapfile manager will just replace it with whatever you make it in swapfile manager.
It makes a swap file named swapfile.
It overwrites the old swapfile with the new one.
So, that changes the size.

If the original swap file is named something other than swapfile.
You will end up with two swap files.

If you only want one swap file.
In the Swapfile Manager turn off swap.
In a file manager (Rox)
Delete the old swap file, so you only have the new one.
In Swapfile Manager turn swap back on.
Done.
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

User avatar
d_vineet
Posts: 116
Joined: Mon 06 Aug 2018, 05:32
Location: Bharat

#62 Post by d_vineet »

Sure I am talking about swapfile (while doing frugal install initially, I was asked reg swap file by the installer; I had specified size for that; don't exactly remember size 4 or 2 GiB).

Now I can see 2 related files in /mnt/home/
1) pupswap.swp (4GiB),
2) swapfile (w/o any file extension) (2GiB).

As you had mentioned, "swapfile" must have been created by the puppy installer initially.
But from where came the pupswap.swp, I don't know.

Should I delete both of these files and create a fresh one by using swapfile manager?

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#63 Post by bigpup »

pupswap.swp probably was made by the installer you used.
What installer did you use?
Should I delete both of these files and create a fresh one by using swapfile manager?
You could do that or just delete the pupswap.swp.
Probably will need to turn swap off in Swapfile Manger to be able to delete.

Whatever you do in the Swapfile Manager will just overwrite the one named swapfile.

Just remember in Swapfile Manager to turn swap back on when you get done.
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

User avatar
d_vineet
Posts: 116
Joined: Mon 06 Aug 2018, 05:32
Location: Bharat

#64 Post by d_vineet »

bigpup wrote:pupswap.swp probably was made by the installer you used.
What installer did you use?
While shutting down puppy for 1st time, it asked me whether to save, then I followed the instructions, did frugal install. So not sure reg the name of installer.
Should I delete both of these files and create a fresh one by using swapfile manager?
You could do that or just delete the pupswap.swp.
Probably will need to turn swap off in Swapfile Manger to be able to delete.
Whatever you do in the Swapfile Manager will just overwrite the one named swapfile.
Just remember in Swapfile Manager to turn swap back on when you get done.
OK. thanks.

User avatar
d_vineet
Posts: 116
Joined: Mon 06 Aug 2018, 05:32
Location: Bharat

#65 Post by d_vineet »

Firsly did "swap off".
Then tried to delete file /mnt/home/pupswap.swp using ROX-Filer by rgt-clk.
1) message "ERROR: Operation not permitted".
2) After a few seconds, OS halted with a message flash of "RAM remaining is 0. Pl. consider reboot...".

I then made "swap on". OS again working OK.
It's maybe that we are not supposed to delete pupswap file?

However, I can delete swapfile from ROX-Filer w/o any error, but it doesn't appear in trash. Then re-created another one by using "swapfile - Manager".

EDIT:-
Upon inspecting with "htop", swap is shown to be 6143GiB.
Means addition of pupswap.swp(4GiB) + swapfile(2GiB)
Screenshot is attached.
Can't understand this puzzle!
Attachments
htop_screenshot.png
(186.15 KiB) Downloaded 320 times

Post Reply