Re: Question regarding swap partition when installing Linux Mint Debian.

2014-02-03 Thread Gilles Mocellin

Le 03/02/2014 12:50, Chen Wei a écrit :

On Mon, Feb 03, 2014 at 02:38:16AM -0800, Rick Thomas wrote:

For example, if you decide to put /tmp in a ramdisk, you may want to
allocate a swap partition that's much larger than your RAM as backup
in case somebody needs *lots* of space in /tmp.

+1 for the /tmp example.


My personal rule of thumb is, "Start with twice your RAM and adjust
from there depending on experience."

How about use a swapfile? Given the large RAM today, allocate dozens
gigabytes of swap partition that rarely used seems a waste. Besides, it
is easier to change the size of a swapfile than size of a swap
partition.


You can automate the management of a swap file with swapspace :

Description : dynamic swap space manager
 Small, stable system add-on that continuously and automatically adapts 
available virtual memory space to your actual memory needs. Claims disk 
space for use as
 swap space when needed; frees it up for use by the filesystem when not 
needed.

Site : http://pqxx.org/development/swapspace

With 8 or even now 16GB of RAM, I reallly don't need swap. Most of the time.


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Archive: http://lists.debian.org/52ef9443.4040...@nuagelibre.org



Re: Question regarding swap partition when installing Linux Mint Debian.

2014-02-03 Thread Scott Ferguson
On 03/02/14 23:48, Chen Wei wrote:
> On Mon, Feb 03, 2014 at 11:03:19PM +1100, Scott Ferguson wrote:
>> As long as the swap file is not sparse.
>>
> 
> Tried *fallocate* to create swapfile then swapon report error, something
> like:
> 
> swapon: /path2swapfile : swapon failed: Invalid argument
> fallocate -l 512M /swapfile
> Only figured it out several cups of tea and google-fu later that it was
> indeed a sparse problem. Strangely enough the partition is newly created,
> formated as xfs, and has over 300G free space on it. 


> dd is the solution.


fallocate is faster.

e.g.:-
xfs_fsr followed by
fallocate -l 1G /pathwswapfile

