View previous topic :: View next topic |
Author |
Message |
der bastler Apprentice
Joined: 13 Apr 2003 Posts: 258
|
Posted: Thu Mar 15, 2012 5:45 pm Post subject: Thinkpad Upgrade: 8 GiB RAM + 80 GB SSD |
|
|
So it's come to this: My reliable Thinkpad T400S will get an upgrade.
Its somewhat damaged 250 GB HDD will be replaced by a Intel 320 Series SSD with 80 GB capacity. RAM will be expanded from one module with 2 GiB to two modules à 4 GiB (Kingston ValueRAM SO-DIMM 4GB PC3-8500S CL7).
The new SSD comes with built-in encryption, therefore I don't need my own custom initramfs-based LUKS+LVM approach anymore. Although shrinking the existing (amd64) installation is possible, I think it's time for a new, clean installation.
/dev/sda1: mounted at /boot, 32 MB, ext2
/dev/sda2: mounted at /, 16000 MB, ext3
/dev/sda3: mounted at /var, 8000 MB, ext3
/dev/sda4: mounted at /home, remaining space (<56000 MB), ext3
First, no swap. I have experience with a swap-less desktop system. My first netbook had 2 GiB RAM and 4 GB Flash: no space left for a swap -- and I didn't miss the swap space. Ok, memory demanding processes (e.g. mogrify with large images) got killed automatically, but that was tolerable and the rest remained stable. And as far as I know suspend to disk works with files, too?
Second, no dedicated /tmp partition. In previous systems I had one, mounted noexec+nosuid+nodev. This time, in my opinion there's enough RAM left for a tmpfs /tmp (size=2GB).
What do you think about such a setup? No swap, /tmp as tmpfs, ext3 as filesystem on a SDD.
I'm looking forward to receiving your feedback. _________________ Tempus fugit.
@frank@troet.cafe |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54277 Location: 56N 3W
|
Posted: Thu Mar 15, 2012 7:40 pm Post subject: |
|
|
der bastler,
Check that your SSD supports the trim instruction. It probably does.
If so, choose a filesystem that supports trim too. Later in life, when the enire 80G has been written once, this will maintain thw write speed.
Sectors that are freed when a file is removed will be erased ready to be rewritten , when the trim command is issued to the drive. They with thus be ready for immeadate reuse.
Without trim, the drive must erase a newly alocated block before it can be writte and erase is a very slow operation
That means ext4 not ext3. There are other filesystesm that support trim.
With 8G Ram, you can put /var/tmp/portage in RAM. Thats where all your builds take place. You will be able to emerge everything except LibreOffice and perhaps Firefox.
A 2G /tmp is huge. Just let it slosh aourd in RAM with no restrictions. shmfs will take up a maximum of 50% of your RAM by defualt and nothing if its not used.
It can also be swapped out but you won't have a swap partition. Its possible to have a swap file if you find you need swap on odd occasions.
Only you can determine your filesystem sizes from what you will use the system for. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9681 Location: almost Mile High in the USA
|
Posted: Thu Mar 15, 2012 7:50 pm Post subject: |
|
|
My netbook has 2GB RAM and 32GB SSD (eeePC). /tmp is on tmpfs, up to 1.5GB and /var/tmp/portage builds in tmpfs. 1GB swap. I can't build firefox with it like this, I have to use regular disk space to build firefox. Most other things build just fine.
I was hoping that compression is sufficient to hibernate most of the time... but really it's not, there were many times I couldn't hibernate because I was using too much memory. Probably need 1.5GB or so to hibernate all of the time, and maybe then some to deal with any swap that was used...
Fortunately suspend/resume works just fine. _________________ Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
|
der bastler Apprentice
Joined: 13 Apr 2003 Posts: 258
|
Posted: Thu Mar 15, 2012 9:53 pm Post subject: |
|
|
NeddySeagoon wrote: | Check that your SSD supports the trim instruction. |
According to http://www.intel.com/content/www/us/en/solid-state-drives/ssd-320-specification.html this is the case. Fine, then I'll give ext4 a try. Thanks for bringing up the TRIM topic -- heard it, but put it aside!
NeddySeagoon wrote: | With 8G Ram, you can put /var/tmp/portage in RAM. Thats where all your builds take place. You will be able to emerge everything except LibreOffice and perhaps Firefox. |
I already use libreoffice-bin because I didn't notice an advantage in wasting hours of CPU time for a source build. Are firefox-bin and thunderbird-bin worth a try -- apart from the artwork licence issue?
NeddySeagoon wrote: | A 2G /tmp is huge. |
All previous systems had approx. 5 GB /tmp because K3B stored images in /tmp. Of course, that can be changed in K3B's preferences, but... old habits die hard. Well, perhaps 1 GB suffices.
NeddySeagoon wrote: | Only you can determine your filesystem sizes from what you will use the system for. |
The sizes are deduced from the df output of my current system plus tolerance. Tomorrow I'll watch the impact of a 300 MB system update on disk usage (especially /var/tmp/portage). Perhaps I can shift some GBs to home... _________________ Tempus fugit.
@frank@troet.cafe |
|
Back to top |
|
|
gorkypl Guru
Joined: 04 Oct 2010 Posts: 444 Location: Kraków, PL
|
Posted: Fri Mar 16, 2012 11:07 pm Post subject: |
|
|
der bastler wrote: |
All previous systems had approx. 5 GB /tmp because K3B stored images in /tmp. Of course, that can be changed in K3B's preferences, but... old habits die hard. Well, perhaps 1 GB suffices. |
When mounting /tmp in ram you can specify the maximum size you will allow it to use, but if it is not needed it will not be taken.
I have 8GB of ram and here is a line from my /etc/fstab
Code: |
none /tmp tmpfs defaults,noatime,size=4G,mode=1777 0 0
|
|
|
Back to top |
|
|
der bastler Apprentice
Joined: 13 Apr 2003 Posts: 258
|
Posted: Sun Aug 26, 2012 10:28 am Post subject: |
|
|
Just for the records: Yesterday I've ordered two Kingston ValueRAM SO-DIMM 4GB PC3-8500S CL7 and one Intel Series 320 SSD with 80 GB.
I'll post the log of the re-installation process soon. _________________ Tempus fugit.
@frank@troet.cafe |
|
Back to top |
|
|
der bastler Apprentice
Joined: 13 Apr 2003 Posts: 258
|
Posted: Tue Sep 04, 2012 11:22 pm Post subject: |
|
|
Well, now I'm pondering how to enable the TRIM command -- Online discard or batched discard?
My personal standard procedures for filesystem creation would involve mkfs.ext4 (was: mkfs.ext3) and tune2fs:
Code: | mkfs.ext4 -j -O dir_index /dev/sdaX
tune2fs -o journal_data -c 0 -i 0 /dev/sdaX |
(according to the man pages, discard is set by default at mkfs time)
In case of online discard (i.e. TRIM at every delete op), fstab would be defined as follows:
Code: |
shm /dev/shm tmpfs nodev,nosuid,noexec 0 0
proc /proc proc defaults 0 0
/dev/sda1 /boot ext2 discard,noatime,noauto 1 2
/dev/sda2 / ext4 discard,noatime 0 1
/dev/sda3 /home ext4 discard,noatime,nosuid,nodev 0 2
none /tmp tmpfs defaults,noatime,nosuid,noexec,nodev,size=2G,mode=1777 0 0
none /var/tmp tmpfs defaults,noatime,nosuid,nodev,mode=1777 0 0
|
But is online discard safe to use? Or should I create a cron job with fstrim commands? _________________ Tempus fugit.
@frank@troet.cafe |
|
Back to top |
|
|
mbar Veteran
Joined: 19 Jan 2005 Posts: 1990 Location: Poland
|
Posted: Thu Sep 06, 2012 10:18 am Post subject: |
|
|
Yes, it's perfectly safe. |
|
Back to top |
|
|
der bastler Apprentice
Joined: 13 Apr 2003 Posts: 258
|
Posted: Fri Sep 07, 2012 5:55 am Post subject: |
|
|
Finally, I've found a statement from Intel dealing with SSD optimisation: http://cache-www.intel.com/cd/00/00/49/23/492352_492352.pdf
Limit capacity:
Quote: | Setting usable capacity to 80% of the factory default configuration provides a balanced solution for many applications. Using more than 90% of the factory default capacity is not recommended, unless write component of the target workload is predominantly sequential. |
Partition aligment is not needed:
Quote: | With the Intel SSD 320 Series, aligning partitions or RAID volumes is not required and provides no performance benefit. |
NoOp I/O scheduler is recommended:
Quote: | With SSDs, it is recommended to use the simplest noop (no operation) scheduler, unless there are processes in the system that can produce excessive amounts of I/Os and starve other processes. |
So, what is my conclusion for the use case "notebook"?
- use NoOp sscheduler
- try online discard (and hope drive is not bricked by frequent Trims)
- don't impose hard limit on usable capacity
_________________ Tempus fugit.
@frank@troet.cafe |
|
Back to top |
|
|
der bastler Apprentice
Joined: 13 Apr 2003 Posts: 258
|
Posted: Thu Dec 06, 2012 8:28 pm Post subject: |
|
|
Conclusion after three months of usage: It works! With 8G of RAM and 80G SSD the notebook is booting blazing fast. KDM is up almost instantly, loading KDE takes only a few seconds. Now that was an investment (RAM: 40 EUR, SSD: 170 EUR) that paid off!
Here's some data...
/etc/fstab
Code: | shm /dev/shm tmpfs nodev,nosuid,noexec 0 0
proc /proc proc defaults 0 0
/dev/sda1 /boot ext2 discard,noatime,noauto 1 2
/dev/sda2 / ext4 discard,noatime 0 1
/dev/sda3 /home ext4 discard,noatime,nosuid,nodev 0 2
none /tmp tmpfs defaults,noatime,nosuid,noexec,nodev,size=2G,mode=1777 0 0
none /var/tmp tmpfs defaults,noatime,nosuid,nodev,mode=1777 0 0 |
smartctl --all /dev/sda:
Code: | ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
3 Spin_Up_Time 0x0020 100 100 000 Old_age Offline - 0
4 Start_Stop_Count 0x0030 100 100 000 Old_age Offline - 0
5 Reallocated_Sector_Ct 0x0032 100 100 000 Old_age Always - 0
9 Power_On_Hours 0x0032 100 100 000 Old_age Always - 752
12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 185
170 Unknown_Attribute 0x0033 100 100 010 Pre-fail Always - 0
171 Unknown_Attribute 0x0032 100 100 000 Old_age Always - 0
172 Unknown_Attribute 0x0032 100 100 000 Old_age Always - 0
183 Runtime_Bad_Block 0x0030 100 100 000 Old_age Offline - 0
184 End-to-End_Error 0x0032 100 100 090 Old_age Always - 0
187 Reported_Uncorrect 0x0032 100 100 000 Old_age Always - 0
192 Power-Off_Retract_Count 0x0032 100 100 000 Old_age Always - 3
199 UDMA_CRC_Error_Count 0x0030 100 100 000 Old_age Offline - 0
225 Load_Cycle_Count 0x0032 100 100 000 Old_age Always - 16636
226 Load-in_Time 0x0032 100 100 000 Old_age Always - 42299383
227 Torq-amp_Count 0x0032 100 100 000 Old_age Always - 18
228 Power-off_Retract_Count 0x0032 100 100 000 Old_age Always - 45123
232 Available_Reservd_Space 0x0033 100 100 010 Pre-fail Always - 0
233 Media_Wearout_Indicator 0x0032 100 100 000 Old_age Always - 0
241 Total_LBAs_Written 0x0032 100 100 000 Old_age Always - 16636
242 Total_LBAs_Read 0x0032 100 100 000 Old_age Always - 3769 |
disk usage:
Code: | rootfs 20G 11G 7,8G 59% /
/dev/root 20G 11G 7,8G 59% /
tmpfs 3,9G 368K 3,9G 1% /run
udev 10M 0 10M 0% /dev
shm 3,9G 0 3,9G 0% /dev/shm
cgroup_root 10M 0 10M 0% /sys/fs/cgroup
/dev/sda3 54G 22G 30G 43% /home
none 2,0G 16K 2,0G 1% /tmp
none 3,9G 127M 3,8G 4% /var/tmp |
The tmpfs "/var/tmp" is not restricted in size, but a compilation of Thunderbird showed that there's indeed a limit at 4G (=1/2 of RAM as expected; the build failed because no space was left). But it is still possible to compile both Thunderbird and Firefox. Just remount /var/tmp with a slightly larger size limit:
Code: | # mount -o remount,size=6G /var/tmp |
_________________ Tempus fugit.
@frank@troet.cafe |
|
Back to top |
|
|
der bastler Apprentice
Joined: 13 Apr 2003 Posts: 258
|
Posted: Fri Dec 21, 2012 6:40 pm Post subject: |
|
|
der bastler wrote: | The tmpfs "/var/tmp" is not restricted in size, but a compilation of Thunderbird showed that there's indeed a limit at 4G (=1/2 of RAM as expected; the build failed because no space was left). But it is still possible to compile both Thunderbird and Firefox. Just remount /var/tmp with a slightly larger size limit:
Code: | # mount -o remount,size=6G /var/tmp |
|
Make this 6600M instead of 6G and compiling libreoffice becomes possible. I've logged the last emerge and did a plot:
http://abelbeck.wordpress.com/?attachment_id=289
(Just in case someone wants to try the mem disk thing, too) _________________ Tempus fugit.
@frank@troet.cafe |
|
Back to top |
|
|
d2_racing Bodhisattva
Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
|
Back to top |
|
|
|
|
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
|
|