How can I set up a swap file, since I was not allowed to do it?

New to Puppy and have questions? Start here

Moderator: Forum moderators

Post Reply
Governor
Posts: 482
Joined: Sat Nov 12, 2022 7:11 pm
Has thanked: 113 times
Been thanked: 12 times

How can I set up a swap file, since I was not allowed to do it?

Post by Governor »

It finally happened. My laptop was up and running for over 40 days, and it crashed in the night. It was running fossapup64_9.5 in RAM only mode. I read that the OS can crash if there is no swap file and the memory gets full, and I think that is what happened.

Why can't I create a swap file?

Thanks!

Last edited by bigpup on Sat May 11, 2024 12:24 pm, edited 1 time in total.
Reason: edited out everything that was not about making a swap file.

Distro: fossapup64 9.5
Window Manager: JWM v2.4.0
Desktop Start: xwin jwm
Firefox portable: 115.5.0esr (64-bit)

User avatar
bigpup
Moderator
Posts: 6340
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 747 times
Been thanked: 1310 times

Re: How can I set up a swap file, since I was not allowed to do it?

Post by bigpup »

It is going to be impossible to give you info on multiple issues in a single topic.

It will quickly turn into a big mess of posts, that will be hard to follow and to understand, what worked or did not work.

So make a topic only talking about one specific issue.
You can make as many topics as you want to.

Always give the specific Puppy version being used.

The subject of this topic is how to setup a swap file.

I am going to edit your first post and only have that issue in it.

Forum Global Moderator
The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

User avatar
bigpup
Moderator
Posts: 6340
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 747 times
Been thanked: 1310 times

Re: How can I set up a swap file, since I was not allowed to do it?

Post by bigpup »

In terminal:

Code: Select all

pupswap

is program to make swap file.
Puppy looks for a specific name for it, so use this program.

Have you tried doing this?

You can put it anyplace.
However, very important that you defragment hard drive before making a swap file on a (Windows) Fat or NTFS formatted partition.
You could end up with a fragmented swap file which would not work very well.

Will have to do a complete reboot, so the swap file is found and now used.

Note:
If the location you choose to put the swap file is formatted fat32.
It is limited to no bigger than a max size of 4GB. (max file size in fat32 format)

Forum Global Moderator
The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

User avatar
bigpup
Moderator
Posts: 6340
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 747 times
Been thanked: 1310 times

Re: How can I set up a swap file, since I was not allowed to do it?

Post by bigpup »

My laptop was up and running for over 40 days,

Most likely there is some program you have running, that has a memory leak, and even a swap file is not going to stop this.
Even if you shutdown running a web browser.
It could still be set to keep running something in the background.

If you are not using a save file or folder, and only running in RAM mode.
Everything Puppy does has to stay in RAM and use it up.

Forum Global Moderator
The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

Governor
Posts: 482
Joined: Sat Nov 12, 2022 7:11 pm
Has thanked: 113 times
Been thanked: 12 times

Re: How can I set up a swap file, since I was not allowed to do it?

Post by Governor »

bigpup wrote: Sat May 11, 2024 12:22 pm

It is going to be impossible to give you info on multiple issues in a single topic.

It will quickly turn into a big mess of posts, that will be hard to follow and to understand, what worked of did not work.

So make a topic only talking about one specific issue.
You can make as many topics as you want to.

Always give the specific Puppy version being used.

The subject of this topic is how to setup a swap file.

I am going to edit your first post and only have that issue in it.

Not cool. Now I will have to try and remember all the important points because I did not think I had to keep a separate record of my questions. :cry:
I have such limited time as it is.

Distro: fossapup64 9.5
Window Manager: JWM v2.4.0
Desktop Start: xwin jwm
Firefox portable: 115.5.0esr (64-bit)

Governor
Posts: 482
Joined: Sat Nov 12, 2022 7:11 pm
Has thanked: 113 times
Been thanked: 12 times

Re: How can I set up a swap file, since I was not allowed to do it?

Post by Governor »

bigpup wrote: Sat May 11, 2024 12:22 pm

Always give the specific Puppy version being used.

People can read my signature which includes my OS specifics, right?

Distro: fossapup64 9.5
Window Manager: JWM v2.4.0
Desktop Start: xwin jwm
Firefox portable: 115.5.0esr (64-bit)

Governor
Posts: 482
Joined: Sat Nov 12, 2022 7:11 pm
Has thanked: 113 times
Been thanked: 12 times

Re: How can I set up a swap file, since I was not allowed to do it?

Post by Governor »

bigpup wrote: Sat May 11, 2024 12:36 pm

