# Gentoo specific computer upgrade hints

## msst

Hi folks,

it's about time I upgrade my over 6 years old desktop computer again. Not only is it feeling too slow on compile sessions, also something with the mobo is broken and occasionally giving hang-ups (I think I could narrow it down to the motherboard and believe further diagnose is not fruitful for that old system, upgrade pending anyway).

So this time I want to upgrade it specifically with the aim to get fast compile times in mind. Thats a relatively specific demand (off the mainstream) so I have a few questions and hope someone here with more experience can give me some hints. Specifically:

1) What motherboard/CPU combo would be especially good for that aim currently? Something with as many as possible cores as compiler sessions are nicely parallelizable?

2) What other components have the biggest performance impact for that goal? I have some SATA harddrives which are not too old (upgraded later, also after a hd crash a new one was bought), the grafix card is only 2 years and should not influence that issue I think. What should I check out?

3) Anything else to prepare with the current installation? I obviously would prefer not to reinstall from scratch again and currently I am under the impression that if I adjust the kernel compile to include all things necessary for the new computer then it should just run out of the box if I plug the old 2 SATA harddrives in the same order in as before. Any things I forget? BTW: data partition and tmp is encrypted, root not, so all ok?

Thanks for hints. Links to decently current threads are also welcome. I did a short board search but couldn't find anything current about this topic.

----------

## NeddySeagoon

mas-,

How much do you want to spend ?

If you want to migrate the current install, you need to choose a CPU that can execute all the instructions that the old CPU has.

That means staying with the old CPU manufactuerer.   If you will move from 32 bit to 64 bit, you will want to do a reinstall as there is no practical way to upgrade a 32 bit install.

For fast build times, you want lost of CPU cores, a huge CPU cache and lots of RAM.

If money is no object, lots of solid state drive (SSD) space.  SSDs are at least 5x faster than 'spinney' drives, thats in sqauential reads, when a rotating HDD is at its best..

Don't do a 32 bit install on 64 bit hardware.  Its like buying a Ferrari just to drive to the shops.

----------

## msst

The old system is using Intel Core2 with 2 GB DDR2 RAM. So if I stay with Intel that should be upgradeable, right?

What I want to spend, well as much as needed but not more than necessary and resonable to get a nice system. 8-;

One possible CPU would be the Intel Core i7 3930K / 3.2 GHz Prozessor, which is a hexacore, quite expansive at over 500 bucks however. I wonder e.g. if that is worth it in comparison to something like the Intel Core i7 3820 / 3.6 GHz Prozessor, which is a quadcore, higher clock rate and half the price.

As of ram, it seems DDR3 ram is quite cheap, so I would likely just dump 16 GB in. Not much use throwingg 32GB in or?

If I look at a current compiler task then it takes up on average 100 MB per process. Assuming I use 2*cores+1 processes that would be even for the hexacore only 13 process so roughly 1.3 GB. Seems 16 GB is already overkill then.

I also definitly consider using a SSD this time at least for the system. Data can be on the old hds. I wouldn't even need a huge one then, my current system eats only 25 GB (system only, not data). So a 128 GB SSD should do. These aint so terrible expansive any more.

More ideas or comments?

----------

## The Doctor

If your packet book is important look at amd cpus. They are about $1000 less than the intel ones at amazon.

You could make the binaries comparable by rebuilding your system with generic flags and then rebuild your new system with the amd flags.

----------

## jathlon

You can get an i7-3770 and motherboard for about half of what a i7-3930 and m/b would cost you.  The X79 m/b's are expensive. You would still save a fair chunk of change versus a i7-3820.  If you decide not to step up to a 3930 the biggest advantage of an X79 platform is the extra PCIe lanes. You could run two pci express 3.0 devices in x16 bit mode, where the LGA1155 socket boards will only support one device in x16 mode.  So unless you _really_ want the extra cores, or need the extra PCIe bandwidth, I'd go with the LGA1155 socket solution.  

Hmm, according to this article the 3770 seems to have slightly better performance than the 3820 (in the windows environment anyway).

http://www.anandtech.com/show/5771/the-intel-ivy-bridge-core-i7-3770k-review/6

joe

----------

## msst

Good hints, so the real decision line would be between

1) i7-3770K on LGA1155 motherboard

2) i7-3930K on LGA2011 motherboard

with the second option of course beeing twice the price.

