Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
devilOffline
Post subject: RE: Re: RE: SSD configuration  PostPosted: 18.03.2011, 10:49



Joined: 2010-08-26
Posts: 491
Location: Berlin
Status: Offline
if there is no mention of 6 Gbps, my guess is, the drive is not suited for it.
speed is all in the controllers, and as i said, SandForce 2xxx is the best controller on the market right now.
for 3 Gbps a SandForce 1xxx should be sufficient. that would have to be verified though by looking at real numbers.

greetz
devil
 
 View user's profile Send private message  
Reply with quote Back to top
finottiOnline!
Post subject:   PostPosted: 28.03.2011, 12:13



Joined: 2010-09-12
Posts: 312

Status: Online!
OK, I've got my new SSD and installed it this weekend. I haven't used my laptop much yet, but it seems really quick now. (Grub to KDM in about 13 seconds.)

FYI, I've used this tutorial:

https://wiki.archlinux.org/index.php/Solid_State_Drives

I cannot vouch for how accurate it is, but it matched things I've seen in other sites and was pretty complete. In particular, I've used gdisk to partition the SSD. (I did not follow the tips to minimize I/O writting, though.)

I did not put the "discard" option in fstab, though, as it seemed not be very stable, according to the wiki. Does any one have experience with that?

Thanks to all,

Luis
 
 View user's profile Send private message  
Reply with quote Back to top
IgnorantGuruOffline
Post subject:   PostPosted: 03.04.2011, 14:24



Joined: 2011-03-27
Posts: 43

Status: Offline
I've been using a OCZSSD2-1VTX30G for two years. I found that some of the changes I made for the ssd also made for a faster system in general.

Add commit=240 to fstab (this delays writing of data to the drive for up to 4 minutes, which could cause loss of data, but my system is stable and its never been a problem):
      Code:
/dev/sda1 /       ext3 noatime,errors=remount-ro,commit=240  0 1


Add to bottom of /etc/sysctl.conf:
      Code:
# reduce disk activity to 240 seconds
vm.dirty_ratio = 40
vm.dirty_background_ratio = 1
vm.dirty_writeback_centisecs = 24000


Add to rc.local:
      Code:
# Set sda to use deadline scheduler
echo deadline > /sys/block/sda/queue/scheduler
echo 1 > /sys/block/sda/queue/iosched/fifo_batch


After reboot check:
      Code:
cat /proc/mounts | grep commit
cat /proc/sys/vm/dirty_ratio
cat /proc/sys/vm/dirty_background_ratio
cat /proc/sys/vm/dirty_writeback_centisecs
cat /sys/block/sda/queue/scheduler
cat /sys/block/sdb/queue/scheduler
cat /sys/block/sda/queue/iosched/fifo_batch


And I mount some system folders to a ramdrive (also good for speed) in fstab:
      Code:
# For SSD:
tmpfs /var/log tmpfs defaults,noatime,size=200M,mode=0755 0 0
tmpfs /tmp tmpfs defaults,noatime,size=1000M,mode=1777 0 0


Those sizes may need to be adjusted for your purposes, but they work well for me. Also, I turn off swap.

I also setup a folder in /dev/shm for firefox (in rc.local or elsewhere), and in Firefox's about:config change:
browser.cache.disk.parent_directory = /dev/shm/firefox

If you use amule or deluge, or similar, it's good to move their home folders to a conventional hard drive if possible, as they write frequently.

It's good to check what other files may be written frequently. To see files changed in the last 3 minutes:
      Code:
find / -xdev -cmin -3


If your home folder is on another partition, check that too:
      Code:
find /home -xdev -cmin -3