In terminal:

Code: Select all

pupswap

is program to make swap file.
Puppy looks for a specific name for it, so use this program.

Have you tried doing this?

You can put it anyplace.
However, very important that you defragment hard drive before making a swap file on a (Windows) Fat or NTFS formatted partition.
You could end up with a fragmented swap file which would not work very well.

Will have to do a complete reboot, so the swap file is found and now used.

Note:
If the location you choose to put the swap file is formatted fat32.
It is limited to no bigger than a max size of 4GB. (max file size in fat32 format)

Ok. I did it and I was asked if I wanted to load it, so I said yes, so apparently the swap file is loaded now.
I made it here at 8GB: /mnt/nvme0n1p4
Thanks.

Distro: fossapup64 9.5
Window Manager: JWM v2.4.0
Desktop Start: xwin jwm
Firefox portable: 115.5.0esr (64-bit)

Governor
Posts: 482
Joined: Sat Nov 12, 2022 7:11 pm
Has thanked: 113 times
Been thanked: 12 times

Re: How can I set up a swap file, since I was not allowed to do it?

Post by Governor »

bigpup wrote: Sat May 11, 2024 12:44 pm

My laptop was up and running for over 40 days,

Most likely there is some program you have running, that has a memory leak, and even a swap file is not going to stop this.
Even if you shutdown running a web browser.
It could still be set to keep running something in the background.

If you are not using a save file or folder, and only running in RAM mode.
Everything Puppy does has to stay in RAM and use it up.

I thought programs were supposed to vacate themselves from memory when they shut down?

Distro: fossapup64 9.5
Window Manager: JWM v2.4.0
Desktop Start: xwin jwm
Firefox portable: 115.5.0esr (64-bit)

Governor
Posts: 482
Joined: Sat Nov 12, 2022 7:11 pm
Has thanked: 113 times
Been thanked: 12 times

Re: How can I set up a swap file, since I was not allowed to do it?

Post by Governor »

bigpup wrote: Sat May 11, 2024 12:44 pm

My laptop was up and running for over 40 days,

Most likely there is some program you have running, that has a memory leak, and even a swap file is not going to stop this.
Even if you shutdown running a web browser.
It could still be set to keep running something in the background.

Are there programs available to clean memory and vacate stuff that is not in use?

Distro: fossapup64 9.5
Window Manager: JWM v2.4.0
Desktop Start: xwin jwm
Firefox portable: 115.5.0esr (64-bit)

Governor
Posts: 482
Joined: Sat Nov 12, 2022 7:11 pm
Has thanked: 113 times
Been thanked: 12 times

Re: How can I set up a swap file, since I was not allowed to do it?

Post by Governor »

Governor wrote: Sat May 11, 2024 6:28 pm
bigpup wrote: Sat May 11, 2024 12:36 pm

In terminal:

Code: Select all

pupswap

is program to make swap file.
Puppy looks for a specific name for it, so use this program.

Have you tried doing this?

You can put it anyplace.
However, very important that you defragment hard drive before making a swap file on a (Windows) Fat or NTFS formatted partition.
You could end up with a fragmented swap file which would not work very well.

Will have to do a complete reboot, so the swap file is found and now used.

Note:
If the location you choose to put the swap file is formatted fat32.
It is limited to no bigger than a max size of 4GB. (max file size in fat32 format)

Ok. I did it and I was asked if I wanted to load it, so I said yes, so apparently the swap file is loaded now without rebooting (?).
I made it here at 8GB: /mnt/nvme0n1p4
Thanks.

Distro: fossapup64 9.5
Window Manager: JWM v2.4.0
Desktop Start: xwin jwm
Firefox portable: 115.5.0esr (64-bit)

Trapster
Posts: 148
Joined: Sat Aug 01, 2020 7:44 pm
Has thanked: 1 time
Been thanked: 40 times

Re: How can I set up a swap file, since I was not allowed to do it?

Post by Trapster »

Code: Select all

~$ free
               total        used        free      shared  buff/cache   available
Mem:         1009400      522556      200744       61028      286100      278240
Swap:        3082888      220024     2862864
~$ 

Code: Select all

free

in a console should confirm if it's being used.
You can use 'swapon /location-of-file/filename' to load swap files.

williwaw
Posts: 1629
Joined: Tue Jul 14, 2020 11:24 pm
Has thanked: 147 times
Been thanked: 295 times

Re: How can I set up a swap file, since I was not allowed to do it?

Post by williwaw »

Governor wrote: Sat May 11, 2024 9:15 am

My laptop was up and running for over 40 days,

years ago people used to post how long the machine had been booted as a testimony to the goodness of linux. :)
but others used to say it didnt really mean much.

From a hardware perspective tho, why keep your laptop running 24/7?
Laptops are designed for interimient use, desktops more for a continous duty cycle, and to make the power company happy.

User avatar
bigpup
Moderator
Posts: 6340
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 747 times
Been thanked: 1310 times

Re: How can I set up a swap file, since I was not allowed to do it?

Post by bigpup »

Governor wrote: Sat May 11, 2024 6:23 pm
bigpup wrote: Sat May 11, 2024 12:22 pm

Always give the specific Puppy version being used.

People can read my signature which includes my OS specifics, right?

Yes if that is the Puppy version you are using.

A simple: see signature, makes sure we understand what Puppy version.

But you would be surprised how many people make posts and the version of Puppy in their signature, is not what the post is about.

They try a different Puppy version and do not update the signature info.

Forum Global Moderator
The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

User avatar
bigpup
Moderator
Posts: 6340
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 747 times
Been thanked: 1310 times

Re: How can I set up a swap file, since I was not allowed to do it?

Post by bigpup »

I thought programs were supposed to vacate themselves from memory when they shut down?

Should do that!

Key word should! :roll:

You say you are running in RAM mode, so Puppy has to use a save ramdisk to store anything that changes.
The save ramdisk is only going to use more and more RAM.
Unless you do a reboot, which then deletes everything in the save ramdisk.

Just running programs, can produce data that the program stores, for it to use.

Forum Global Moderator
The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

Governor
Posts: 482
Joined: Sat Nov 12, 2022 7:11 pm
Has thanked: 113 times
Been thanked: 12 times

Re: How can I set up a swap file, since I was not allowed to do it?

Post by Governor »

williwaw wrote: Sat May 11, 2024 10:14 pm
Governor wrote: Sat May 11, 2024 9:15 am

My laptop was up and running for over 40 days,

years ago people used to post how long the machine had been booted as a testimony to the goodness of linux. :)
but others used to say it didnt really mean much.

From a hardware perspective tho, why keep your laptop running 24/7?
Laptops are designed for interimient use, desktops more for a continous duty cycle, and to make the power company happy.

Up and running over 40 days is a serious success for me in the world of Linux and fossapup, and that is why I mentioned it.

I have not been able to save my setup configuration since my first crash in the very beginning of using fossapup.

For a very long time, I was only able to boot from a CD. I was therefore running Puppy (laptop permanently on) in RAM-only mode for three reasons:
1) To avoid accesses to the CD that slow everything down.
2) To free up a USB slot for use with other peripherals.
3) So I could avoid re-configuring all of my settings on each boot.

Before my latest crash, I used using grub_config, and I am now able to boot from my internal drive! But... with caveats.
Unfortunately, I may have to go back to RAM-only mode for two reasons:
1) I do not have direct access to my download drive!!
2) I have serious doubts about copying any files to my download drive, because I fear they may disappear on next boot.
3) Every time I reboot, I must reconfigure all over again!!

I have questions about my newest boot configuration, which I will ask in a new topics. @bigpup ;)

Distro: fossapup64 9.5
Window Manager: JWM v2.4.0
Desktop Start: xwin jwm
Firefox portable: 115.5.0esr (64-bit)

Governor
Posts: 482
Joined: Sat Nov 12, 2022 7:11 pm
Has thanked: 113 times
Been thanked: 12 times

Re: How can I set up a swap file, since I was not allowed to do it?

Post by Governor »

Trapster wrote: Sat May 11, 2024 9:41 pm

Code: Select all

~$ free
               total        used        free      shared  buff/cache   available
Mem:         1009400      522556      200744       61028      286100      278240
Swap:        3082888      220024     2862864
~$ 

Code: Select all

free

in a console should confirm if it's being used.
You can use 'swapon /location-of-file/filename' to load swap files.

I had another crash, but this time it was my own fault. I inadvertently plugged my laptop into a non-live extension cord, and naturally when I woke up, the computer was dead.
So, I booted up and used a lot of time configuring (for about the 56th time).
I entered 'free' in the console; it shows swap at zero. So the swap file I created last time is not in use on this boot. :(
I used the swapon command as you suggested and now the 'free' command shows 8388604 both total and free. Since my settings and configuration are not being saved, I believe the swap file will not be engaged on the next reboot, since that is what happened last time.

Distro: fossapup64 9.5
Window Manager: JWM v2.4.0
Desktop Start: xwin jwm
Firefox portable: 115.5.0esr (64-bit)

Post Reply

Return to “Beginners Help”