TRIM not working and /tmp to ram?

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

TRIM not working and /tmp to ram?

Postby jmsms » Nov 7th, '12, 05:03

Have agility3 ssd w/ win7 and Mageia2 with / and /boot on ssd(sda) and /var and /home on hdd (sdb). the correct setting for sata is in place in bios. my fstab is:

Code: Select all
# Entry for /dev/sda5 :
UUID=543f8c7c-9665-497e-a376-d57445e54630 / ext4 acl,noatime,nodiratime,discard 1 1
# Entry for /dev/sda6 :
UUID=84f0b424-022a-4aa1-9030-4102b783d373 /boot ext4 acl,noatime,nodiratime,discard 1 2
# Entry for /dev/sdb1 :
UUID=8c32f329-9e3c-440b-90a2-7cd4188d3462 /home ext4 acl,relatime 1 2
none /proc proc defaults 0 0
# Entry for /dev/sdb5 :
UUID=c3c06ce5-4413-4275-a63f-15ba54840a0f /var ext4 acl,relatime 1 2
# Entry for /dev/sdb7 :
UUID=16e3ebc5-12c7-4520-b154-e5022796cfd5 swap swap defaults 0 0
tmpfs   /tmp       tmpfs   defaults,noatime,mode=1777   0  0


when I am trying to run some tests for trim which involve creation of a file and checking the address and then deleting and sync and hdparm --read-sector (number) /dev/sda I never get zeros back, and similarly, when I run the script that is alluded to in other posts, I never get zeros back there either. If the discard parameter is there, why is it not working?
jmsms
 
Posts: 27
Joined: Aug 22nd, '11, 22:17

Re: TRIM not working and /tmp to ram?

Postby doktor5000 » Nov 7th, '12, 21:08

jmsms wrote:
Code: Select all
tmpfs   /tmp       tmpfs   defaults,noatime,mode=1777   0  0



If the test runs below /tmp, then it runs inside your RAM, not on the SSD.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18059
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: TRIM not working and /tmp to ram?

Postby jmsms » Nov 8th, '12, 20:36

I took out the tmpfs line and rebooted....I still have same result, do not get zeros back either with the small temporary file deletion or the script with the 120s delay. Should change parameters? when I had relatime and discard it didn't make any difference either. Any suggestion? AHCI is on in bios. should I just assume it is working and forget it if the settings are right? The only thing I can think of is that the firmware is not the very latest...It is from May 2012 and there is one more ocz fw out. I seriously hate to mess with updating it if do not require to since I have mostly set up with partitions and win7 setup and everything, but since Mageia is where I spend most of my time I will attempt as a last resort.
jmsms
 
Posts: 27
Joined: Aug 22nd, '11, 22:17

Re: TRIM not working and /tmp to ram?

Postby doktor5000 » Nov 9th, '12, 20:49

First try to find out if it would work under Windows, if not you probably need a new firmware.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18059
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: TRIM not working and /tmp to ram?

Postby jmsms » Nov 10th, '12, 00:15

Went ahead and flashed the newest fw 2.25 using ocz linux bootable updater media...after backup...really easy and without problems. in win7 device manager shows ahci controller active and the
fsutil behavior query DisableDeleteNotify indicates that trim is enabled. interestingly, there does not seem to be any other way posted online to actually test under windows. everything there that is written to frequently, such as temporary files, etc., profiles, etc., cache, etc. are moved to an ntfs partition on the hard disk. My linux home folder, swap partition are also on the hard disk instead of ssd. will tmpfs to ram when not running this test. current fstab

# Entry for /dev/sda5 :
UUID=543f8c7c-9665-497e-a376-d57445e54630 / ext4 discard,noatime 1 1
# Entry for /dev/sda6 :
UUID=84f0b424-022a-4aa1-9030-4102b783d373 /boot ext4 discard,noatime 1 2
# Entry for /dev/sdb1 :
UUID=8c32f329-9e3c-440b-90a2-7cd4188d3462 /home ext4 defaults 1 2
none /proc proc defaults 0 0
# Entry for /dev/sdb5 :
UUID=c3c06ce5-4413-4275-a63f-15ba54840a0f /var ext4 defaults 1 2
# Entry for /dev/sdb7 :
UUID=16e3ebc5-12c7-4520-b154-e5022796cfd5 swap swap defaults 0 0

