DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Installation and Upgrading

OpenBSD Installation and Upgrading Installing and upgrading OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 26th August 2014
spitfire_ak spitfire_ak is offline
Port Guard
 
Join Date: Aug 2014
Posts: 18
Default SSD Install

I have recently found information that OpenBSD does not support TRIM in SSD installs; however, I have not found any suggestions for any successful SSD install.

Are there any settings which would allow for an SSD install, or, is TRIM support the only answer? I have found a couple articles on personal journals detailing the setup of softraid and encrypted installs, but nothing on setup instructions specific to SSDs.
Reply With Quote
  #2   (View Single Post)  
Old 26th August 2014
jggimi's Avatar
jggimi jggimi is online now
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

http://marc.info/?l=openbsd-misc&m=136362941212173
http://marc.info/?l=openbsd-misc&m=133444791306493
http://www.tedunangst.com/flak/post/...ned-about-TRIM

SSD behave like any other drive, with the bonus of (compared with spinning magnetic media) producing less heat, consuming less electricity, consuming less physical space, and having 0 seconds of seek time.
Reply With Quote
  #3   (View Single Post)  
Old 27th August 2014
spitfire_ak spitfire_ak is offline
Port Guard
 
Join Date: Aug 2014
Posts: 18
Default

SSDs do behave like other drives; however, they should have special parameters given their limited lifespan; I ran one SSD on an OS that did not specifically support it and it died within a year. An exact duplicate one is still going in my wife's system which runs Linux, with a kernel built specifically for SSDs.
Reply With Quote
  #4   (View Single Post)  
Old 27th August 2014
jggimi's Avatar
jggimi jggimi is online now
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

My understanding of TRIM differs from yours. It is my understanding that TRIM impacts write operation performance, not lifespan. However, SSD onboard electronics may include "garbage collection" services that may reduce lifespan [1].

NAND memories require a delete operation of already written sectors before a new write operation can be executed. The TRIM commands shift this delete operation to a time other than during the write operation.

TRIM commands can be issued by filesystem drivers, such as during file deletions or during filesystem formmatting, or by user command such as with the Linux fstrim.

[1] http://en.wikipedia.org/wiki/Trim_%28computing%29
Reply With Quote
  #5   (View Single Post)  
Old 27th August 2014
jggimi's Avatar
jggimi jggimi is online now
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

Here's an article that describes how TRIM operations can effect garbage collection for NAND memories (SSD drives). While it ends with an advertisement for LSI technology, it is otherwise a fairly balanced primer.

http://www.thessdreview.com/daily-ne...Speed=noscript
Reply With Quote
  #6   (View Single Post)  
Old 27th August 2014
spitfire_ak spitfire_ak is offline
Port Guard
 
Join Date: Aug 2014
Posts: 18
Default

I'm not looking for TRIM support, really; I know that OpenBSD (as of 5.5) does not support TRIM functions.

However, I was looking for ways to reduce wear & tear on an SSD to extend life. For example, on my Linux systems I turn swappiness down to 10. I run 16GB of RAM and really do not need anything touching swap; however, I don't just get rid of it because of old habits, really.

Another example, for EXT4 and other journaling systems, I specify "noatime" in the fstab. There are other little tricks & settings to help reduce write/erase from the system to the disk.

Being new to OpenBSD, and with very few articles and absolutely no documentation at OpenBSD.org pertaining to this (that I could find at least), I was hoping somebody had experience in setting up systems with SSDs that could provide some help/answers/guidance.


Quote:
Originally Posted by jggimi View Post
My understanding of TRIM differs from yours. It is my understanding that TRIM impacts write operation performance, not lifespan. However, SSD onboard electronics may include "garbage collection" services that may reduce lifespan [1].

NAND memories require a delete operation of already written sectors before a new write operation can be executed. The TRIM commands shift this delete operation to a time other than during the write operation.

TRIM commands can be issued by filesystem drivers, such as during file deletions or during filesystem formmatting, or by user command such as with the Linux fstrim.

[1] http://en.wikipedia.org/wiki/Trim_%28computing%29
Reply With Quote
  #7   (View Single Post)  
Old 27th August 2014
spitfire_ak spitfire_ak is offline
Port Guard
 
Join Date: Aug 2014
Posts: 18
Default

A good Plextor SSD Knowledge article demonstrates many tips on extending SSD life.
Reply With Quote
  #8   (View Single Post)  
Old 27th August 2014
jggimi's Avatar
jggimi jggimi is online now
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

OK, that's a little different than your original question, which I interpreted to mean that you were concerned an SSD installation could not be successful. The goal is to minimize writes.

EXT4 has noatime. So does FFS. From mount(8):
Quote:
noatime
Do not update atime on files in the system unless the mtime or ctime is being changed as well. This option is useful for laptops and news servers where one does not want the extra disk activity associated with updating the atime.
Use softdep. Soft dependencies batch metadata write operations, which may also reduce the number of NAND pages being written. From mount(8):
Quote:
softdep
...Mount the file system using soft dependencies. Instead of metadata being written immediately, it is written in an ordered fashion to keep the on-disk state of the file system consistent. This results in significant speedups for file create/delete operations....
You've suggested eliminating swap. You could, but if you run out of RAM to allocate, the system will cease operating, with a variety of different possible failure modes.

I would retain swap, and monitor its use, even on a RAM-rich system, as I would want to be able to diagnose kernel failures should they occur, and swap is a necessary component of kernel dump acquisition. See crash(8).
Reply With Quote
  #9   (View Single Post)  
Old 30th August 2014
bsd-keith bsd-keith is offline
Real Name: Keith
Open Source Software user
 
Join Date: Jun 2014
Location: Surrey/Hants Border, England
Posts: 343
Default

I've been using SSD disks with various OSes, and all I do is disable swap and set noatime/relatime, not had any hint of any problems, (so far at least). I think the original problems with excess writes has been overcome by the manufacturers, and that we don't really need to do anything, but old habits do take some time to let go of.
__________________
Linux since 1999, & also a BSD user.
Reply With Quote
Old 30th August 2014
Oko's Avatar
Oko Oko is offline
Rc.conf Instructor
 
Join Date: May 2008
Location: Kosovo, Serbia
Posts: 1,102
Default

Quote:
Originally Posted by spitfire_ak View Post
I have recently found information that OpenBSD does not support TRIM in SSD installs; however, I have not found any suggestions for any successful SSD install.

Are there any settings which would allow for an SSD install, or, is TRIM support the only answer? I have found a couple articles on personal journals detailing the setup of softraid and encrypted installs, but nothing on setup instructions specific to SSDs.
You can install OpenBSD on SSD. I did about half a year ago on the server with 64 cores and 512 GB or RAM just to find out that
Code:
mv filename filename2
takes three minutes. I am guessing it had to do something with block aliments (by default OpenBSD start at 64) but I am not sure if even that will help. As much as I like OpenBSD network stack I would really like to see something like HAMMER(2) ported to it.
Reply With Quote
Old 30th August 2014
jggimi's Avatar
jggimi jggimi is online now
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

Oko, performance degradation from sector alignment issues occur when the device sector size is larger than what the device presents to the OS -- whether magnetic, spinning media or NAND (flash) device.

Excerpt from http://en.wikipedia.org/wiki/Advanced_Format regarding 4K devices that present 512 byte logical sectors, applicable to all sector/page sizes.
Quote:
The translation process is more complicated when writing data that is either not a multiple of 4K or not aligned to a 4K boundary. In these instances, the hard drive must read the entire 4096-byte sector containing the targeted data into internal memory, integrate the new data into the previously existing data and then rewrite the entire 4096-byte sector onto the disk media. This operation, known as read-modify-write (RMW), can require additional revolution of the magnetic disks, resulting in a perceptible performance impact to the system user. Performance analysis conducted by IDEMA and the hard drive vendors indicates that approximately five to ten percent of all write operations in a typical business PC user environment may be misaligned and a RMW performance penalty incurred....
Reply With Quote
Reply

Tags
ssd, trim support

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How - To install GNOME vile I install OpenBSD ? looop OpenBSD Installation and Upgrading 6 24th April 2010 08:58 PM


All times are GMT. The time now is 09:56 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick