View previous topic :: View next topic |
Author |
Message |
crocket Guru
Joined: 29 Apr 2017 Posts: 558
|
Posted: Sat Feb 10, 2018 12:13 am Post subject: How fast can my laptop compile basic GUI packages? |
|
|
CPU : AMD A6-7310 APU with AMD Radeon R4 Graphics
RAM : 4GB shrunk down to 3.3GB due to AMD Radeon R4
SSD : 120GB
It seems I can't really speed up compilation and reduce the load on SSD with tmpfs on /var/tmp/portage because RAM is 3.3GB.
I just want to install and continually upgrade XFCE, libreoffice, okular, and chromium web browser.
How long would it take to compile and upgrade a gentoo system on my laptop?
I'm also considering void linux. Although its lack of third party repository limits my options, I don't need many packages on my laptop. |
|
Back to top |
|
|
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Sat Feb 10, 2018 5:54 am Post subject: |
|
|
I use a single-core Atom with 2GB RAM and manage to run a desktop plus chromium from source on it no problem. You don't really need a tmpfs, but having a desktop to distcc with might help. |
|
Back to top |
|
|
crocket Guru
Joined: 29 Apr 2017 Posts: 558
|
Posted: Sat Feb 10, 2018 10:47 am Post subject: |
|
|
Ant P. wrote: | I use a single-core Atom with 2GB RAM and manage to run a desktop plus chromium from source on it no problem. You don't really need a tmpfs, but having a desktop to distcc with might help. |
I don't need tmpfs, but without tmpfs, SSD will be worn.
How long does it usually take to upgrade on your machine? |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54237 Location: 56N 3W
|
Posted: Sat Feb 10, 2018 11:00 am Post subject: |
|
|
crocket,
Despite the anecdotal evidence of users destroying early SSDs before their Gentoo install is complete, You should not have a problem today.
After several years doing monthly updates all on SSD.
Code: | SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x002f 100 100 050 Pre-fail Always - 0
5 Reallocated_Sector_Ct 0x0033 100 100 010 Pre-fail Always - 0
9 Power_On_Hours 0x0032 100 100 001 Old_age Always - 3993
12 Power_Cycle_Count 0x0032 100 100 001 Old_age Always - 1214
170 Grown_Failing_Block_Ct 0x0033 100 100 010 Pre-fail Always - 0
171 Program_Fail_Count 0x0032 100 100 001 Old_age Always - 0
172 Erase_Fail_Count 0x0032 100 100 001 Old_age Always - 0
173 Wear_Leveling_Count 0x0033 100 100 010 Pre-fail Always - 23
174 Unexpect_Power_Loss_Ct 0x0032 100 100 001 Old_age Always - 341
181 Non4k_Aligned_Access 0x0022 100 100 001 Old_age Always - 12 0 12
183 SATA_Iface_Downshift 0x0032 100 100 001 Old_age Always - 0
184 End-to-End_Error 0x0033 100 100 050 Pre-fail Always - 0
187 Reported_Uncorrect 0x0032 100 100 001 Old_age Always - 0
188 Command_Timeout 0x0032 100 100 001 Old_age Always - 0
189 Factory_Bad_Block_Ct 0x000e 100 100 001 Old_age Always - 82
194 Temperature_Celsius 0x0022 100 100 000 Old_age Always - 0
195 Hardware_ECC_Recovered 0x003a 100 100 001 Old_age Always - 0
196 Reallocated_Event_Count 0x0032 100 100 001 Old_age Always - 0
197 Current_Pending_Sector 0x0032 100 100 001 Old_age Always - 0
198 Offline_Uncorrectable 0x0030 100 100 001 Old_age Offline - 0
199 UDMA_CRC_Error_Count 0x0032 100 100 001 Old_age Always - 0
202 Perc_Rated_Life_Used 0x0018 100 100 001 Old_age Offline - 0
206 Write_Error_Rate 0x000e 100 100 001 Old_age Always - 0 |
the used lifetime (202) is reported as zero.
You can have the best of both worlds if you want to set it up, so that small packages (most things) build in tmpfs and bigger things use the SSD.
PORTAGE_TMPDIR can be set on a per package basis. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
pjp Administrator
Joined: 16 Apr 2002 Posts: 20067
|
Posted: Sat Feb 10, 2018 3:42 pm Post subject: Re: How fast can my laptop compile basic GUI packages? |
|
|
crocket wrote: | It seems I can't really speed up compilation and reduce the load on SSD with tmpfs on /var/tmp/portage because RAM is 3.3GB. | You could set it up for use only when compiling and tell larger packages to compile not in tmpfs.
Portage TMPDIR on tmpfs wrote: | Per-package choices at compile time
Portage can be configured to build large packages outside of the tmpfs space on a per-package basis.
Create a file to tell Portage where to place the temporary files directory: |
_________________ Quis separabit? Quo animo? |
|
Back to top |
|
|
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Sat Feb 10, 2018 9:53 pm Post subject: |
|
|
NeddySeagoon wrote: | crocket,
Despite the anecdotal evidence of users destroying early SSDs before their Gentoo install is complete, You should not have a problem today.
After several years doing monthly updates all on SSD.
[...]
the used lifetime (202) is reported as zero. |
The SSD on my laptop's so old it doesn't even *have* a lifetime counter! Still works fine.
Code: | SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x000b 100 100 050 Pre-fail Always - 0
2 Throughput_Performance 0x0005 100 100 050 Pre-fail Offline - 0
3 Unknown_JMF_Attribute 0x0007 100 100 050 Pre-fail Always - 0
5 Reallocated_Sector_Ct 0x0013 100 100 050 Pre-fail Always - 0
7 Unknown_JMF_Attribute 0x000b 100 100 050 Pre-fail Always - 0
8 Unknown_JMF_Attribute 0x0005 100 100 050 Pre-fail Offline - 0
9 Power_On_Hours 0x0012 100 100 000 Old_age Always - 23326
10 Unknown_JMF_Attribute 0x0013 100 100 050 Pre-fail Always - 0
12 Power_Cycle_Count 0x0012 100 100 000 Old_age Always - 3357
168 SATA_Phy_Error_Count 0x0012 100 100 000 Old_age Always - 0
175 Bad_Cluster_Table_Count 0x0003 100 100 010 Pre-fail Always - 0
192 Unexpect_Power_Loss_Ct 0x0012 100 100 000 Old_age Always - 0
194 Temperature_Celsius 0x0022 044 100 020 Old_age Always - 44 (Min/Max 22/44)
197 Current_Pending_Sector 0x0012 100 100 000 Old_age Always - 0
240 Unknown_JMF_Attribute 0x0013 100 100 050 Pre-fail Always - 0
170 Bad_Block_Count 0x0003 100 100 010 Pre-fail Always - 0 381 21
173 Erase_Count 0x0012 100 100 000 Old_age Always - 4264 7409 4573 |
I have my syslog config tweaked to put excess noise in a tmpfs (mostly dhcp, cron and wpa_supplicant) but that's about it. |
|
Back to top |
|
|
C5ace Guru
Joined: 23 Dec 2013 Posts: 472 Location: Brisbane, Australia
|
Posted: Sun Feb 11, 2018 3:16 am Post subject: |
|
|
I compared build times: sys-devel/gcc-6.4.0-r1
# emerge sys-devel/gcc
HP Notebook Type1 Product Config Id CND5413TC5.P4Y45PA
With 6G tempdir:
real 114m16.880s
user 312m19.643s
sys 36m7.819s
No tempdir:
real 114m50.509s
user 312m1.466s
sys 35m49.349s
Code: |
HP Notebook Type1 Product Config Id CND5413TC5.P4Y45PA
CPU:
Model: 22.0.1 "AMD A6-5200 APU with Radeon(TM) HD Graphics"
Clock: 1996 MHz
BogoMips: 3992.63
Cache: 2048 kb
Units/Processor: 4
RAM:
Bank: "CHANNEL A"
Manufacturer: "Hynix"
Serial: "1010DD97"
Asset Tag: "Asset Tag:"
Part Number: "HMT41GS6BFR8A-PB"
Memory Array: #15
Form Factor: 0x0d (SODIMM)
Type: 0x18 (Other)
Type Detail: 0x4080 (Synchronous)
Data Width: 64 bits
Size: 8 GB
Speed: 1600 MHz
DISK:
Model: "TOSHIBA MQ01ABD1" (STATA Rotating Iron)
Vendor: "TOSHIBA"
Device: "MQ01ABD1"
Revision: "2C"
|
Linux uses nearly all free RAM as disk cache. This means in practice using tmpfs does not bring significant higher build speeds. Build speeds can only be significantly increased by using Precompiled Headers and using "C" instead of "C++" to code applications. Also changing the compiler flags to zero optimization and don't use templates. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54237 Location: 56N 3W
|
Posted: Sun Feb 11, 2018 9:45 am Post subject: |
|
|
C5ace,
Correct. If you have the RAM to build in tmpfs, the kernel will tend to do that anyway.
Without tmpfs, the writes will be committed to the HDD but never read as the data is still in cache.
tmpfs then saves a few CPU cycles setting up the DMA transfers for the writes and the RAM bus bandwidth that the writes consume.
All in all, not a lot. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
crocket Guru
Joined: 29 Apr 2017 Posts: 558
|
Posted: Mon Feb 12, 2018 3:54 am Post subject: |
|
|
C5ace wrote: | # emerge sys-devel/gcc
With 6G tempdir:
real 114m16.880s
user 312m19.643s
sys 36m7.819s
No tempdir:
real 114m50.509s
user 312m1.466s
sys 35m49.349s
CPU // Model: 22.0.1 "AMD A6-5200 APU with Radeon(TM) HD Graphics"
RAM // 8G |
It takes almost 2 hours to compile gcc with A6-5200. According to https://www.cpubenchmark.net, the processing power of A6-5200 is 2415, and that of A6-7310 is 2685.
My laptop has less RAM than yours.
I guess it'll take about 7~10 hours to upgrade gentoo each week on my laptop. How long did it take for you to build a gentoo desktop on your machine? How long does it usually take to upgrade your gentoo? |
|
Back to top |
|
|
Cuong Nguyen Apprentice
Joined: 18 Jan 2018 Posts: 152
|
Posted: Mon Feb 12, 2018 4:55 am Post subject: |
|
|
If TMPFS does help speed up compiling then use disk as PORTAGE_TMPDIR could help you to save and continue compiling after crash.
I always use RAM as tmp, even bigger than physical RAM
Code: |
mount -t tmpfs -o mode=1777,size=16G tmpfs /var/tmp/portage
|
can fit any package. |
|
Back to top |
|
|
|