Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
SSD and new install
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
corbintech
n00b
n00b


Joined: 15 Nov 2014
Posts: 16

PostPosted: Sat Nov 15, 2014 8:30 pm    Post subject: SSD and new install Reply with quote

Hello,

I have a system76 Gazelle Professional and I am thinking about installing Gentoo.

I have an i7-4810 and a 60GB M-sata SSD I use for / and a 512GD SSD I use for swap and /home. I am thinking all this over here.

I know compiles cause many writes. I only have 8GB of ram and have a couple choices. Either wait and get more RAM, or stick a 1TB platter drive where the large SSD is now.

Should I put the platter drive in and do it? I could put compiling to RAM but some things will be to large in the 8GB, and using binaries at that point kind of defeats the purpose. I am okay using the platter drive as I only have mp3 files in home and such.

Suggestions?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43178
Location: 56N 3W

PostPosted: Sat Nov 15, 2014 8:41 pm    Post subject: Reply with quote

corbintech,

Welcome to Gentoo.

8G of RAM will by default give you a 4G /dev/shm. You can resize it to 6G if needed for some builds.
4G is enough for building almost everything in RAM. Libraoffice wants more than that and some of the bigger browsers, like firefox and chrome may struggle.
Anyway, the bigger packages all have -bin versions too so no need to go to rotating rust or buy more memory.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
corbintech
n00b
n00b


Joined: 15 Nov 2014
Posts: 16

PostPosted: Sat Nov 15, 2014 10:54 pm    Post subject: Reply with quote

NeddySeagoon wrote:
corbintech,

Welcome to Gentoo.

8G of RAM will by default give you a 4G /dev/shm. You can resize it to 6G if needed for some builds.
4G is enough for building almost everything in RAM. Libraoffice wants more than that and some of the bigger browsers, like firefox and chrome may struggle.
Anyway, the bigger packages all have -bin versions too so no need to go to rotating rust or buy more memory.


Thanks for the reply.

A bit out of my element here, but, is there some sort of if statement that says something along the lines of:

If size=blah (during compile)
then mv /tempfs to /some partition

This way I can keep my system pure? I use Firefox as my browser, force it to compile on my SSD?

Out of my element, just wondering.

Thanks
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43178
Location: 56N 3W

PostPosted: Sat Nov 15, 2014 11:03 pm    Post subject: Reply with quote

corbintech,

The size of the build space is not known beforehand so you can't do quite what you want.

However, you can set the build environment on a per package basis, so you can automate builing on a hard driwe instead of in RAM for a few named packages.
Its been a long time since I needed per package environments so I don't have exactly how to hand.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
59729
Apprentice
Apprentice


Joined: 21 Jun 2004
Posts: 279

PostPosted: Sun Nov 16, 2014 12:37 am    Post subject: Reply with quote

this worked for me http://wiki.gentoo.org/wiki/Portage_TMPDIR_on_tmpfs , per package choice at bottom
Back to top
View user's profile Send private message
szatox
Veteran
Veteran


Joined: 27 Aug 2013
Posts: 1746

PostPosted: Sun Nov 16, 2014 12:26 pm    Post subject: Reply with quote

corbintech, with your setup you will likely want to always run compilations in RAM, so just add a line in /etc/fstab to mount a large chunk of your RAM as tmpfs

For example
# mount tmpfs -t tmpfs -o size=85% /tmp
# df -h
tmpfs 6.3G 0 6.3G 0% /tmp

Don't worry about runing out of RAM. That 6.3GB you can see here is an upper limit and not the amount of memory actually occupied. Impact of such a line on your everyday experience will be none, as it doesn't use much memory when there is no data stored inside.

In case a need arises, you can even make tmpfs bigger than your RAM and use SWAP file. With swappiness set to 0 this would only use disk when there is really no more space left in RAM allowing you to carry on under extremaly high load while still keeping data in RAM as long as possible
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43178
Location: 56N 3W

PostPosted: Sun Nov 16, 2014 1:06 pm    Post subject: Reply with quote

corbintech,

Beware parallel builds ... its possible to run out of build space if you end up building soy firefox and libreoffice together.
Individually, they both fit in your build space ...
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3684
Location: Hamburg

PostPosted: Sun Nov 16, 2014 6:21 pm    Post subject: Reply with quote

corbintech wrote:


A bit out of my element here, but, is there some sort of if statement that says something along the lines of:

If size=blah (during compile)
then mv /tempfs to /some partition

This way I can keep my system pure? I use Firefox as my browser, force it to compile on my SSD?

Out of my element, just wondering.

Thanks
I mount /var/tmp/portage onto tmpfs (4GB), look here how to handle exceptions from that:
Code:
# grep /var/tmp/portage /etc/fstab
tmpfs                   /var/tmp/portage        tmpfs   auto,noatime,size=4G

# tail -v /etc/portage/env/{tmpdir,splitdebug}
==> /etc/portage/env/tmpdir <==
PORTAGE_TMPDIR=/tmp


==> /etc/portage/env/splitdebug <==
CFLAGS="${CFLAGS} -g -ggdb"
CXXFLAGS="${CFLAGS}"
FEATURES="splitdebug compressdebug"

# grep fire /etc/portage/package.env/misc
www-client/firefox             splitdebug      tmpdir
Back to top
View user's profile Send private message
keet
Guru
Guru


Joined: 09 Sep 2008
Posts: 529

PostPosted: Sun Nov 16, 2014 6:44 pm    Post subject: Reply with quote

On my laptop that has an S.S.D., I normally mount /var/tmp as tmpfs and give it 2GB. When I update or install something big like Libreoffice, I use an external hard drive as swap and mount a 10GB /var/tmp/portage as tmpfs.
Back to top
View user's profile Send private message
corbintech
n00b
n00b


Joined: 15 Nov 2014
Posts: 16

PostPosted: Sun Nov 16, 2014 7:28 pm    Post subject: Reply with quote

Thanks for all the replies. Very useful information.

I am thinking about starting this today. Got the System Rescue CD ready to go.

I am thinking about an XFCE system. The great thing about this is the RAM footprint will be small. Win, win :).

Thanks again.

One more question about the i7. Do I set the jobs to -j5 (quad) or -j9 (hyper threading)?

Thanks.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43178
Location: 56N 3W

PostPosted: Sun Nov 16, 2014 8:03 pm    Post subject: Reply with quote

corbintech,

Use -j9
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3684
Location: Hamburg

PostPosted: Sun Nov 16, 2014 8:04 pm    Post subject: Reply with quote

corbintech wrote:

One more question about the i7. Do I set the jobs to -j5 (quad) or -j9 (hyper threading)?

Thanks.
-j8 should be fine IMO (-h9 do not gain performance too much IIRC), and with more RAM you could rather think about "--jobs 2 -j4" instead of "-j8"
Back to top
View user's profile Send private message
corbintech
n00b
n00b


Joined: 15 Nov 2014
Posts: 16

PostPosted: Mon Nov 17, 2014 2:08 am    Post subject: Reply with quote

Well, in my new Gentoo system :D.

Much more to get done. Manually setting up network on every boot (will get next). But sitting in XFCE right now in firefox typing.

Kernel was scary, I have not done one since around 2001 in Slackware :D. I guess I got it right. Took me an hour to comb through all the options.

I am amazed, I expected this to take at least tonight and it only took me around 3 and a half hours.

More work to do.

Here is my fstab:

Code:
/dev/sda2               /boot           ext4            defaults,noatime        0 2
/dev/sda3               /               ext4            discard,noatime         0 1
/dev/sdb2               /home           ext4            discard,noatime         0 1
/dev/sdb1               none            swap            sw              0 0
tmpfs                   /var/tmp/portage      tmpfs     auto,noatime,size=85%
/dev/cdrom              /mnt/cdrom      auto            noauto,ro       0 0


And my df:

Code:

/dev/sda3        55G  4.0G   49G   8% /
devtmpfs        3.9G     0  3.9G   0% /dev
tmpfs           791M  560K  790M   1% /run
shm             3.9G  4.0K  3.9G   1% /dev/shm
cgroup_root      10M     0   10M   0% /sys/fs/cgroup
/dev/sda2       120M   22M   90M  20% /boot
/dev/sdb2       462G  122M  439G   1% /home
tmpfs           6.6G     0  6.6G   0% /var/tmp/portage


I think I got it right?

Thanks for all the help. You guys rock :D.


Last edited by corbintech on Mon Nov 17, 2014 10:09 pm; edited 1 time in total
Back to top
View user's profile Send private message
vasettoo
Tux's lil' helper
Tux's lil' helper


Joined: 11 Nov 2012
Posts: 77

PostPosted: Mon Nov 17, 2014 9:52 am    Post subject: Reply with quote

Neatly done, but I would leave out "discard" option in fstab and use SSD fstrim script provided here: http://chmatse.github.io/SSDcronTRIM/.
My cron job is autoset to weekly shedule as I've left a lot of free space on my Samsung 840 EVO 250 GB with Windows 7 dual boot.
For your reference here: http://wiki.gentoo.org/wiki/SSD#Notes.
Back to top
View user's profile Send private message
vasettoo
Tux's lil' helper
Tux's lil' helper


Joined: 11 Nov 2012
Posts: 77

PostPosted: Mon Nov 17, 2014 9:54 am    Post subject: Reply with quote

Neatly done, but I would leave out "discard" option in fstab and use SSD fstrim script provided here: http://chmatse.github.io/SSDcronTRIM/.
My cron job is autoset to weekly shedule as I've left a lot of free space on my Samsung 840 EVO 250 GB with Windows 7 dual boot.
For your reference here: http://wiki.gentoo.org/wiki/SSD#Notes.
Back to top
View user's profile Send private message
corbintech
n00b
n00b


Joined: 15 Nov 2014
Posts: 16

PostPosted: Mon Nov 17, 2014 9:56 pm    Post subject: Reply with quote

vasettoo wrote:
Neatly done, but I would leave out "discard" option in fstab and use SSD fstrim script provided here: http://chmatse.github.io/SSDcronTRIM/.
My cron job is autoset to weekly shedule as I've left a lot of free space on my Samsung 840 EVO 250 GB with Windows 7 dual boot.
For your reference here: http://wiki.gentoo.org/wiki/SSD#Notes.


Thanks for the reply.

The script would not work. It said my / drive does not support trim, it very much does.

So, I took discard out of fstab and created a cron job. I got it running like this:

Code:
crontab -l
00 16 * * 3 fstrim -v /boot
00 16 * * 4 fstrim -v /
00 16 * * 5 fstrim -v /home


That should work.

Thanks again.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum