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 Fri 25 Jul 2014, 04:23
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » System
swapfile manager
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 2 of 4 Posts_count   Goto page: Previous 1, 2, 3, 4 Next
Author Message
jemimah


Joined: 26 Aug 2009
Posts: 4309
Location: Tampa, FL

PostPosted: Tue 31 Aug 2010, 01:43    Post_subject:  

I think it's because I'm not sure why I need a scratch file, but the purpose of a swap file is more obvious.
Back to top
View user's profile Send_private_message Visit_website 
sc0ttman


Joined: 16 Sep 2009
Posts: 2372
Location: UK

PostPosted: Tue 31 Aug 2010, 08:46    Post_subject:  

jemimah wrote:
I think it's because I'm not sure why I need a scratch file, but the purpose of a swap file is more obvious.

Isn't is just semantics? Don't they create the same kind of file?

_________________
Akita Linux, VLC-GTK, Pup Search, Pup File Search
Back to top
View user's profile Send_private_message 
jemimah


Joined: 26 Aug 2009
Posts: 4309
Location: Tampa, FL

PostPosted: Tue 31 Aug 2010, 08:50    Post_subject:  

A swap file adds virtual memory. A scratch file is like an additional save file, yes?
Back to top
View user's profile Send_private_message Visit_website 
sc0ttman


Joined: 16 Sep 2009
Posts: 2372
Location: UK

PostPosted: Tue 31 Aug 2010, 08:53    Post_subject:  

jemimah wrote:
A swap file adds virtual memory. A scratch file is like an additional save file, yes?

Aha.. that must be it. Very succinct.

_________________
Akita Linux, VLC-GTK, Pup Search, Pup File Search
Back to top
View user's profile Send_private_message 
RetroTechGuy


Joined: 15 Dec 2009
Posts: 2666
Location: USA

PostPosted: Tue 31 Aug 2010, 11:56    Post_subject:  

jemimah wrote:
A swap file adds virtual memory. A scratch file is like an additional save file, yes?


The one thing I didn't like about the tool was that it, by default, did not name the file pupswap.swp (IIRC that's the default pup swap filename).

Also, I think the default size was a little strange (did I miss read it, or was it 10 MB?) -- and it would probably be better if it used MB as the size measurement (I doubt anyone wants to fine-tune the swap size to kilobytes, or bytes...).

I'm guessing that if someone is adding a swap file, they probably want 256MB or 512 MB, so I would be inclined to make one of those sizes the "default" choice (the user can still change the size manually).

Otherwise, the tool seemed to work fine (a couple weeks back, I converted another Windows user to Puppy -- too little RAM for Windows to run properly, but Puppy did just fine, with a swap file Very Happy )
Back to top
View user's profile Send_private_message 
jpeps

Joined: 31 May 2008
Posts: 3220

PostPosted: Tue 31 Aug 2010, 12:19    Post_subject:  

RetroTechGuy wrote:


The one thing I didn't like about the tool was that it, by default, did not name the file pupswap.swp (IIRC that's the default pup swap filename).

You can name it a anything you want to
edit: .swp is used by vim, so probably not a good idea. Also, you don't want to leave it in "/", so it's not really "default".

Quote:

Also, I think the default size was a little strange (did I miss read it, or was it 10 MB?) -- and it would probably be better if it used MB as the size measurement (I doubt anyone wants to fine-tune the swap size to kilobytes, or bytes...).

I'm guessing that if someone is adding a swap file, they probably want 256MB or 512 MB, so I would be inclined to make one of those sizes the "default" choice (the user can still change the size manually).

It's set at 100M, which was the recommended desired size noted in posts on several of the Puppy threads. KB appears to be the standard way of setting size, although it reads the rounded MB size after setting it (see posted pic).
Back to top
View user's profile Send_private_message 
RetroTechGuy


Joined: 15 Dec 2009
Posts: 2666
Location: USA

PostPosted: Tue 31 Aug 2010, 14:14    Post_subject:  

jpeps wrote:
RetroTechGuy wrote:


The one thing I didn't like about the tool was that it, by default, did not name the file pupswap.swp (IIRC that's the default pup swap filename).

You can name it a anything you want to
edit: .swp is used by vim, so probably not a good idea. Also, you don't want to leave it in "/", so it's not really "default".


