ssd trim

Installed suse 12.2 on a ssd.what do I change in ftab file to enable trim?

Entrees in the ftab is different the in other OS.

Do not let us using ???. Show what you have. Show where it differs from other OS (and name it). Do not speak in secret riddles.

In Ubuntu,Kubuntu, and Mint.They have defaults in the / and /home lines. I would change defaults to discard,notime. suse does not.

Am 14.09.2012 13:16, schrieb fred0843:
>
> In Ubuntu,Kubuntu, and Mint.They have defaults in the / and /home lines.
> I would change defaults to discard,notime. suse does not.
>
>
Please post the result of


cat /etc/fstab

from your openSUSE system and the same from one of the others in code
tags (as I did for the command).
Everything else is as Henk said just guess work.


PC: oS 12.2 x86_64 | i7-2600@3.40GHz | 16GB | KDE 4.8.4 | GeForce GT 420
ThinkPad E320: oS 12.2 x86_64 | i3@2.30GHz | 8GB | KDE 4.8.4 | HD 3000
eCAFE 800: oS 12.1 i586 | AMD Geode LX 800@500MHz | 512MB | KDE 3.5.10

/dev/disk/by-id/ata-OCZ-AGILITY3_OCZ-O3J1N1HKV1WI08OL-part5 swap swap defaults 0 0
/dev/disk/by-id/ata-OCZ-AGILITY3_OCZ-O3J1N1HKV1WI08OL-part6 / ext4 acl,user_xattr 1 1
/dev/disk/by-id/ata-OCZ-AGILITY3_OCZ-O3J1N1HKV1WI08OL-part7 /home ext4 acl,user_xattr 1 2
proc /proc proc defaults 0 0
sysfs /sys sysfs noauto 0 0
debugfs /sys/kernel/debug debugfs noauto 0 0
usbfs /proc/bus/usb usbfs noauto 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0

Do I add discard,notime affter ext4

I quickly checked on my Dell notebook which has a ssd what I have added


defaults,errors=remount-ro,noatime,discard

I followed a howto from here (forums.opensuse.org) when I was at 12.1,
but do not have the link at hand.


PC: oS 12.2 x86_64 | i7-2600@3.40GHz | 16GB | KDE 4.8.4 | GeForce GT 420
ThinkPad E320: oS 12.2 x86_64 | i3@2.30GHz | 8GB | KDE 4.8.4 | HD 3000
eCAFE 800: oS 12.1 i586 | AMD Geode LX 800@500MHz | 512MB | KDE 3.5.10

Hi
On my OCZ Agility I ran;


ext4 discard,noatime,data=writeback,acl,user_xattr 1 2

I also have added elevator=noop to the grub boot and disabled the disc
caching in firefox.

Not this is a notebook so turning off the writeback as I can shutdown
gracefully if needed. I would only run that on a desktop system with a
UPS connected…


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 12.2 (x86_64) Kernel 3.4.6-2.10-desktop
up 3 days 17:06, 4 users, load average: 0.17, 0.15, 0.14
CPU Intel i5 CPU M520@2.40GHz | Intel Arrandale GPU

Am 14.09.2012 14:59, schrieb Martin Helm:
> I quickly checked on my Dell notebook which has a ssd what I have added
>


> defaults,errors=remount-ro,noatime,discard
> 

I followed a howto from here (forums.opensuse.org) when I was at 12.1,
but do not have the link at hand.

Sorry that was incomplete, that was just the swap options, for the /
(which lives also on the ssd) I have


acl,user_xattr,errors=remount-ro,noatime,discard

my /home and some special purpose data directories live on volumes in
lvm2 and are physically on a standard harddisk, they have no options
beyond what the system gave them by default.


PC: oS 12.2 x86_64 | i7-2600@3.40GHz | 16GB | KDE 4.8.4 | GeForce GT 420
ThinkPad E320: oS 12.2 x86_64 | i3@2.30GHz | 8GB | KDE 4.8.4 | HD 3000
eCAFE 800: oS 12.1 i586 | AMD Geode LX 800@500MHz | 512MB | KDE 3.5.10

Am 14.09.2012 15:07, schrieb malcolmlewis:
> Not this is a notebook so turning off the writeback as I can shutdown
> gracefully if needed. I would only run that on a desktop system with a
> UPS connected…
>
Sorry Malcolm that I am confused at this point by that sentence:
Do you recommend that we use “data=writeback” on a notebook or do you
recommend not to use it on a notebook?
Sorry for the stupid question, since I do not know what that option
actually does.


