geoffwea
Posts: 12
Joined: Thu Apr 23, 2015 7:40 am

Swap Disk or not?

Fri Apr 24, 2015 8:21 pm

just mucking around with partitions (noob style) and noticed that I don't have a swap file. Got a new 64GB SD card and wondering if I should create one? Seems quite a few forums on Linux reckon it's not a bad idea.

My Linux partition is 8GB, of which I intend to use 4-6, the other partition is Data.

Cheers, Geoff.
RPi Model 3
OSMC

User avatar
DougieLawson
Posts: 39304
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Swap Disk or not?

Fri Apr 24, 2015 8:24 pm

There is no value in having a swap partition on an SDCard, it's not fast enough and your system will crawl as soon as you start swapping.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

User avatar
kusti8
Posts: 3439
Joined: Sat Dec 21, 2013 5:29 pm
Location: USA

Re: Swap Disk or not?

Fri Apr 24, 2015 8:24 pm

I wouldn't make one and it doesn't really help. The SD card is so slow that its not really worth doing it. Others may say differently, but its never been an issue for me.
There are 10 types of people: those who understand binary and those who don't.

ghans
Posts: 7882
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Swap Disk or not?

Fri Apr 24, 2015 8:27 pm

Flash media might not the best place for swap space ,
since it wears out fast. Thats why the default swappiness
on the Pi is set so low , too.

Either use an extra spinning disk or a throwaway pendrive.
But swap is horrible for interactive use IMHO. I would only
consider it when the Pi is running server tasks where it
doesn't matter if seconds turn into minutes because the Pi
starts swapping.

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

Return to “Beginners”