(don't take that as gospel, I rarely use xfs).


don't forget to chmod 600


Kind regards



-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/52ef93a5.7030...@gmail.com



Re: Question regarding swap partition when installing Linux Mint Debian.

2014-02-03 Thread Chen Wei
On Mon, Feb 03, 2014 at 11:03:19PM +1100, Scott Ferguson wrote:
> As long as the swap file is not sparse.
> 

Tried *fallocate* to create swapfile then swapon report error, something
like:

swapon: /path2swapfile : swapon failed: Invalid argument

Only figured it out several cups of tea and google-fu later that it was
indeed a sparse problem. Strangely enough the partition is newly created,
formated as xfs, and has over 300G free space on it. dd is the solution.



-- 
Chen Wei


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20140203124839.GP25217@localhost



Re: Question regarding swap partition when installing Linux Mint Debian.

2014-02-03 Thread Nuno Magalhães
On Mon, Feb 3, 2014 at 11:50 AM, Chen Wei  wrote:
> Besides, it
> is easier to change the size of a swapfile than size of a swap
> partition.

How about with LVM?

-- 
"On the internet, nobody knows you're a dog."


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/CADqA9uZxdpa_=kp_CYKdfgbp1EzJ+VUV_i1npo0=Rs0O=+k...@mail.gmail.com



Re: Question regarding swap partition when installing Linux Mint Debian.

2014-02-03 Thread Scott Ferguson
On 03/02/14 22:50, Chen Wei wrote:
> On Mon, Feb 03, 2014 at 02:38:16AM -0800, Rick Thomas wrote:
>> For example, if you decide to put /tmp in a ramdisk, you may want to
>> allocate a swap partition that's much larger than your RAM as backup
>> in case somebody needs *lots* of space in /tmp.
> 
> +1 for the /tmp example.
> 
>> My personal rule of thumb is, "Start with twice your RAM and adjust
>> from there depending on experience."
> 
> How about use a swapfile? 

Good idea. As long as the swap file is not sparse.




Kind regards


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/52ef8587.9080...@gmail.com



Re: Question regarding swap partition when installing Linux Mint Debian.

2014-02-03 Thread Chen Wei
On Mon, Feb 03, 2014 at 02:38:16AM -0800, Rick Thomas wrote:
> For example, if you decide to put /tmp in a ramdisk, you may want to
> allocate a swap partition that's much larger than your RAM as backup
> in case somebody needs *lots* of space in /tmp.

+1 for the /tmp example.

> My personal rule of thumb is, "Start with twice your RAM and adjust
> from there depending on experience."

How about use a swapfile? Given the large RAM today, allocate dozens
gigabytes of swap partition that rarely used seems a waste. Besides, it
is easier to change the size of a swapfile than size of a swap
partition.





-- 
Chen Wei


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20140203115044.GN25217@localhost



Re: Question regarding swap partition when installing Linux Mint Debian.

2014-02-03 Thread Nuno Magalhães
On Mon, Feb 3, 2014 at 10:38 AM, Rick Thomas  wrote:
> There is logic for having at least as much swap as you have RAM (in other 
> words, a multiplier of 1.0) because, when the system panics, it may want to 
> make a copy of RAM to the swap space for later analysis.

Or if the system is a laptop and you want to hibernate.


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/CADqA9uZQT+rSTedG=ea3e5covpjfg-yqbwwi+5+j5dngq-e...@mail.gmail.com



Re: Question regarding swap partition when installing Linux Mint Debian.

2014-02-03 Thread Rick Thomas

On Feb 1, 2014, at 12:42 PM, Lauge Andersen  wrote:

> Hi. 
> I intend to install Linux Mint Debian and give up on the Ubuntu based 
> distros. However when I go through the installer, I get to the point where 
> I'm supposed to choose the size of the different partitions, but can anyone 
> tell me how big should the swap partition be?
> 
> I've read online that the size of the swap partition should be determined by 
> the memory.
> I've therefore copypasted from my terminal below:
> 
> free -m
>  total   used   free sharedbuffers cached
> Mem:  7871   1546   6325  0 38491
> -/+ buffers/cache:   1015   6855
> Swap:12011  0  12011
> 
> I'm currently using Lubuntu, it got an applicantion in the menu called 
> "discs" and it shows that I currently got a swap partition on 8,5 GB. Will it 
> therefore be correct just to choose to make the swap partition in Linux Mint 
> Debian 8,5 GB as well? 
> Can I assume that the swap partition size the installer of an Ubuntu based 
> distro automatically chose is the best size for a partition for Debian based 
> distro as well? (I just chose the default installation when installing 
> Lubuntu as well as other Ubuntu based distros, and therefore didn't have to 
> chose the size of the partition manually)
> 
> I guess this probably is a really stupid question, but since I'm fairly new 
> to Linux, and some of the info I found online regarding this question was 
> fairly confusing, I hope you can bear with me. And in case you notice quite 
> some misspellings, I might as well add that English is not my native tongue :)
> 
> Any way thanks a lot for the help in advance,
> Cheers.

There are lots of theories about how big to make your swap partition (or 
partitions -- you can have more than one)  Some people say two times the size 
of RAM but most don't give any reason why that particular multiplier.  There is 
logic for having at least as much swap as you have RAM (in other words, a 
multiplier of 1.0) because, when the system panics, it may want to make a copy 
of RAM to the swap space for later analysis.  This logic makes most sense if 
you're in a development shop where analyzing core dumps is a common practice; 
most folks aren't in that situation.

For modern machines, it's possible (and even common) to have enough RAM that 
you never need to swap at all, so a multiplier of zero is reasonable.

But there are uses for swap space that have nothing to do with swapping 
programs in and out of memory:  For example, if you decide to put /tmp in a 
ramdisk, you may want to allocate a swap partition that's much larger than your 
RAM as backup in case somebody needs *lots* of space in /tmp.  This will allow 
the system to use RAM for /tmp when the demand is light, and back-up to swap 
disk when demand is heavy.

So the definitive answer is, "It depends".  Your expected usage will determine 
how much swap space you need.

My personal rule of thumb is, "Start with twice your RAM and adjust from there 
depending on experience."

Does that help?

Rick

--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/049fb195-672e-408d-9621-23067ed91...@pobox.com



Re: Question regarding swap partition when installing Linux Mint Debian.

2014-02-01 Thread Doug

On 02/01/2014 03:42 PM, Lauge Andersen wrote:

Hi.
I intend to install Linux Mint Debian and give up on the Ubuntu based 
distros. However when I go through the installer, I get to the point 
where I'm supposed to choose the size of the different partitions, but 
can anyone tell me how big should the swap partition be?


I've read online that the size of the swap partition should be 
determined by the memory.

I've therefore copypasted from my terminal below:

free -m
 total   used   free shared buffers cached
Mem:  7871   1546   6325  0 38491
-/+ buffers/cache:   1015   6855
Swap:12011  0  12011

I'm currently using Lubuntu, it got an applicantion in the menu called 
"discs" and it shows that I currently got a swap partition on 8,5 GB. 
Will it therefore be correct just to choose to make the swap partition 
in Linux Mint Debian 8,5 GB as well?
Can I assume that the swap partition size the installer of an Ubuntu 
based distro automatically chose is the best size for a partition for 
Debian based distro as well? (I just chose the default installation 
when installing Lubuntu as well as other Ubuntu based distros, and 
therefore didn't have to chose the size of the partition manually)


I guess this probably is a really stupid question, but since I'm 
fairly new to Linux, and some of the info I found online regarding 
this question was fairly confusing, I hope you can bear with me. And 
in case you notice quite some misspellings, I might as well add that 
English is not my native tongue :)


Any way thanks a lot for the help in advance,
Cheers.
If you already have that swap partition, just leave it there and your 
new distro will use it. You can have one swap for as many distros as you 
have on the machine!
(Since you only use it with one distro at a time, you don't need more 
than one.)
However, there seems to be some discrepancy in the measurements, unless 
you already have 2 swap partitions. Free says 12 GB, discs (with which 
I'm not familiar)
says 8.5 GB.  If you have two swap partitions, you can delete one and 
make it part of your usable disk space. I think you could safely delete 
the larger one.


Parenthetically, I sort of liked Mint, but I thought it was somewhat 
limited. You might try Korora.  But that's up to you, of course.


--doug


Question regarding swap partition when installing Linux Mint Debian.

2014-02-01 Thread Lauge Andersen
Hi. 

I intend to install Linux Mint Debian and give up on the Ubuntu based distros. 
However when I go through the installer, I get to the point where I'm supposed 
to choose the size of the different partitions, but can anyone tell me how big 
should the swap partition be?


I've read online that the size of the swap partition should be determined by 
the memory.

I've therefore copypasted from my terminal below:

free -m
 total   used   free shared    buffers cached
Mem:  7871   1546   6325  0 38    491
-/+ buffers/cache:   1015   6855
Swap:    12011  0  12011


I'm currently using Lubuntu, it got an applicantion in the menu called "discs" 
and it shows that I currently got a swap partition on 8,5 GB. Will it therefore 
be correct just to choose to make the swap partition in Linux Mint Debian 8,5 
GB as well? 

Can I assume that the swap partition size the installer of an Ubuntu based 
distro automatically chose is the best size for a partition for Debian based 
distro as well? (I just chose the default installation when installing Lubuntu 
as well as other Ubuntu based distros, and therefore didn't have to chose the 
size of the partition manually)

I guess this probably is a really stupid question, but since I'm fairly new to 
Linux, and some of the info I found online regarding this question was fairly 
confusing, I hope you can bear with me. And in case you notice quite some 
misspellings, I might as well add that English is not my native tongue :)

Any way thanks a lot for the help in advance,
Cheers.