PC: oS 12.2 x86_64 | i7-2600@3.40GHz | 16GB | KDE 4.8.4 | GeForce GT 420
ThinkPad E320: oS 12.2 x86_64 | i3@2.30GHz | 8GB | KDE 4.8.4 | HD 3000
eCAFE 800: oS 12.1 i586 | AMD Geode LX 800@500MHz | 512MB | KDE 3.5.10

Hmm, I googled it (“data=writeback”), even if it brings performance it
is too dangerous for me.


PC: oS 12.2 x86_64 | i7-2600@3.40GHz | 16GB | KDE 4.8.4 | GeForce GT 420
ThinkPad E320: oS 12.2 x86_64 | i3@2.30GHz | 8GB | KDE 4.8.4 | HD 3000
eCAFE 800: oS 12.1 i586 | AMD Geode LX 800@500MHz | 512MB | KDE 3.5.10

Hi
You need to live on the edge :wink: Yes only for notebook use, but even
then with any options the end user needs to decide. There are more,
like adding stuff to tmpfs eg I ran /tmp here, minimal swap since I
don’t generally hibernate/suspend.

I only have a 60GB OCZ Agility 3, this is going into the desktop and
I’m getting a 128GB Vertex 4 since there less than US$100 these days.

@fred0843 since it’s on OCZ, have you updated the firmware, there is a
bootable image on the OCZ forum that does the updating etc for you.

Also don’t forget alignment etc :wink:


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 12.2 (x86_64) Kernel 3.4.6-2.10-desktop
up 3 days 17:51, 4 users, load average: 0.41, 0.24, 0.18
CPU Intel i5 CPU M520@2.40GHz | Intel Arrandale GPU

Then my fstab file should look like this

/dev/disk/by-id/ata-OCZ-AGILITY3_OCZ-O3J1N1HKV1WI08OL-part6 / ext4 discard,notime,acl,user_xattr 1 1 /dev/disk/by-id/ata-OCZ-AGILITY3_OCZ-O3J1N1HKV1WI08OL-part7 /home ext4 discard,notime,acl,user_xattr 1 2
Does the above look ok ?

Please fred0843, use CODE tags around your computer text (like the others do): http://forums.opensuse.org/english/information-new-users/advanced-how-faq-read-only/451526-posting-code-tags-guide.html

Am 14.09.2012 17:16, schrieb fred0843:
>
> Then my fstab file should look like this
>
>
> /dev/disk/by-id/ata-OCZ-AGILITY3_OCZ-O3J1N1HKV1WI08OL-part6 / ext4
> discard,notime,acl,user_xattr 1 1
> /dev/disk/by-id/ata-OCZ-AGILITY3_OCZ-O3J1N1HKV1WI08OL-part7 /home ext4
> discard,notime,acl,user_xattr 1 2Does the above look ok ?
>
>
A bit bad readable, but the options look right.


PC: oS 12.2 x86_64 | i7-2600@3.40GHz | 16GB | KDE 4.8.4 | GeForce GT 420
ThinkPad E320: oS 12.2 x86_64 | i3@2.30GHz | 8GB | KDE 4.8.4 | HD 3000
eCAFE 800: oS 12.1 i586 | AMD Geode LX 800@500MHz | 512MB | KDE 3.5.10

