Using a swapfile when not having a savefile
Using a swapfile when not having a savefile
Can someone confirm that using a swapfile if you don't have a savefile actually works? I work without a savefile, am able to activate a swapfile but I can't see that it is actually in operation (can't see any swapping taking place).
Re: Using a swapfile when not having a savefile
Hi nic007.nic007 wrote:Can someone confirm that using a swapfile if you don't have a savefile actually works. I work without a savefile, am able to activate a swapfile but I can't see that it is actually in operation (can't see any swapping taking place).
A swap file and a pupsave are two entirely different and unrelated
things. Why do you ask?
The swap file is related to the Linux system and the pupsave to Puppy.
Puppy is able to create a 250 Mb swap file automatically if during the
boot sequence it detects that the PC does not have enough RAM for the
Puppy to operate entirely from RAM -- before it starts looking for a
pupsave file. Nowadays, with PCs having more RAM ex-factory, this old
Puppy feature probably never comes into play.
The command to see if your swap is occupied even slightly is
Code: Select all
free
Code: Select all
htop
before the program listings.
Also, as you may already know, the swap file and swap partition are
relics of the past, when PCs had much less RAM than they have now.
Nowadays a swap file or partition of 500 Mb is more than enough,
whereas back in the day, 2.5 times the amount of RAM was
recommended as swap.
My swap partition never had more than 25 Mb in it, even when my PC
had only 1.5 Gb of RAM. 99 % of the time my swap space has 0 bytes
in it -- the way it should be!
Suspect swap space is being used when your computer's operations
become sluggish and slower than usual, "disk memory" as it is also
called, offering much slower access than RAM access.
IHTH
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
I'm asking because the swapfile does not seem to be accessed when one is working without a savefile even when it is activated with swapon. I remember many years ago when I still had a savefile and a swapfile that I could see some activity with regards to the swapfile even if swapping was not necessarily needed (one could still see some swapping taking place even it was a few kb's). However, I run without a savefile and activating a swapfile does not make the swapfile operational (well not as far as I notice). I have 2GB of RAM but nevertheless, there should be some indication that some swapping is being done (but free reports zero swapping). I'm aware that if you do have a savefile, any swapfile will be activated and operational at bootup automatically as puppy searches for swapfiles at bootup (that is when you have a savefile but not otherwise ).
I would like to hear from someone who has very little RAM, requires a working swapfile (not swap partition in this test) and does NOT have a savefile. It's possible that I have enough RAM so no swapping is being showed but I'm sceptical.
It seems to me that the swapfile only works when the working partition is /mnt/home (thus operating puppy with a savefile)?
I would like to hear from someone who has very little RAM, requires a working swapfile (not swap partition in this test) and does NOT have a savefile. It's possible that I have enough RAM so no swapping is being showed but I'm sceptical.
It seems to me that the swapfile only works when the working partition is /mnt/home (thus operating puppy with a savefile)?
Last edited by nic007 on Wed 04 Apr 2018, 08:00, edited 1 time in total.
Re: Using a swapfile when not hav
Yes, that's what I thought too.musher0 wrote:Also, as you may already know, the swap file and swap partition are
relics of the past, when PCs had much less RAM than they have now.
Nowadays a swap file or partition of 500 Mb is more than enough,
whereas back in the day, 2.5 times the amount of RAM was
recommended as swap.
When I assembled my PC, I made a 12Gb swap partition (twice of my 6Gb RAM, I was going to install Ubuntu, but then found puppy).
I don't see any use of it, was thinking of formatting it.
But then I saw Hibernation in Fatdog. Which uses swap file/partition.
I will test it before formatting.
"Swappiness" (search for it) can modify the edge when a swap file is activated.
10 is recommended for full use of RAM without using much the swap file. You can test with 50 or 70 to activate the swap file very soon. But only for test. When the swap file is used then you'll see a slowness of PC swapping on the hd.
Code: Select all
echo 10 > /proc/sys/vm/swappiness
Htop can tell if swap is being used.
- Attachments
-
- 2018-04-04.png
- (54.5 KiB) Downloaded 245 times
Remember: [b][i]"pecunia pecuniam parere non potest"[/i][/b]
yes, and so does the free command, it stays at 0 swap used (no matter how long the session and extensive the usage) but ONLY happens when I do not run a savefile. When I have a savefile, the swapfile is activated "correctly" and I can actually see activity with the swapfile from the start. So, why is that?Galbi wrote:Htop can tell if swap is being used.
You have a PC with very little RAM?
Sorry for not guessing this correctly earlier. For such a question, providing
HW specs at the start would have been helpful in guiding the answer.
Try adding nocopy in your "pfix=" boot parameters. Then a lot of the
puppy_xxx.sfs and pupsave contents will stay on disk, only a minimum of
executables will be loaded in RAM, and your swap space may not even
need to be activated.
Regards.
Sorry for not guessing this correctly earlier. For such a question, providing
HW specs at the start would have been helpful in guiding the answer.
Try adding nocopy in your "pfix=" boot parameters. Then a lot of the
puppy_xxx.sfs and pupsave contents will stay on disk, only a minimum of
executables will be loaded in RAM, and your swap space may not even
need to be activated.
Regards.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
To answer this:nic007 wrote:yes, and so does the free command, it stays at 0 swap used (no matter how long the session and extensive the usage) but ONLY happens when I do not run a savefile. When I have a savefile, the swapfile is activated "correctly" and I can actually see activity with the swapfile from the start. So, why is that?Galbi wrote:Htop can tell if swap is being used.
What version of Puppy?
How much RAM is in the computer and is being used at the time you see this?
Is the savefile for a live CD or frugal install on a hard drive or usb flash drive? This affects how the savefile loads.
Swappiness is a Linux kernel parameter. (0 to 100)
The default is 60.
If there is no setting made to change this, it would default to 60.
Swap would start at 40% RAM usage.
Older versions of Puppy may not use a different setting from default 60.
Example:
Xenialpup64 7.5 uses 10 setting.
Swap does not get used until 90% of RAM is used.
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
YaPI(any iso installer)
When I was a kid I wanted to be older.... This is not what I expected
YaPI(any iso installer)
Re: Using a swapfile when not having a savefile
I too work without savefile mostly.nic007 wrote:Can someone confirm that using a swapfile if you don't have a savefile actually works? I work without a savefile, am able to activate a swapfile but I can't see that it is actually in operation (can't see any swapping taking place).
But I have too much RAM (6gb) so never seen my swap being used.
My ram highest filled to about 3.5gb only.
But your thread did remind me to check out hibernation feature in Fatdog which uses swap space to store system state while shutdown.
It works like a charm, every program and it's window is as it is on resume boot. But I don't think I will need it, so will delete the swap if space is needed.
Anyway, I would suggest trying what watchdog suggested about "swappiness", but set it to 100 instead of 10, so that it would swap everything in ram. Just to check if the swapping business is working.
I did "cat /proc/sys/vm/swappiness" in my system and it returned 60 as answer. so swappiness is quite high by default.
Re: Using a swapfile when not having a savefile
i can confirm this. i use a swapfile without having a savefile and it gets used, when i browse big sites on the webnic007 wrote:Can someone confirm that using a swapfile if you don't have a savefile actually works? I work without a savefile, am able to activate a swapfile but I can't see that it is actually in operation (can't see any swapping taking place).
- Attachments
-
- Screenshot_2018-04-21_173011.jpg
- (17.34 KiB) Downloaded 124 times
I always run frugal without a save file and can confirm that a swap file/partition will be used if the system runs low on memory.
A handy trick is to make a swapfile on the fly when you realize your going to run out of space (load 50 tabs in firefox with graphics and wait for it ).
https://www.cyberciti.biz/faq/linux-add ... ile-howto/
A handy trick is to make a swapfile on the fly when you realize your going to run out of space (load 50 tabs in firefox with graphics and wait for it ).
https://www.cyberciti.biz/faq/linux-add ... ile-howto/