The price difference between X79 mainboards the ones for LGA1155 is a bit more than 100 EUR currently, of which 30 EUR the 3770K is more expansive. So no huge difference but if the 2011 based CPU is even slower then it is pointless the comparison is between 1) and 2) realistically.

Just the question is if the hecaxore can really gains 50% speed over the quadcore in a compiler environment. Does anyone have experience with how well that scales? Because if in the end only 20% advantage is left then twice the price is a lot for that. Hmmm.

----------

## John R. Graham

It scales very well indeed in most phases of the build. MAKEOPTS="-j7" will tell make to launch multiple source file compiles at once. Now, there won't always be 6 files to compile, but, when there are, all 6 cores will be active. Usually the compile phase will be CPU bound rather than IO bound but to help that be true, your mass storage shouldn't suck. At the end, linking is fundamentally single-threaded, so multiple cores doesn't help, but lots of memory does. Summary? It's multi-faceted.   :Wink: 

- John

----------

## NeddySeagoon

mas-,

With lots of RAM you can put /var/tmp/portage in RAM, so building takes place there.

If you have enough RAM for that, the kernel will keep buffers around anyway, so setting it explicitly doesn't do a great deal.

LbreOffice needs 6G of build space, with default settings and 16G RAM you can build the biggest package in Gentoo all in RAM.

With DDR3 so cheap now and Linuxes ability to use it all for something, you may as well max out your RAM.

----------

## msst

Thanks for the hints, I am going with a LGA1155/i3770K combo now. The money that saves goes into maxing the RAM with DDR3-1600. Seems the best compromise to me in the moment.

What I am not yet conviced of is using an SSD. Thinking it over, the bootup time is already ok on my old system. And the tmp I would likely not dare to put on an SSD for write stress reasons as well as the lower speedup in writing. So the best is likely using massive RAM and trying to run it via the RAM. Should I look to mount one of these self-inflating/shrinking RAM fs things for that or will the normal buffering routines already take care of it?

P.S.: LibreOffice is indeed the biggest pain in the ass, took more than hald a day on the old system. bah,

----------

## msst

P.S.:

This looks like a quite relevant speed comparison for compiler time:

http://techreport.com/review/22835/review-intel-core-i7-3770k-ivy-bridge-processor/12

Means a bit more than 20% remains of the6 vs 4 cores in real live compiles. Hence my preference for the 3770k finally.

----------

## keet

Why not buy a small solid state drive (maybe 128GB) along with a big hard drive?  That is what I do.  I put /home, /usr/portage/, /tmp, /var, /usr/src, and a couple other directories on the spinning drive, and everything else on the S.S.D.   This way, it is incredibly fast, but still has low wear and tear on the S.S.D.

----------

## msst

Ok, the upgrade is now done and the good news is all is running stable (proving that my assumption regarding the old MB beeing broken was correct) and the compiling is indeed a lot faster.

Just after the upgrade portage had a nice libreoffice update so I could test that nicely. From almost 20h down to 3-4h is nice, but there was indeed still one bottleneck and that is the libreoffice compile seems to get stuck a long time in creating various directories and files in the temporary portage compile directory and it only uses one CPU during that time and is fully IO limited.

After that experience I have now mounted /var/tmp/portage and /tmp as ramdrives (tmpfs) to force a speed up there. Was too lazy to rerun an (unnecessary) libreoffice recompile after that though but recompiling some kde-parts is at least 10x faster than the old core2 system..

Phoronix Test suite kernel compile is 89s now, which is quite good. In the comparisons I can see that only systems with lots more cores are significantly faster. Though one i5-3570K with a SSD is about 7s faster. So the old harddrives (phoronix does not use the ramdisks under var/portage/tmp of course!) do slow even that mostly CPU intense process still a bit.

Therefore I will probably add a fast SSD sometime soon and then report how much that has helped. But the main goal is already reached, the speedup in the sometimes tiring slow compiles are gone and that i7-3770K seems to be quite good speed for the bucks.

P.S.: Thats all on i686 32 bit platform so far (the old system which upgraded without any hassle from the core2 system). Just could not find the time to reinstall AMD64 from scratch. Maybe over christmas...

P.P.S: From the Phoronix benchmarks I can see that the other discussed processor options would have ca. the follwing timings

Core i7-3820 (overclocked 4.5 GHz) with SSD drive is 69s compile time

Core i7-3960X (hexacore) with SSD is 60s compile time

Both somewhat faster but either at substantial $$$ or massive overclocking.

----------