First, for anyone who does not know what ATA trim is, or why they might want to use it, I suggest reading this excellent article:<br>
<a onclick="_gaq.push(’_trackEvent’, ‘Outgoing’, ‘www.anandtech.com’, ‘/show/2829’]);" href=“http://www.anandtech.com/show/2829” target="_blank">AnandTech - The SSD Relapse: Understanding and Choosing the Best SSD</a><br>
<br>
There are 3 ways ATA trim can be enabled, and all only work with SSD’s (Solid State Disk).<br>
<br>
<strong><u>Method 1: During openSUSE Installation</u></strong><br>
<br>
Use the installer’s default options when doing the steps outlined below, unless this guide instructs otherwise.<br>
<br>
<img src=“http://doc.opensuse.org/documentation/html/openSUSE/opensuse-reference/images/i_y2_inst_mode.png” border=“0” alt=""><br>
<br>
When you get to the installation screen titled “Installation Mode” (as shown above), make certain the check-box labeled “Use Automatic Configuration” is <em><strong>not</strong></em> checked, then press the button labeled “Next”.<br>
<br>
<br>
<img src=“http://doc.opensuse.org/documentation/html/openSUSE/opensuse-reference/images/i_y2_partitioning.png” border=“0” alt=""><br>
<br>
Continue with the install procedures until you arrive at the screen titled “Suggested Partitioning” (as shown above). Click either the button labeled “Create Partiton Setup…” or the button labeled “Edit Partition Setup…”.<br>
<br>
<br>
<img src=“http://i1077.photobucket.com/albums/w469/anon-openSUSE/016da1b4.png” border=“0” alt=""><br>
<br>
Next you will see the screen titled “Exper Partitioner”, similar to the screen shown above. Be very, very careful when using the Expert Partitioner. Making a mistake using the Expert Partitioner can lead to erasing an entire partition, which could cause data loss. Find the line that lists the SSD, and right-click on that line. A pop-up menu will appear with options that include “Edit”. Left-click the option labeled “Edit”.<br>
<br>
<br>
<img src=“http://i1077.photobucket.com/albums/w469/anon-openSUSE/75484b69.png” border=“0” alt=""><br>
<br>
A window will appear titled “YaST2 Partitioner” with the headline “Edit Partition” and the device node for the SSD you chose to edit. In the left-hand column of the “YaST2 Partitioner” window you have the option to format the partition, or not to format the partition. At this point you need to be aware not all filesystems support using ATA trim. Two filesystems that do support ATA trim are ext4 and Btrfs. Inspect the drop-down menu in the left-hand column labeled “File System”, and make certain the dropdown button shows ext4 or Btrfs. If you do not see ext4 or Btrfs on the “File System” drop-down menu button, you will need to format the SSD using ext4 or Btrfs if you want to enable using ATA trim. Next, in the right-hand column of the “YaST2 Partitioner” window, make certain there is a vaild path in the combo box field above the button labeled “Fstab Options”. Examples of valid paths include, yet are not limited to: “/”, “home”, “var”, “/media/Vacation”, and many more (all without the quote marks). Next, click the button labeled “Fstab Options…”<br>
<br>
<br>
<img src=“http://i1077.photobucket.com/albums/w469/anon-openSUSE/3c05fe75.png” border=“0” alt=""><br>
<br>
A window will appear with the unsuprising headline title “Fstab Options:”. Enter the word “discard” (without quote marks) in the text field near the bottom of the window labeled “Arbitrary Option Value”, as shown above. Next, click the button labeled “OK”, then proceed to finish the insatllation process.<br>
<br>
<br>
<strong><u>Method 2A: Post Completed Installation<br>
</u></strong><br>
ATA trim can also be enabled after installation is completed using a procedure similar to the one described above.<br>
<br>
<br>
<strong><u>Method 2B: Post Completed Installation<br>
<br>
<br>
</u></strong>Log into the computer as the user named “root” (without quotes). The user named “root” is the system adminstrator, and has maximum priviliges on the system. Next, open the file:

/etc/fstab

using a text editor. Find the line that lists the SSD, and add the word “discard” (without quotes) to the comma-seperated options near the end of the line. The line should look somethin like this (without the bold, red highlighting):

/dev/disk/by-id/ata-WidgetWorks-MAXIMUM_DRIVE-part1 /                    ext4       noatime,acl,user_xattr,<font color="#ff0000"><strong>discard</strong></font> 1 1

<br>
<br>
Save the fstab file, then reboot.<br>
<br>
The next time the SSD is mounted, it will automatically use ATA trim.

First, for anyone who does not know what ATA trim is, or why they might want to use it, I suggest reading this excellent article:
AnandTech - The SSD Relapse: Understanding and Choosing the Best SSD

There are 3 ways ATA trim can be enabled, and all only work with SSD’s (Solid State Disk).

Method 1: During openSUSE Installation

Use the installer’s default options when doing the steps outlined below, unless this guide instructs otherwise.

http://doc.opensuse.org/documentation/html/openSUSE/opensuse-reference/images/i_y2_inst_mode.png

When you get to the installation screen titled “Installation Mode” (as shown above), make certain the check-box labeled “Use Automatic Configuration” is <em>not</em> checked, then press the button labeled “Next”.

http://doc.opensuse.org/documentation/html/openSUSE/opensuse-reference/images/i_y2_partitioning.png

Continue with the install procedures until you arrive at the screen titled “Suggested Partitioning” (as shown above). Click either the button labeled “Create Partiton Setup…” or the button labeled “Edit Partition Setup…”.

<Expert Partitoner screen deleted>

