Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Gentoo User (http://www.linux-archive.org/gentoo-user/)
-   -   aligning SSD partitions (http://www.linux-archive.org/gentoo-user/700346-aligning-ssd-partitions.html)

Philip Webb 09-04-2012 07:20 AM

aligning SSD partitions
 
I plan to partition + format the SSD in my new machine very soon.
The Arch wiki has an article on the subject, which says
that recent versions of Fdisk will safely align SSD partitions.

Is this correct ?

My partition scheme is

1 boot 0,6 0,06 /boot
2 root 30 3,55 / including opt usr var
3 swap 4 -- swap
5 home 30 3,3 /home
6 portage 15 3,43 /usr/portage (distfiles 2,3)
7 z 41 1,5 /z
total 121 19,45

The 1st column of numbers is the intended size in GB,
the 2nd column is the actual usage on my existing machine.
'z' is a big empty hangar-space where I manage ISOs etc ;
I use /z/tmp/ for Portage's temporary disk space.
Other items, eg /usr/local/ /usr/src/ wb on the HDD.

I plan to put /tmp/ on a ram disk.

Does anyone have comments or suggestions ?

BTW there seems to be a bug in System Rescue 2.6 :
it stalls when confronted with an unformatted partition or with swap
& can't find its own data file to install itself.
I got round this by installing Mageia on the HDD
& using its utility to partition the SSD without a defined swap.

--
========================,,======================== ====================
SUPPORT ___________//___, Philip Webb
ELECTRIC /] [] [] [] [] []| Cities Centre, University of Toronto
TRANSIT `-O----------O---' purslowatchassdotutorontodotca

Neil Bothwick 09-04-2012 07:47 AM

aligning SSD partitions
 
On Tue, 4 Sep 2012 03:20:03 -0400, Philip Webb wrote:

> I plan to partition + format the SSD in my new machine very soon.
> The Arch wiki has an article on the subject, which says
> that recent versions of Fdisk will safely align SSD partitions.
>
> Is this correct ?

Yes, but all of this was covered in some detail a few days ago.

> My partition scheme is
>
> 1 boot 0,6 0,06 /boot
> 2 root 30 3,55 / including opt usr var
> 3 swap 4 -- swap
> 5 home 30 3,3 /home
> 6 portage 15 3,43 /usr/portage (distfiles 2,3)
> 7 z 41 1,5 /z
> total 121 19,45

If it's a new machine, use a GPT rather than DOS partition table.

I prefer to use a small ext2 filesystem for PORTDIR for speed and set
DISTDIR somewhere else (a directory in /z would make sense on your system
as the contents of DISTDIR are fairly temporary)

> I use /z/tmp/ for Portage's temporary disk space.
> Other items, eg /usr/local/ /usr/src/ wb on the HDD.
>
> I plan to put /tmp/ on a ram disk.

If you have enough RAM, use tmpfs for /tmp and set PORTAGE_TMPDIR=/tmp.


--
Neil Bothwick

And then Adam said, "What's a headache?

Volker Armin Hemmann 09-04-2012 08:31 PM

aligning SSD partitions
 
Am Dienstag, 4. September 2012, 08:47:12 schrieb Neil Bothwick:
> On Tue, 4 Sep 2012 03:20:03 -0400, Philip Webb wrote:
> > I plan to partition + format the SSD in my new machine very soon.
> > The Arch wiki has an article on the subject, which says
> > that recent versions of Fdisk will safely align SSD partitions.
> >
> > Is this correct ?
>
> Yes, but all of this was covered in some detail a few days ago.
>
> > My partition scheme is
> >
> > 1 boot 0,6 0,06 /boot
> > 2 root 30 3,55 / including opt usr var
> > 3 swap 4 -- swap
> > 5 home 30 3,3 /home
> > 6 portage 15 3,43 /usr/portage (distfiles 2,3)
> > 7 z 41 1,5 /z
> >
> > total 121 19,45
>
> If it's a new machine, use a GPT rather than DOS partition table.
>
> I prefer to use a small ext2 filesystem for PORTDIR for speed and set
> DISTDIR somewhere else (a directory in /z would make sense on your system
> as the contents of DISTDIR are fairly temporary)
>
> > I use /z/tmp/ for Portage's temporary disk space.
> > Other items, eg /usr/local/ /usr/src/ wb on the HDD.
> >
> > I plan to put /tmp/ on a ram disk.
>
> If you have enough RAM, use tmpfs for /tmp and set PORTAGE_TMPDIR=/tmp.

hell no!

don't do that!

tmpfs for /tmp is fine
and
tmpfs for PORTAGE_TMPDIR is fine too. Like /var/tmp/portage.

But don't put PORTAGE_TMPDIR into /tmp. Not good. Bad idea. Really.

IF PORTAGE_TMPDIR fills up - no biggy, emerge dies, that's it. But /tmp filled
up? Suddenly you will have lots of strange problems... don't do it. Spare
yourself some headaches.

--
#163933

Neil Bothwick 09-04-2012 08:58 PM

aligning SSD partitions
 
On Tue, 04 Sep 2012 22:31:23 +0200, Volker Armin Hemmann wrote:

> IF PORTAGE_TMPDIR fills up - no biggy, emerge dies, that's it. But /tmp
> filled up? Suddenly you will have lots of strange problems... don't do
> it. Spare yourself some headaches.

Good point.


--
Neil Bothwick

Q: What's the proper plural of a 'Net-connected Windows machine?
A: A Botnet

Neil Bothwick 09-04-2012 09:00 PM

aligning SSD partitions
 
On Tue, 04 Sep 2012 22:31:23 +0200, Volker Armin Hemmann wrote:

> IF PORTAGE_TMPDIR fills up - no biggy, emerge dies, that's it. But /tmp
> filled up? Suddenly you will have lots of strange problems... don't do
> it. Spare yourself some headaches.

Good point, maybe I should have mentioned I have a 13GB /tmp.


--
Neil Bothwick

When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl.

Peter Humphrey 09-04-2012 09:52 PM

aligning SSD partitions
 
On Tuesday 04 September 2012 22:00:48 Neil Bothwick wrote:
> On Tue, 04 Sep 2012 22:31:23 +0200, Volker Armin Hemmann wrote:
> > IF PORTAGE_TMPDIR fills up - no biggy, emerge dies, that's it. But
> > /tmp filled up? Suddenly you will have lots of strange problems...
> > don't do it. Spare yourself some headaches.
>
> Good point, maybe I should have mentioned I have a 13GB /tmp.

Interesting. Also having 16GB RAM I've limited /tmp to 10GB. I wonder
whether 13GB would offer any advantage. Unlikely, as the only time it
gets used in earnest is when compiling Firefox, OO and the like. Maybe I
should just remove the restriction and let the kernel optimise its own
use of swap and tmpfs.

This box spends well over 90% of its cycles on BOINC projects, which
crunch large numbers of numbers but don't take up a lot of space (by
modern standards).

--
Rgds
Peter

Philip Webb 09-05-2012 12:42 AM

aligning SSD partitions
 
120904 Peter Humphrey wrote:
> On Tuesday 04 September 2012 22:00:48 Neil Bothwick wrote:
>> On Tue, 04 Sep 2012 22:31:23 +0200, Volker Armin Hemmann wrote:
>>> If PORTAGE_TMPDIR fills up no biggy, emerge dies, that's it.
>>> But /tmp filled up? Suddenly you will have lots of strange problems.
>>> Don't do it. Spare yourself some headaches.
>> Good point, maybe I should have mentioned I have a 13GB /tmp.

At the moment, after a few hours catching up with the news with FF,
my memory usage is :

total used free shared buffers cached
Mem: 3960 915 3044 0 63 408
-/+ buffers/cache: 443 3516
Swap: 3820 0 3820

Even compiling LO, it doesn't spill into swap anymore.
I assume having PORTAGE_TMPDIR on SSD wb noticeably faster than on HDD,
but how much faster still would it be to have it in memory ?
Memory is cheap & I could buy another 4 GB , it there were a reason.

> Also having 16GB RAM I've limited /tmp to 10GB.
> I wonder whether 13GB would offer any advantage.
> Unlikely, as the only time it gets used in earnest
> is when compiling Firefox, OO and the like.
> Maybe I should just remove the restriction
> and let the kernel optimise its own use of swap and tmpfs.
> This box spends well over 90% of its cycles on BOINC projects,
> which crunch large numbers of numbers but don't take up a lot of space.

What is the best line for /etc/fstab ? The only example I have is :

'tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0'

This doesn't seem to limit the size in any way.

--
========================,,======================== ====================
SUPPORT ___________//___, Philip Webb
ELECTRIC /] [] [] [] [] []| Cities Centre, University of Toronto
TRANSIT `-O----------O---' purslowatchassdotutorontodotca

Neil Bothwick 09-05-2012 08:23 AM

aligning SSD partitions
 
On Tue, 4 Sep 2012 20:42:56 -0400, Philip Webb wrote:

> What is the best line for /etc/fstab ? The only example I have is :
>
> 'tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0'
>
> This doesn't seem to limit the size in any way.

man mount explains it all, but the option you want is size, which
defaults to 50%. I use 80% which is what gives the somewhat odd size of
13GB. This is based on physical RAM, but tmpfs will use swap if there is
not enough memory.


--
Neil Bothwick

Angular Momentum Makes The World Go 'Round

Philip Webb 09-05-2012 09:02 AM

aligning SSD partitions
 
120905 Neil Bothwick wrote:
> On Tue, 4 Sep 2012 20:42:56 -0400, Philip Webb wrote:
>> What is the best line for /etc/fstab ? The only example I have is :
>> 'tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0'
>> This doesn't seem to limit the size in any way.
> 'man mount' explains it all ...

Well, it outlines it (smile).

> ... but the option you want is size, which defaults to 50 % .

That looks ok : I assume that's the maximum,
ie it doesn't take up that much memory unless it's needed.

> I use 80 % , which is what gives the somewhat odd size of 13 GB .
> tmpfs will use swap if there is not enough memory.

Thanks for the advice + others' comments.

BTW the problem of System Rescue stalling while trying to install itself
is avoided by adding the boot option 'skipmount=/dev/sda3' (or as needed).

--
========================,,======================== ====================
SUPPORT ___________//___, Philip Webb
ELECTRIC /] [] [] [] [] []| Cities Centre, University of Toronto
TRANSIT `-O----------O---' purslowatchassdotutorontodotca

Peter Humphrey 09-05-2012 09:23 AM

aligning SSD partitions
 
On Wednesday 05 September 2012 10:02:49 Philip Webb wrote:
> 120905 Neil Bothwick wrote:
> > On Tue, 4 Sep 2012 20:42:56 -0400, Philip Webb wrote:
> >> What is the best line for /etc/fstab ? The only example I have is
:
> >> 'tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0'
> >>
> >> This doesn't seem to limit the size in any way.
> >
> > 'man mount' explains it all ...
>
> Well, it outlines it (smile).
>
> > ... but the option you want is size, which defaults to 50 % .
>
> That looks ok : I assume that's the maximum,
> ie it doesn't take up that much memory unless it's needed.

The kernel only uses as much tmpfs as it needs at any given time. If it
needs more than has been specified, it starts rolling less active parts
out to swap. So if you don't have a lot of memory, you can still specify
more tmpfs than you have RAM and everything will just work.

The only reason I specify a large tmpfs is to be able to compile Libre
Office. At other times it just isn't used.

--
Rgds
Peter


All times are GMT. The time now is 11:48 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.