[opensuse] SSD related questions
Hi listmates, Since kernel 2.6.34 the ssd related trim command is supported by the kernel. If I read things correct than the OS tells the ssd-device where the free space is. This looks to me as filesystem related action. Using a ssd disk raises the following questions. 1. If I make partitions on an ssd is the trim action bound to the partition or uses it the space of the whole device. What is influence of partitions on the trim command. 2. If I do device related actions, like dd if=disk of=ssd, is the trim functionality than active ? If not when are the unused blocks then erased ? When I mount the ssd after this action the OS doesn't know about the non used non erased blocks. Has somebody some expertice with this matter ? Thanks,Hans -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Tue, Aug 24, 2010 at 8:59 AM, Hans de Faber
Hi listmates,
Since kernel 2.6.34 the ssd related trim command is supported by the kernel.
Hans, I started a wiki page for SSD info: http://en.opensuse.org/SDB:SSD_discard/trim_support It is not comprehensive and I don't think it answers your questions, but it would be a good place to start accumulating knowledge. Feel free to update it.
If I read things correct than the OS tells the ssd-device where the free space is. This looks to me as filesystem related action.
In the 2.6.34 kernel, ext4 has a mount option that will cause discrete "unmap" calls to be made for each contiguous block range associated with a file being deleted. It has not yet proven to be a performance benefit, and thus is little used. hdparm has a userspace callable way that for now is much more optimal. See the wiki page for more info.
Using a ssd disk raises the following questions.
1. If I make partitions on an ssd is the trim action bound to the partition or uses it the space of the whole device. What is influence of partitions on the trim command.
All the implementations I have seen are filesystem specific and work at that level. Obviously those initiators are eventually turned into device level commands by the block layer of the kernel.
2. If I do device related actions, like dd if=disk of=ssd, is the trim functionality than active ?
No
If not when are the unused blocks then erased ?
Currently with the 2.6.34 kernel, you would need to use hdparm and the associated script.sh to scan your filesystem for freespace and trim it. The script is in oS 11.2 and 11.3 I believe, but you need to manually invoke it.
When I mount the ssd after this action the OS doesn't know about the non used non erased blocks.
In 2.6.36 or later a new ioctl is under "discussion" - fitrim(). It would tell the kernel to walk a filesystem tree and discard all unused ranges regardless of whether or not they had previously been trim'ed. ie. The kernel is not attempting to track the in-use / trimmed state of various blocks. In my opinion, the only real use case for fitrim() is when LVM / DM / MD block device stacking is in use. The script.sh / hdparm combo is not compatible with those because they remap the block addresses in a more complex way than script.sh addresses. My hope is that fitrim() will eventually grow the ability to more efficiently manage the unmap / trim process and at that point the script.sh / hdparm approach will no longer be needed.
Has somebody some expertice with this matter ? Thanks,Hans
Greg -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Tuesday 24 August 2010 09:54:14 Greg Freemyer wrote:
I started a wiki page for SSD info: http://en.opensuse.org/SDB:SSD_discard/trim_support
It is not comprehensive and I don't think it answers your questions, but it would be a good place to start accumulating knowledge. Feel free to update it.
SDB is right namespace for your article. It looks good for new article writer. I miss recommended articles. They are prerequisites to understand topic. It is good if they are present in the wiki, but if there is none, just link web page that explains topic. If there is only one article, then you can remove other 2 "Info page" links. Related articles is part that should expand readers knowledge about topic of your article. The priority is the same as with recommended, first our wiki, then web. Also you should remove superfluous "Related article" links. If there is more links with related or recommended reading then you can use classic Wikipedia sections: ==See also== for internal links, and ==External links== for (the name tells) Avoid slash (/) in the article or section title. ------------- In MediaWiki title is part of URL and slash in the URL has special meaning for browsers and download software. For instance wget will download your article as "trim_support" in directory "SDB:SSD_discard" :) Imagine that you want to reference section "11.2 / 11.3 Kernel support". URL is: http://en.opensuse.org/SDB:SSD_discard/trim_support#11.2_/_11.3_Kernel_suppo... In some namespaces we have enabled feature called subpages that is using slash to allow back links from subpage to main one, so "SDB:SSD_discard/trim_support" would be subpage of "SDB:SSD_discard", which may or may not make sense. In general, subpages are fine only for special use cases and Wikipedia that has much more experience then we are banned subpages from their main (information) namespace. I would move article to different title, if I would know what is relation between "SSD_discard" and "trim_support". Is it AND, or it is OR, or something else :) I suspect that title without slash will be: "SDB:SSD_discard and trim_support" but I'm not sure. ------------- Removed link to: [[Warning:This is my first new page on the new wiki. I have not idea if this is the right place for it. Please feel free to move it around in the new layout. I had been holding onto this info until the new wiki appeared.]] The syntax was for the link to non existing article, where the title is all text between [[ and ]]. You probably wanted: {{Warning|This ... }} Which will produce warning note. Such warning fits fine on discussion page, not the main. It is more message to wiki maintenance that you need help, but when it is on article discussion page only those that follow the topic will be aware of you message. It is better to use: http://en.opensuse.org/openSUSE:Wiki_team_message_board or opensuse-wiki@opensuse.org or http://forums.opensuse.org/english/community/opensuse-wiki-discussions/ -- Regards, Rajko -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Tue, Aug 24, 2010 at 10:34 PM, Rajko M.
On Tuesday 24 August 2010 09:54:14 Greg Freemyer wrote:
I started a wiki page for SSD info: http://en.opensuse.org/SDB:SSD_discard/trim_support
It is not comprehensive and I don't think it answers your questions, but it would be a good place to start accumulating knowledge. Feel free to update it.
SDB is right namespace for your article. It looks good for new article writer.
I miss recommended articles. They are prerequisites to understand topic. It is good if they are present in the wiki, but if there is none, just link web page that explains topic. If there is only one article, then you can remove other 2 "Info page" links.
Related articles is part that should expand readers knowledge about topic of your article. The priority is the same as with recommended, first our wiki, then web. Also you should remove superfluous "Related article" links.
If there is more links with related or recommended reading then you can use classic Wikipedia sections: ==See also== for internal links, and ==External links== for (the name tells)
Avoid slash (/) in the article or section title. ------------- In MediaWiki title is part of URL and slash in the URL has special meaning for browsers and download software. For instance wget will download your article as "trim_support" in directory "SDB:SSD_discard" :) Imagine that you want to reference section "11.2 / 11.3 Kernel support". URL is: http://en.opensuse.org/SDB:SSD_discard/trim_support#11.2_/_11.3_Kernel_suppo...
In some namespaces we have enabled feature called subpages that is using slash to allow back links from subpage to main one, so "SDB:SSD_discard/trim_support" would be subpage of "SDB:SSD_discard", which may or may not make sense. In general, subpages are fine only for special use cases and Wikipedia that has much more experience then we are banned subpages from their main (information) namespace.
I would move article to different title, if I would know what is relation between "SSD_discard" and "trim_support". Is it AND, or it is OR, or something else :) I suspect that title without slash will be: "SDB:SSD_discard and trim_support" but I'm not sure. -------------
Removed link to: [[Warning:This is my first new page on the new wiki. I have not idea if this is the right place for it. Please feel free to move it around in the new layout. I had been holding onto this info until the new wiki appeared.]]
The syntax was for the link to non existing article, where the title is all text between [[ and ]]. You probably wanted: {{Warning|This ... }} Which will produce warning note. Such warning fits fine on discussion page, not the main. It is more message to wiki maintenance that you need help, but when it is on article discussion page only those that follow the topic will be aware of you message. It is better to use: http://en.opensuse.org/openSUSE:Wiki_team_message_board or opensuse-wiki@opensuse.org or http://forums.opensuse.org/english/community/opensuse-wiki-discussions/
-- Regards, Rajko
Rajko, I tried to fix some of your issues. The new link is http://en.opensuse.org/SDB:SSD_discard_%28trim%29_support I added a terminology section right off the bat since you seemed confused by the difference between discard and trim. And I added 2 or 3 outside links. I don't know of anything internal to the opensuse wiki relevant. Greg -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Friday 27 August 2010 17:51:19 Greg Freemyer wrote: ...
Rajko,
I tried to fix some of your issues.
The new link is http://en.opensuse.org/SDB:SSD_discard_%28trim%29_support
The "(" and ")" is often used in titles of Wikipedia articles, so I assume that they found it as the best practice.
I added a terminology section right off the bat since you seemed confused by the difference between discard and trim.
I had no idea what is that before reading Terminology. Now that I have basic understanding I was able to make small changes to the article :) Section Terminology helped so much that I think to incorporate it in the article template itself, but as new article creation procedure needs more thoughts and work to make it comfortable for experienced writers and beginners, I will not add it right away. Chasing links that are listed in template Knowledge should provide same information, but having the shortest possible explanation of a terminology, used software (tools) and methods right in the article is a good writing style. Example is: Howto_setup_SUSE_as_SAMBA_PDC_with_OpenLDAP,_DYNDNS_and_CLAM ( http://tinyurl.com/24a9tyv ). It is obsolete, so it exists only in the old wiki, but I haven't seen easier to read article on complex topic like that.
And I added 2 or 3 outside links.
I don't know of anything internal to the opensuse wiki relevant.
The topic is highly specialized and even without checking wiki it is safe to assume that there is nothing relevant.
Greg
-- Regards, Rajko -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (3)
-
Greg Freemyer
-
Hans de Faber
-
Rajko M.