Next you will see the screen titled “Expert Partitioner”. Be very, very careful when using the Expert Partitioner. Making a mistake using the Expert Partitioner can lead to erasing an entire partition, which could cause data loss. Find the line that lists the SSD, and right-click on that line. A pop-up menu will appear with options that include “Edit”. Left-click the option labeled “Edit”.

http://i1077.photobucket.com/albums/w469/anon-openSUSE/75484b69.png

A window will appear titled “YaST2 Partitioner” with the headline “Edit Partition” and the device node for the SSD you chose to edit. In the left-hand column of the “YaST2 Partitioner” window you have the option to format the partition, or not to format the partition. At this point you need to be aware not all filesystems support using ATA trim. Two filesystems that do support ATA trim are ext4 and Btrfs. Inspect the drop-down menu in the left-hand column labeled “File System”, and make certain the drop-down button shows ext4 or Btrfs. If you do not see ext4 or Btrfs on the “File System” drop-down menu button, you will need to format the SSD using ext4 or Btrfs if you want to enable using ATA trim. Next, in the right-hand column of the “YaST2 Partitioner” window, make certain there is a valid path in the combo box field above the button labeled “Fstab Options”. Examples of valid paths include, yet are not limited to: “/”, “home”, “var”, “/media/Vacation”, and many more (all without the quote marks). Next, click the button labeled “Fstab Options…”

http://i1077.photobucket.com/albums/w469/anon-openSUSE/3c05fe75.png

A window will appear with the unsurprising headline title “Fstab Options:”. Enter the word “discard” (without quote marks) in the text field near the bottom of the window labeled “Arbitrary Option Value”, as shown above. Next, click the button labeled “OK”, then proceed to finish the installation process.

Method 2A: Post Completed Installation

ATA trim can also be enabled after installation is completed using a procedure similar to the one described above.

Method 2B: Post Completed Installation

Log into the computer as the user named “root” (without quotes). The user named “root” is the system administrator, and has maximum privileges on the system. Next, open the file:

/etc/fstab

using a text editor. Find the line that lists the SSD, and add the word “discard” (without quotes) to the comma-separated options near the end of the line. The line should look something like this (without the bold, red highlighting):

/dev/disk/by-id/ata-WidgetWorks-MAXIMUM_DRIVE-part1 / noatime,acl,user_xattr,discard 1 1

Save the fstab file, then reboot.

The next time the SSD is mounted, it will automatically use ATA trim.

Thank anon 135

That was great help.With more people using SSD.That should be a sticky

Thanks! :slight_smile:

I have even more help for you today.

I forgot to mention in my last post in this thread that the disk controller connected to the SSD must support and enable AHCI mode to take advantage of ATA trim. So, if ATA trim is not working for you, lacking AHCI support or having AHCI disabled in the motherboard’s BIOS or on the drive controller card might be the problem.

You need to be certain your SSD’s partitions are block aligned correctly. I do not know if openSUSE 12.2 installation setup does the block alignment automatically (anyone have that answer?). If not, then you will need to re-partition your drive for correct block alignment. Failure to align the partitions correctly will result in decreased SSD transfer speed performance, and accelerated flash memory wear resulting in decreased SSD longevity. I really wanted to suggest reading an excellent post about partition alignment for SSD’s on Linux from the OCZ Forum, yet despite searching for it for about 2 hours I could not find the post because it has either been moved or deleted (probably deleted). So, here is the simple, condensed solution for all 60GB OCZ brand SSD’s.
Log in as root, then do:


TuxBox:/root# fdisk -H32 -S32 /dev/sd[b]X[/b]     (Substitute your SSD's drive letter for the [b]X[/b], then press the "Enter" key)
Welcome to fdisk (util-linux 2.21.2).

Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Command (m for help): n     (Press the "Enter" key)
Partition type:
   p   primary (0 primary, 0 extended, 4 free)
   e   extended
Select (default p): p     (Press the "Enter" key)
Partition number (1-4, default 1):             (Press the "Enter" key)
Using default value 1
First sector (2048-117231407, default 2048):     (Press the "Enter" key)
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-117231407, default 117231407):     (Press the "Enter" key)

Using default value 117231407
Partition 1 of type Linux and of size 55.9 GiB is set

Command (m for help): p     (Press the "Enter" key)

Disk /dev/sdX: 60.0 GB, 60022480896 bytes
32 heads, 32 sectors/track, 114483 cylinders, total 117231408 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xded72d3c

   Device Boot      Start         End      Blocks   Id  System
/dev/sdX1            2048   117231407    58614680   83  Linux

Command (m for help): w
The partition table has been altered!


Calling ioctl() to re-read partition table.
Syncing disks.
TuxBox:/root # 

Inspect the new partition listing to make certain you see:

[ul]
[li]32 heads[/li][li]32 sectors/track[/li][li]the first sector starts at 2048 bytes[/li][/ul]
After the SSD has new, aligned partitions, either

[ul]
[li]Install openSUSE (remembering to not have the installer re-partition the SSD), and have the installer format the SSD or[/li][li]Format the SSD manually. Here is an example of how to format the SSD using the ext4 filesystem (which does support ATA trim):[/li][/ul]


TuxBox:/root # mkfs.ext4 /dev/sd[b]X[/b]1         (Substitute your SSD's drive letter for the [b]X[/b], then press the "Enter" key)
mke2fs 1.42.4 (12-June-2012)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
120000 inodes, 480000 blocks
24000 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=494927872
15 block groups
32768 blocks per group, 32768 fragments per group
8000 inodes per group
Superblock backups stored on blocks: 
        32768, 98304, 163840, 229376, 294912

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done 

TuxBox:/root # 

In case you are not aware, the flash memory used in SSD’s have a limited number of writes; meaning any single memory cell can only be written to so many times before it becomes defective and unusable. There are some ways you can decrease the amount of writes to the SSD to prolong its useable life:

[ul]
[li]Never put the swap partition on a SSD.[/li][li]Make certain /tmp is not on the SSD. If you have enough memory (at least 2 GiB), you can use a RAM disk for /tmp. Do this by adding the the following line to your /etc/fstab file:[/li][/ul]

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

[ul]
[li]Some programs, like Firefox, will still need a setting changed to use the RAM disk as temporary file storage.[/li][li]In Firefox, type “about:config” in the address bar, then press the “Enter” key, then right-click in an open area. A pop-up menu will appear with the options “Toggle”, “Copy”, “Copy Name”, “Copy Value”, “New >”, and “Reset” (“Reset” will be greyed out). Hover the mouse pointer over “New >”. A sub-popup menu will appear with the options “String”, “Integer”, and “Boolean”. Click on the option titled “String”. A dialog box titled “New string value” wil appear with a text field labeled “Enter the preference name”. In the text field labeled “Enter the preference name”, type “browser.cache.disk.parent_directory” into the text field, then click the button labeled “OK”. A new dialog box will appear titled “Enter string value” that has a text field labeled “browser.cache.disk.parent_directory”. In the text field labeled “browser.cache.disk.parent_directory”, type “/tmp”, then click the button labeled “OK”. Close Firefox. The next time Firefox is started, it will use the RAM disk as its web cache. Be aware that files under “/tmp” will be completely lost on reboot, power down, or power loss.[/li][LIST]
[li]Or, disable Firefox’s disk cache entirely, and only rely on its own memory cache.[/li][/ul]

[li]Reduce Firefox’s Session Saving frequency (A positive integer indicating the number of milliseconds between session saving operations. (Default is 15000, or 15 seconds)). In about:config, set browser.sessionstore.interval to 300000 (30 seconds). I found this tip at How to Fix Annoying YouTube Jumpiness in Firefox[/li][li]Make certain to put /var on a spinning-disk type hard drive.[/li][/LIST]
One can further enhance their SSD experience by putting the scipt I wrote below into the /etc/init.d/boot.local file.


#! /bin/sh
#
#  /etc/init.d/boot.local
#
#  script with local commands to be executed from init on system startup
#
#  Here you should add things, that should happen directly after booting
#  before we're going to the first run level.
#

#  TuxBox Configuration
#  Definitions:
#  sda = SSD (/)
#  sdb = spinning disk storage (/home)
#  sdc = spinning disk storage (/var)


 ###############################################################################
#  **** Section for the SSD ****
#  =============================
#  Use the deadline scheduler
echo deadline > /sys/block/sda/queue/scheduler &
echo 0 > /sys/block/sda/queue/rotational &
echo 4 > /sys/block/sda/queue/iosched/writes_starved &

#  Stop disk activity being batched; not sensible on SSD.
#
#  fifo_batch    (number of requests)
#  ----------
#  
#  Requests are grouped into ``batches'' of a particular data direction (read or
#  write) which are serviced in increasing sector order.  To limit extra seeking,
#  deadline expiries are only checked between batches.  fifo_batch controls the
#  maximum number of requests per batch.
#  
#  This parameter tunes the balance between per-request latency and aggregate
#  throughput.  When low latency is the primary concern, smaller is better (where
#  a value of 1 yields first-come first-served behaviour).  Increasing fifo_batch
#  generally improves throughput, at the cost of latency variation.
echo 1 > /sys/block/sda/queue/iosched/fifo_batch &
echo 256 > /sys/block/sda/queue/nr_requests &

#  Disable using the SSD an a source for adding entropy to reduce the probability of creating weak 
#  encryption keys and weak passwords.
echo 0 > /sys/block/sda/queue/add_random &


###############################################################################
#  **** Section for the hard drive(s) ****
#  ====================================
#  At boot the disk IO scheduler is set to "deadline" for all disks to optimize
#  the speed of booting from the SSD.  Therefore, it is necessary to change the 
#  disk IO scheduler back to "cfq" for spinning disks to optimize their 
#  performance.
#
#  Set the disk IO scheduler to "cfq" scheduler for /home and /var.
echo cfq > /sys/block/sdb/queue/scheduler &
echo cfq > /sys/block/sdc/queue/scheduler &

#  Minimize the amount of writes to the SSD.  With about 2 years of using this command, I found it to be 
#  adequately safe.
echo 1500 > /proc/sys/vm/dirty_writeback_centisecs &

#  *** Sub-section for SMART ***
#  Enable SMART monitoring
smartctl -s on /dev/sda &
smartctl -s on /dev/sdb &
smartctl -s on /dev/sdc &

#  Enable SMART automatic offline test.  This causes SMART Attributes' data to 
#  be collected every 4 hours.
smartctl -s on /dev/sde &
smartctl -s on /dev/sdf &
smartctl -s on /dev/sdg &

#  Enable SMART autosave of device vendor-specific Attributes.
smartctl -s on /dev/sda &
smartctl -s on /dev/sdb &
smartctl -s on /dev/sdc &


###############################################################################
#  **** Section for Configuring Power Saving Details ****
#  ======================================================

#  The next section is only useful if laptop-mode is installed and enabled.
#  Do not use it on BlueBox
#
#  Enable the power aware CPU scheduler
#echo 1 > /sys/devices/system/cpu/sched_mc_power_savings

#  Enable SATA ALPM link power management
#
#  The next 4 commands only work in systems having an AHCI compatible SATA 
#  controler and use kernel > 2.6.24-rc2 (or use Kristen ALPM patchset)
#
#  Do not use the next 4 commands on BlueBox unless a new, appropriate SATA controller is installed.
#
#  This pair of commands will reduce SATA link power consumption, at the cost of increased access latency
#echo min_power > /sys/class/scsi_host/host0/link_power_management_policy
#echo min_power > /sys/class/scsi_host/host1/link_power_management_policy
#
#  This pair of commands will reduce SATA link access latency, at the cost of increased power consumption
echo max_performance > /sys/class/scsi_host/host0/link_power_management_policy
echo max_performance > /sys/class/scsi_host/host1/link_power_management_policy

#  Enable USB auto-suspend
for i in /sys/bus/usb/devices/*/power/autosuspend; do echo 1 > $i; done

#  Enable wlan power saving when the connection is idle
iwconfig wlan0 power timeout 500ms &

#  Disable Wake-on-LAN
ethtool -s eth0 wol d &

I hope you found my post helpful and enjoy your SSD for many years.

Hi
Nice read :slight_smile:

For my /tmp I set it to 5% of ram;


none /tmp tmpfs size=5% 0 0


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 12.2 (x86_64) Kernel 3.4.6-2.10-desktop
up 2 days 20:11, 5 users, load average: 0.00, 0.03, 0.05
CPU Intel i5 CPU M520@2.40GHz | Intel Arrandale GPU

[QUOTE=malcolmlewis;2488800]Hi
Nice read :slight_smile:

For my /tmp I set it to 5% of ram;


none /tmp tmpfs size=5% 0 0
 

Thanks malcolmlewis. :slight_smile:

In my opinion not specifying the percentage of memory used, nor the size of the tmpfs works better than setting a size limit, because “memory used by tmpfs grows and shrinks to accommodate the files it contains and…it supports swapping out less-used pages to swap space”. The quote is from:
tmpfs - Wikipedia, the free encyclopedia

By using tmpfs without specifying arbitrary limits I prevent problems that arise from having insufficient space, providing I do not exceed the size of 50% of physical memory plus the size of the swap partition. And, I get the benefit of increased access speed for items stored in tmpfs.

I have been running multiple systems with great success for years using tmpfs for /tmp without specifying size limits, and never exceeded the available space.