Maybe not all of that is necessary with newer SSDs (I'm not up on the latest), but it doesn't hurt, makes the drive work faster for more years, and makes the system nice and fast. My drive is still working after 2 years of continuous operation, so that's a good sign.

_________________
Check out my blog for useful scripts, mods and tips...
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
diblOffline
Post subject:   PostPosted: 04.04.2011, 12:42



Joined: 2010-09-12
Posts: 302
Location: Dayton, Ohio, USA
Status: Offline
I have done a similar setup of /etc/fstab and /etc/sysctl.conf on my SSDs, and they are working well -- the EEE PC 4G/701 is running 2009-01 "ouranos" still.

However, here is one question for you:

      IgnorantGuru wrote:


Add commit=240 to fstab (this delays writing of data to the drive for up to 4 minutes, which could cause loss of data, but my system is stable and its never been a problem):
      Code:
/dev/sda1 /       ext3 noatime,errors=remount-ro,commit=240  0 1



What is the output of
      Code:
# mount
for your root filesystem?
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
IgnorantGuruOffline
Post subject:   PostPosted: 04.04.2011, 13:40



Joined: 2011-03-27
Posts: 43

Status: Offline
      dibl wrote:
What is the output of
      Code:
# mount
for your root filesystem?


Hey dibl, fancy meeting you here. Wink

      Code:
/dev/sda1 on / type ext3 (rw,noatime,commit=240,errors=remount-ro)
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
udev on /dev type tmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
tmpfs on /tmp type tmpfs (rw,noatime,size=1000M,mode=1777)
tmpfs on /var/log type tmpfs (rw,noatime,size=200M,mode=0755)


The only ones there which I modified are sda1, /tmp, and /var/log. I also tend to set commit=120 for my conventional drives (not shown), just to make them quieter.

_________________
Check out my blog for useful scripts, mods and tips...
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
diblOffline
Post subject:   PostPosted: 04.04.2011, 14:19



Joined: 2010-09-12
Posts: 302
Location: Dayton, Ohio, USA
Status: Offline
Interesting. I'm seeing a "commit=0" option being added to my ext4 mount lines, for some reason:

http://aptosid.com/index.php?name=PNphp ... amp;t=1072

I don't know when this started happening. I've still got a 2.6.36 and a 2.6.37, and it happens when I boot those kernels also. So I think you're booting a 2.6.37, and I don't see the "commit=0" option added on yours. I wonder what's up with my ext4 filesystem?


EDIT: I have found that the ext4 root partition is being re-mounted during the boot process:

      Code:
don@aptosidbox:~$ dmesg | grep remount
[   16.009772] EXT4-fs (sdb1): re-mounted. Opts: errors=remount-ro,barrier=0,discard
[   29.108894] EXT4-fs (sdb1): re-mounted. Opts: errors=remount-ro,barrier=0,discard,commit=0


and so this second remount is where the "commit=0" option is being appended to whatever I have in /etc/fstab for that partition (it happens to other ext4 partitions also).
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
IgnorantGuruOffline
Post subject:   PostPosted: 04.04.2011, 15:08



Joined: 2011-03-27
Posts: 43

Status: Offline
      dibl wrote:
and so this second remount is where the "commit=0" option is being appended to whatever I have in /etc/fstab for that partition (it happens to other ext4 partitions also).


That is strange - I haven't given ext4 a serious try yet. And yes I'm using the 37 kernel still.

I would try this:
      Code:
sudo grep -Rs "commit=" /etc /usr


This hit might be relevent - do you have power.d enabled?

      Code:
/usr/lib/pm-utils/power.d/journal-commit:   remount_fs $1 "commit=${2}"

_________________
Check out my blog for useful scripts, mods and tips...
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
diblOffline
Post subject:   PostPosted: 04.04.2011, 19:05



Joined: 2010-09-12
Posts: 302
Location: Dayton, Ohio, USA
Status: Offline
      IgnorantGuru wrote:


This hit might be relevent - do you have power.d enabled?


That was a good hint. There's no need for power.d on this desktop rig, but you are correct that there is a file at /usr/lib/pm-utils/power.d/journal-commit that provides a default commit=0 value for a change from battery to AC. But that one is not the source of the appended "commit=0" on my system. I changed the AC value in journal-commit and rebooted to be certain -- it is coming from somewhere else.
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
IgnorantGuruOffline
Post subject:   PostPosted: 04.04.2011, 19:14



Joined: 2011-03-27
Posts: 43

Status: Offline
      dibl wrote:
it is coming from somewhere else.


Well, you could always remount it (perhaps in rc.local?) Doesn't seem like it should be doing that though, so it would be good to know where it's coming from.

_________________
Check out my blog for useful scripts, mods and tips...
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
diblOffline
Post subject:   PostPosted: 04.04.2011, 20:01



Joined: 2010-09-12
Posts: 302
Location: Dayton, Ohio, USA
Status: Offline
      IgnorantGuru wrote:


Well, you could always remount it (perhaps in rc.local?)


Well, maybe ... funny thing, "mount -a" has also lost some of its mojo in recent times -- apparently it no longer parses the mount options in /etc/fstab. So I'll have to learn more about the mount command, I guess, and maybe try something like you suggested.


p.s. -- no "sudo" prefix on Debian commands (unless you deliberately re-wire it to use sudo). Wink
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
IgnorantGuruOffline
Post subject:   PostPosted: 04.04.2011, 20:19



Joined: 2011-03-27
Posts: 43

Status: Offline
      dibl wrote:
I guess, and maybe try something like you suggested.


This should do it, perhaps put it in rc.local:
      Code:
mount -o remount,commit=240 /dev/sda1


      Quote:
p.s. -- no "sudo" prefix on Debian commands (unless you deliberately re-wire it to use sudo). Wink


I use sudo to denote "do this command as root", but I need to find a better way, as some people do indeed not use sudo. What is the norm? Some preface root commands with "#" and users with "$", but I don't like that as # is a comment.

_________________
Check out my blog for useful scripts, mods and tips...
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
diblOffline
Post subject:   PostPosted: 04.04.2011, 20:26



Joined: 2010-09-12
Posts: 302
Location: Dayton, Ohio, USA
Status: Offline
Well ....

      Code:
root@aptosidbox:/etc# mount -o remount,commit=120 /dev/sdd1
root@aptosidbox:/etc# mount
/dev/sdd1 on / type ext4 (rw,noatime,errors=remount-ro,discard,barrier=0,commit=120,commit=120)


So, seeing the extra "commit=120" appended, I tried it this way:

      Code:
root@aptosidbox:/etc# mount -o remount /dev/sdd1
root@aptosidbox:/etc# mount
/dev/sdd1 on / type ext4 (rw,noatime,errors=remount-ro,discard,barrier=0,commit=120)


and THERE I have it mounted exactly as stated in /etc/fstab. But I'm so confused ... Sad

EDIT: It is possible that the AMI BIOS, and the BIOS's on the (a) PCI SSD and (b) the Marvel SATA 6GiB/s controller are interacting in some way during boot -- it's a complex setup for a desktop system and I don't pretend to understand every bit of the complexity that I have built here, although it generally works great.
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
IgnorantGuruOffline
Post subject:   PostPosted: 04.04.2011, 21:45



Joined: 2011-03-27
Posts: 43

Status: Offline
The double commit is odd - I can't explain that, but I get the same behavior here. According to man, remount "merges" options. At any rate, your solution looks like it works. I doubt the double option is a problem, but I don't know how to test if it's really working.

      Quote:
EDIT: It is possible that the AMI BIOS, and the BIOS's on the (a) PCI SSD and (b) the Marvel SATA 6GiB/s controller are interacting in some way during boot -- it's a complex setup for a desktop system and I don't pretend to understand every bit of the complexity that I have built here, although it generally works great.


I would more suspect something to do with ext4, but I don't know. Something is remounting it during the boot with options different than fstab. You could try temporarily disabling acpid to see if that's the culprit.

_________________
Check out my blog for useful scripts, mods and tips...
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
diblOffline
Post subject:   PostPosted: 04.04.2011, 22:30



Joined: 2010-09-12
Posts: 302
Location: Dayton, Ohio, USA
Status: Offline
Thanks for the help, IG. I'm going to settle, for now, since I'm able to remount it with my chosen options. I've got a feeling there is more information coming -- probably I just need to hang in for some weeks or months until the rest of the story comes out.

Thanks again! Smile
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
IgnorantGuruOffline
Post subject:   PostPosted: 05.04.2011, 12:02



Joined: 2011-03-27
Posts: 43

Status: Offline
My pleasure - "it doesn't have to be perfect". Smile

_________________
Check out my blog for useful scripts, mods and tips...
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 12 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by Zafenio