Re: Status of SSDs under Fedora ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2010-06-25 at 09:06 -0600, Linuxguy123 wrote:
> Update
> 
> I cloned my old conventional 160 GB hard drive onto a new Intel X25-M
> SSD using gparted.  In doing so, the new partitions ended up being ext3
> instead of ext4. 
> 
> The performance improvement is dramatic.  It boots super fast.   Even
> Evolution, which became a lethargic dog with the upgrade to F13, is
> snappy.  Its amazing how fast Firefox and Open Office Writer open.  
> 
> Life is good. 
> 
> I have not done any disk optimizations whatsoever.   Whatever the
> defaults are, that is what I am running. 
> 
> I did not perform any before and after tests, but I still have my old
> harddrive as a backup.  I could always swap it in and run some tests if
> they are needed. 
> 
Hi

Good news !

Note that AFAIK only ext4 supports the "discard" mount option

I did some test a few weeks ago (F12) comparing three disks at three
different record lengths. the speed of the SSD is amazing, particularly
for small record sizes
I used "iozone"

The values may be of interest for comparison purposes.

Also below is a crude perl script called by udev to "hotplug" mount
flash media with suitable options.

John

#########################################################################
Tests on 128GB C300, 320GB mech disk on SA76G2, 500GB mech disk on SD39P2
wiper had just been used on SSD

Test at three different record sizes on the three disks (SSD, 320GB mech, 500GB mech)
Max read speed 271MB/s !!!!

Record size 4kB
                                                  random  random    bkwd   record   stride
    KB  reclen   write rewrite    read    reread    read   write    read  rewrite     read
./iozone -I -a -s 100M -r 4  -i 0 -i 1 -i 2
102400       4   42055   52583    55890    54954   26799   52181
102400       4   19258   21196    24304    23742     652    1803
102400       4   25834   28541    28910    33310     709    1208

Record size 512kB
./iozone -I -a -s 100M -r 512  -i 0 -i 1 -i 2
102400     512  143871  145982   251266   251117  242780  150302
102400     512   50072   46744    49655    49226   30588   42982
102400     512   65458   63070    69130    72386   39537   49723

Record size 8192kB
./iozone -I -a -s 100M -r 8192 -i 0 -i 1 -i 2
102400    8192  151014  141913   271285   271318  272173  142116
102400    8192   49631   46920    45346    47126   47642   49456
102400    8192   66730   63931    68720    72078   69915   64087
------------------------------------------------------------------------
I also have a very crude perl script to set mount options and scheduler
settings when hot-plugging USB/eSATA(p) "flash sticks"/SSDs/"mech disks".
The script is called by udev to do the mount and Dolphin can be used
to umount the device.
It still has loads of diagnostic prints !
It can also be used at the command line (as root) to mount a partition
Use at your own risk !!

You need to defeat polkit before the script works !!!! 
SATA Disk Mounting F13
If a denial (polkit-gnome-authentication-agent-1) is given
examine "details" which shows the problem "Action"
nedit /usr/share/polkit-1/actions/org.freedesktop.udisks.policy  as required
Some or all of these changes are required
<action id="org.freedesktop.udisks.filesystem-mount-system-internal">
                <allow_any>yes</allow_any>
                <allow_inactive>yes</allow_inactive>
                <allow_active>yes</allow_active>
<action id="org.freedesktop.udisks.filesystem-unmount-others">
      <allow_any>yes</allow_any>
      <allow_inactive>yes</allow_inactive>
      <allow_active>yes</allow_active>
---------------------------------------------------------------------
Do NOT use as is - It MUST be checked against your requirements !
fuerte bin 8# cat sd_mount 
#!/usr/bin/perl
#Terrible script to control the mounting of "hotplug" usb and eSATA disks
#The following udev rules are currently associated with the script
#[root@milos ~]# cat /lib/udev/rules.d/81-aaja.rules 
#ACTION=="add", KERNEL=="sd*", SUBSYSTEM=="block", ENV{ID_FS_TYPE}=="ext3|ext4", RUN:="/root/sd_mount %k"
#If the device is an SSD
#1. The scheduler will be changed to "noop" if required
#2. If the partition is ext3 or ext4 the "noatime" mount option is set
#3. If the partition is ext4 and the disk supports TRIM the "discard" mount option is also set
#If the device is a hard disk then it is mounted "normally"
#An entry is made in /media/.hal-mtab to fool Thunar/Dolphin so that they will umount the partition
#Lists of the partition characteristics are defined later in this script (they should be in a /etc file!)

open(MESS,">/tmp/mess");
print MESS `date`;
$dev = $ARGV[0];
print MESS $dev,"\n";

# Is $0 a whole disk or a partition?
if ( "$dev" =~ /sd[a-g]/ ) {$disk = $dev;}
if ( "$dev" =~ /sd[a-g][0-9]/ ) {$disk = $dev;chop($disk);}
if ( "$dev" =~ /sd[a-g][0-9][0-9]/ ) {$disk = $dev;chop($disk);chop($disk);}
print MESS $dev,"   ",$disk,"\n";

#Pick up the Variables set by udev
$udev_envs = `/sbin/blkid -o udev -p /dev/$dev`;
@udev_envs = split(/\n/,$udev_envs);
#print MESS $udev_envs;
#print MESS $#udev_envs;
print MESS "\n\n";

#Create hash array for the variables
#Must be a better way!
for ($j = 0; $j <= $#udev_envs; $j++){
#       print MESS $udev_envs[$j];
        @line = split(/=/,$udev_envs[$j]);
        $keyy = $line[0];
        $vall = $line[1];                                                                                                                                                                   
        $env{"$keyy"} = $vall;                                                                                                                                                              
#       print MESS $keyy,"    ",$env{$keyy},"\n";                                                                                                                                           
        }                                                                                                                                                                                   
                                                                                                                                                                                            
#Find who is logged into the Console - Only one?                                                                                                                                            
$who = `w`;                                                                                                                                                                                 
print MESS $who;                                                                                                                                                                            
@lines = split (/\n/, $who);                                                                                                                                                                
#Skip the first line - it has ":" in it !                                                                                                                                                   
for ($j =1 ; $j <= $#lines; $j++){                                                                                                                                                          
#       Split on 1 or more white spaces
        @line = split (/\s+/, $lines[$j]);
#       Find line with :[0-9] in 2nd column
        if ( $line[1] =~ /\:\d/ ){
                print MESS "Console User is ",$line[0],"\n";
                $user = $line[0];
                }
        }

#Used instead of /etc/passwd as I use NIS (Use ypcat passwd?)
($uid,$gid)= (stat("/home/$user"))[4,5];
print MESS $uid,"  ",$gid,"\n";

$label = $env{"ID_FS_LABEL"};
$fstype = $env{"ID_FS_TYPE"};

#Partition lists for various Flash devices
#Set these as required
#Obviously the disk partitions MUST previously have been correctly labelled !!
#The use of UUIDs is also possible
@ssd_trim_list = qw(ssd1 ssd2 ssd3);
@ssd_non_trim_list=qw(blue_corsair1 corsair1 throttle);
@ssd_full_list = (@ssd_trim_list, @ssd_non_trim_list);

print MESS "full list ",@ssd_full_list," end\n";
$ssd_disk_type = "non_ssd";
foreach $j (@ssd_full_list){
        if ("$label" eq "$j"){ $ssd_disk_type = "ssd";}}

$supports_trim="false";
foreach $j (@ssd_trim_list){
        if ("$label" eq "$j"){ $supports_trim = "true";}}

print MESS "Disk type is ",$ssd_disk_type,"   Supports TRIM ",$supports_trim,"\n";

#Hard disk
if( "$ssd_disk_type" eq "non_ssd"){$options = "";}

#SSD with No TRIM support but ext3 or ext4
if( "$ssd_disk_type" eq "ssd" and $supports_trim eq "false" and ("$fstype" eq "ext3" or "$fstype" eq "ext4"))
        { $options = "-o noatime";}

#SSD with TRIM and ext4
if( "$supports_trim" eq "true" and "$fstype" eq "ext4")
        { $options = "-o noatime,discard";}

#SSD with TRIM and ext3
if( "$supports_trim" eq "true" and "$fstype" eq "ext3")
        { $options = "-o noatime";}

print MESS $label,"\n";
print MESS "Mount options are  ",$options,"\n";

#If the partition is on an SSD disk has the scheduler been configured?
if( "$ssd_disk_type" eq "ssd"){
        $command="cat /sys/block/"."$disk"."/queue/scheduler";
        $sched_now = `$command`;
        $sched_now =~ s/^.*\[//;
        $sched_now =~ s/\].*$//;
        print MESS "current setting is ",$sched_now,"\n";
        if( "$sched_now" ne "noop" ) {
                $command="echo noop > /sys/block/"."$disk"."/queue/scheduler";
                `$command`;
        }
}
#Create the mount point - it will be deleted by Thunar/Dolphin but not by Pcmanfm at present
mkdir ("/media/$label",0777);
chmod 0777,"/media/$label";
#Is this necessary ?
$no = chown $uid,$gid,"/media/$label";
#print MESS "No of files whose ownership was changed  ",$no,"\n";

#Just testing !
#($de,$ino,$mode,$nlink,$ui,$gi,$rdev,$size,$atime,$mtime,$blksiz,$blocks) = stat("/media/$label");
#print MESS $de,"  ",$ui,"\n";

#Mount the partition as required
`/bin/mount -t auto $options /dev/$dev /media/$label`;

#Change uid and gid of the mounted file system - delete as required!
$no = chown $uid,$gid,"/media/$label";
#print MESS "No of files whose ownership was changed  ",$no,"\n";

#Fool Thunar/Dolphin into thinking that hal did the mount
open(FRIG,">>/media/.hal-mtab");
print FRIG "/dev/".$dev."\t"."$uid\t"."$gid\t"."$fstype\t"."nosuid,nodev\t"."/media/".$label."\n";
close FRIG;
close MESS;
fuerte bin 9# 



-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines

[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux