swapfile manager

Core libraries and systems
Message
Author
jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

#41 Post by jpeps »

PenguinPupLin wrote:Could you confirm that creating a swapfile of the same name and in the same harddisk partition in Lighthouse and Wary511 is alright?
When you install it, it creates an entry in /root/.swapfile. It doesn't care if you've got a similar entry in another distro.

If you're seeing swap usage, that would explain the "busy" messages. The system can only use one swapfile or swap partition. The one in use must be turned off to create a new one. Swapfile was intended when there is no swap partition already in use.

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

#42 Post by PenguinPupLin »

That's reassuring,thank you. Any idea about the hald message "multi-user -sh: /.etc/.bashrcsysctl: No such file or directory" that I got when booting up Lighthouse puppy 5.0.3 mariner after I've created the swapfile, not that I think it must have anything to do with it. Anyway,it still boots up after a while.

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

#43 Post by jpeps »

Something ( "multi-user") is looking for a missing or misplaced file. It's definitely not swapfile manager.

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

Using winfonts to create swap space

#44 Post by PenguinPupLin »

As an experiment and to test it, I follow Shinobar's instruction to use winfonts.pet to create a swap space that uses windows pagefile.sys as swap space.
First,I turn my existing swap off with your swapfilemanager. Then I installed and run winfonts3.4.pet to set swap space - my pagefile.sys has about 785MB of virtual memory. After rebooting X server, I uninstalled swapfile manger to avoid any conflict just in case. But I noticed,free in console still shows vm.swappiness=60. How is this so? Does it matter or is it useful to leave it? If necessary,how to remove it? On the other hand,if I still wish to set swappiness,how can I do so without swapfilemanager? Any advice appreciated.

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

#45 Post by jpeps »

edit "/proc/sys/vm/swappiness"; 60 is default

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.

Post Reply