Question regarding SWAP & RAM

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
wpshooter
Level 6
Level 6
Posts: 1455
Joined: Sun May 22, 2011 8:06 am

Question regarding SWAP & RAM

Post by wpshooter »

Not exactly sure which category this question should be posted in.

I noticed recently that when attempting to play a very large MP3 file on my old computer
which had somewhat limited RAM (1gb) but I had created a fairly large swap partition
when I installed Mint, that the MP3 would not play to completion - played just would not
go all the way to the end of the song.

However, when I switched to a newer computer/desktop which had more RAM (8gb) the
MP3 would play to completion on that setup.

So my question is why would the large MP3 not play to completion on the system with
the small amount of RAM, shouldn't the SWAP partition have COMPENSATED for
the small amount of RAM by using the SWAP for playing the MP3 file if the RAM was
not sufficient for doing so ?

P.S. - I play the MP3s by previewing them, just putting the cursor/mouse pointer on them, if this
makes any difference.

Thanks.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Mint 21.3 Mate.

SERVICE > competition
Mute Ant

Re: Question regarding SWAP & RAM

Post by Mute Ant »

"...if this makes any difference..." Is that the MATE Caja file manager, the one with two undocumented functions...

o Stop-playing-a-music-preview-and-freeze-the-window.

o Stop-moving-files-and-freeze-the-window.

If it is, I suggest you put it in the 'Software to Avoid' section. Just switch off the Audio Preview and the problem goes away.
wpshooter
Level 6
Level 6
Posts: 1455
Joined: Sun May 22, 2011 8:06 am

Re: Question regarding SWAP & RAM

Post by wpshooter »

Mute Ant wrote: Thu Mar 15, 2018 11:45 am "...if this makes any difference..." Is that the MATE Caja file manager, the one with two undocumented functions...

o Stop-playing-a-music-preview-and-freeze-the-window.

o Stop-moving-files-and-freeze-the-window.

If it is, I suggest you put it in the 'Software to Avoid' section. Just switch off the Audio Preview and the problem goes away.
Why should I NOT use preview if it works on my newer machines which has more memory, my only question
is why it does not work on older machine (with low amount of RAM) but which has a goodly amount of SWAP ?

Yes, it it MATE.

Thanks.
Mint 21.3 Mate.

SERVICE > competition
User avatar
Spearmint2
Level 16
Level 16
Posts: 6900
Joined: Sat May 04, 2013 1:41 pm
Location: Maryland, USA

Re: Question regarding SWAP & RAM

Post by Spearmint2 »

check your swap.

Code: Select all

swapon -s
All things go better with Mint. Mint julep, mint jelly, mint gum, candy mints, pillow mints, peppermint, chocolate mints, spearmint,....
wpshooter
Level 6
Level 6
Posts: 1455
Joined: Sun May 22, 2011 8:06 am

Re: Question regarding SWAP & RAM

Post by wpshooter »

Spearmint2 wrote: Thu Mar 15, 2018 4:19 pm check your swap.

Code: Select all

swapon -s
What is that supposed to reveal to me ?

Thanks.
Mint 21.3 Mate.

SERVICE > competition
pbear
Level 16
Level 16
Posts: 6569
Joined: Wed Jun 21, 2017 12:25 pm
Location: San Francisco

Re: Question regarding SWAP & RAM

Post by pbear »

Surely someone who has been using Linux for almost seven years knows about man. Run man swapon in Terminal if you want to know what it does.
wpshooter
Level 6
Level 6
Posts: 1455
Joined: Sun May 22, 2011 8:06 am

Re: Question regarding SWAP & RAM

Post by wpshooter »

pbear wrote: Thu Mar 15, 2018 5:42 pm Surely someone who has been using Linux for almost seven years knows about man. Run man swapon in Terminal if you want to know what it does.
All that command does is give me some basic info including the size of the swap and by the way your command says that the better command is swapon --show.

If you think that I am interested in becoming a terminal command expert you are wrong. Back in the day when DOS was the rage, I could give you the syntax of most all DOS line commands forward and backwards, however, it is about time to retire these things since we are not still in the 1970s and 80s. Was using computers before most of the folks on this forum were even a twinkle in someone's eye.

But in any case, none of this answers my original question as to why the swap does not or even if it is supposed to compensate for the lack of RAM when attempting to play the large MP3 file via preview (which is one of the features that I like about Linux Mint), so I sure ain't going to turn it off. Not really a big thing since I now have enough RAM to do away with/cure the issue, but I am just one of those who likes to know why things work or do not work !!!

Thanks.
Mint 21.3 Mate.

SERVICE > competition
User avatar
Spearmint2
Level 16
Level 16
Posts: 6900
Joined: Sat May 04, 2013 1:41 pm
Location: Maryland, USA

Re: Question regarding SWAP & RAM

Post by Spearmint2 »

I just wanted to know if you had a working swap. That's all. Often people install a system, create a swap file, but it's never mounted. Swap runs from the hard drive, so it's not going to be as fast as RAM.

Playing a large MP3 file, may also depend on the program that you use to play it.

Have you tried more than one player? Do other smaller MP3 files play OK on that computer?
All things go better with Mint. Mint julep, mint jelly, mint gum, candy mints, pillow mints, peppermint, chocolate mints, spearmint,....
Mute Ant

Re: Question regarding SWAP & RAM

Post by Mute Ant »

"my original question ... why would the large MP3 not play to completion on the system with the small amount of RAM..."

??? It runs out of RAM ??? No. The whole desktop would be running at 5% normal speed. You really would have noticed that, it's horrible.

??? incompetent software ??? No. You have the same software on a different machine and it works.

??? The mouse is moving ??? You can watch for this using the unclutter command and watch the mouse cursor. The default operation is to hide an inactive cursor and put it back if the mouse moves.

"...using computers before most of the folks on this forum..." So have I, so has Windows, so?

If you don't say which Mint and how many bytes is 'large' you make people guess, or give up.
wpshooter
Level 6
Level 6
Posts: 1455
Joined: Sun May 22, 2011 8:06 am

Re: Question regarding SWAP & RAM

Post by wpshooter »

Spearmint2 wrote: Thu Mar 15, 2018 8:36 pm I just wanted to know if you had a working swap. That's all. Often people install a system, create a swap file, but it's never mounted. Swap runs from the hard drive, so it's not going to be as fast as RAM.

Playing a large MP3 file, may also depend on the program that you use to play it.

Have you tried more than one player? Do other smaller MP3 files play OK on that computer?
Yes, have tried multiple players and the problem was consistent on all players with that large/extended MP3 version.

All, smaller/non-extended MP3s play fine on that computer. I am just wondering if there is something about the
requirements of playing these MP3 files (i.e. speed requirements) that would preclude the swap from handling this
task since it is not same speed as RAM. That would sort of be indicated since as I said when I moved to a machine
with more RAM (faster than swap) the problem no longer happened.

P.S. - to answer the swap size question, more than 15gb, surely that is more than enough !!!

Thanks.
Mint 21.3 Mate.

SERVICE > competition
Locked

Return to “Installation & Boot”