Well, it is "default", just not a good one. Wink
(no, not negative criticism, this is a useful tool -- I'd just like to make it more newbie friendly).

A better default location choice would be /mnt/home/ (which would dump it onto the boot media, which is the user's most probably desired location)

Quote:

Quote:

Also, I think the default size was a little strange (did I miss read it, or was it 10 MB?) -- and it would probably be better if it used MB as the size measurement (I doubt anyone wants to fine-tune the swap size to kilobytes, or bytes...).

I'm guessing that if someone is adding a swap file, they probably want 256MB or 512 MB, so I would be inclined to make one of those sizes the "default" choice (the user can still change the size manually).

It's set at 100M, which was the recommended desired size noted in posts on several of the Puppy threads. KB appears to be the standard way of setting size, although it reads the rounded MB size after setting it (see posted pic).


KB is certainly the standard (OLD) way of setting sizes. This may be why all of the tools now include "-h" for "human readable", since few intuitively think in KB any more. And Puppy and memory now operate on the MB scale, so that might be more "newbie friendly" choice (let us further note that the experts probably don't need this sort of tool).

For a pupswap, I generally suggest the user get approximately 512MB of space. If they have 256MB RAM, then they need another 256MB swap. Some people have odd-ball sizes. Perhaps the tool could look at physical RAM available, and recommend a swap size based on that value... Hmmm... Now that would be a rather cool, newbie friendly tool.

OK guys, what are your recommendations? When you set up a machine with insufficient RAM, what memory level do you shoot for? Or, similarly, how much RAM to swap? (I have historically used the 2x rule for swap -- the swap should be twice the RAM)
Back to top
View user's profile Send_private_message 
jpeps

Joined: 31 May 2008
Posts: 3220

PostPosted: Tue 31 Aug 2010, 17:49    Post_subject:  

RetroTechGuy wrote:

Well, it is "default", just not a good one. Wink
(no, not negative criticism, this is a useful tool -- I'd just like to make it more newbie friendly).

A better default location choice would be /mnt/home/ (which would dump it onto the boot media, which is the user's most probably desired location)


Doesn't work for me, because I don't have sufficient space in /mnt/home
However, I uploaded one to your specs if it works better for others. I didn't add .swp, because anyone who uses vim probably batch removes them on a regular basis. Very Happy
Quote:

I'm guessing that if someone is adding a swap file, they probably want 256MB or 512 MB, so I would be inclined to make one of those sizes the "default" choice (the user can still change the size manually).


Ver 2.0 defaults at 512, with input for M, if that makes it more friendly. The optimal size is probably debatable, but easily altered. Hope this works. I also included a rounding function, something bash isn't very good at (the 99M thingy was getting to me)
Back to top
View user's profile Send_private_message 
Frank Cox

Joined: 01 Nov 2009
Posts: 381

PostPosted: Sat 30 Oct 2010, 01:10    Post_subject: Deleting existing swap file
Sub_title: Another route
 

The method posted on the first page of this thread to get swapoff to function failed when I tried it. After typing swapoff -a /mnt/sda4 the lock was still there. {just happed to have swapfile on save partition}

Swapoff {and swapon} are in sbin so I open a terminal ,cd to sbin and typed swapoff -a . In Gparted it still showed the lock and still gave the error message but then it disappeared and I was able to delete it.
Weird. but at least its gone.

Thanks for the program!
Back to top
View user's profile Send_private_message 
darkcity


Joined: 23 May 2010
Posts: 2424
Location: near here

PostPosted: Sat 04 Jun 2011, 11:11    Post_subject:  

Thanks for the program. Is it possible for two different installations of Puppy to share a Swap file (at different times of course)?
Back to top
View user's profile Send_private_message Visit_website 
jpeps

Joined: 31 May 2008
Posts: 3220

PostPosted: Sat 04 Jun 2011, 11:28    Post_subject:  

darkcity wrote:
Thanks for the program. Is it possible for two different installations of Puppy to share a Swap file (at different times of course)?


Just add file /root/.swapfile which shows where swapfile is:
eg, "/mnt/sda2/swapfile"
Back to top
View user's profile Send_private_message 
darkcity


Joined: 23 May 2010
Posts: 2424
Location: near here

PostPosted: Sun 05 Jun 2011, 07:44    Post_subject:  

Thanks for the reply, I've added the wizard to the Wiki
http://puppylinux.org/wikka/SwapFileManager

Puppy 5.2.5 seems to automatically a swap file is you have low memory, do you know what version this started at?
Back to top
View user's profile Send_private_message Visit_website 
jpeps

Joined: 31 May 2008
Posts: 3220

PostPosted: Sun 31 Jul 2011, 03:17    Post_subject:  

Added swappiness; version 3.0
Back to top
View user's profile Send_private_message 
jpeps

Joined: 31 May 2008
Posts: 3220

PostPosted: Mon 01 Aug 2011, 05:07    Post_subject:  

Version 3.5: Added option to save settings (for reboot). Rewrote code to refresh labels to immediately reflect changes. More friendly windows setup (close child windows, etc.)
Back to top
View user's profile Send_private_message 
jpeps

Joined: 31 May 2008
Posts: 3220

PostPosted: Tue 20 Sep 2011, 18:47    Post_subject:  

Update: Uses gtimer process widget if installed. (gtimer requires =>gtkdialog 0.7.21
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 2 of 4 Posts_count   Goto page: Previous 1, 2, 3, 4 Next
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » System
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0944s ][ Queries: 13 (0.0141s) ][ GZIP on ]