These tests describe in several sites still do not give me zeros back after deletion of temp file, and the script type of test that give the 2 minute pause fails that, too. Any further suggestion? At some point, I have to get to the point of doing actual work on this machine, which at this point, is running very well and I am just astonished how fast w7 loads and M2 with kde runs..so far a pleasure to use, except for this. This ssd was purchased fairly cheaply, as in refurbished(ocz agility3) and was just trying to prolong its life for as long as possible. The combination that I have(asrock z77 pro 4/agility 3) I guess will not do trim under linux. Guess maybe by the time it deteriorates significantly(ntfs and ext4 partitions have much more empty space than filled space) I would be thinking about a better one anyway.

part of mount output ref to sda5
/dev/sda5 on / type ext4 (rw,noatime,user_xattr,barrier=1,data=ordered,discard)
jmsms
 
Posts: 27
Joined: Aug 22nd, '11, 22:17

Re: TRIM not working and /tmp to ram?

Postby doktor5000 » Nov 10th, '12, 15:59

Maybe you want to ping yankee495: viewtopic.php?p=26990#p26990
As it seems it is working for him, to maybe do some comparisons ...
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18059
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: TRIM not working and /tmp to ram?

Postby djennings » Nov 11th, '12, 12:26

Now you have me wondering if TRIM is working on my system too.

As an experiment I ran fstrim

Code: Select all
# fstrim -v /
/: 11342942208 bytes were trimmed


If TRIM was working in ext4 then surely it should have returned zero bytes. Hmmm

You can run fstrim in a cron job once a week to keep your partitions in trim.
User avatar
djennings
 
Posts: 613
Joined: Jun 2nd, '11, 23:51
Location: Wokingham, UK

Re: TRIM not working and /tmp to ram?

Postby djennings » Nov 11th, '12, 12:48

I ran the test described here http://techgage.com/article/enabling_and_testing_ssd_trim_support_under_linux/2/

and it confirmed that TRIM is working on my system. I have no idea though why fstrim managed to find something to trim.

One point you should check is whether your BIOS is set to use the hard drives in AHCI mode. Trim does not work in IDE mode.
User avatar
djennings
 
Posts: 613
Joined: Jun 2nd, '11, 23:51
Location: Wokingham, UK

Re: TRIM not working and /tmp to ram?

Postby rozwell69 » Nov 27th, '12, 23:06

@jmsms: TRIM doesn't seem to be working with firmware 2.25 on Agility 3.
For me:
    * 2.09 - TRIM didn't work
    * 2.15 - TRIM worked
    * 2.22 - TRIM worked
    * 2.25 - TRIM doesn't work
And IMHO it's a firmware issue.
Same test, same hardware, even same os, just different firmware versions and... different TRIM results.
And for some reason even fstrim doesn't clean those sectors (even when it returns that it trimmed a lot)

Check this thread for more info (if it's not yet deleted since OCZ removes many useful threads):
http://www.ocztechnologyforum.com/forum/showthread.php?106925-Agility-3-after-sleep-and-bringing-it-back-to-life
rozwell69
 
Posts: 2
Joined: Nov 27th, '12, 22:52

Re: TRIM not working and /tmp to ram?

Postby jmsms » Nov 28th, '12, 03:30

Yeah I had gone from 2.22 to 2.25 b/c trim didn't seem to work on 2.22 for me. I have followed a suggestion from another post here to run fstrim in a crontab periodically. I had sort of given up on it for now.
jmsms
 
Posts: 27
Joined: Aug 22nd, '11, 22:17

Re: TRIM not working and /tmp to ram?

Postby rozwell69 » Nov 28th, '12, 03:40

I'm not 100% that on 2.22 TRIM worked for me but hey, now matters that it doesn't work on 2.25, right?
Here is the thread I just created with our problem:
http://www.ocztechnologyforum.com/forum/showthread.php?107212-TRIM-doesn-t-work-on-Agility-3-with-2-25-firmware
Please register there and support me with the discussion ;)
rozwell69
 
Posts: 2
Joined: Nov 27th, '12, 22:52


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest