hello friends! new(ish)!

Talk:Storage devices

From InstallGentoo Wiki v2
Jump to navigation Jump to search

Title

Simply 'storage' or 'data storage' would have been a better fit IMO.

— Galactus (talk) 18:12, 29 February 2016 (EST)

'Storage devices' would make more sense though.  Morpheus talk 08:45, 1 March 2016 (EST)
you guys are welcome to change it, as long as the title relates to a piece of hardware that stores your data--Theredpikmin (talk) 10:23, 1 March 2016 (EST)

Do CDs fit in here? How about tape drives? Or flash drives? Or External hard drives? Would Storage Devices be better off as a category? My personal opinion is that we should just add them all to this page until it becomes unwieldy and then split it all up. Mrsnooze (talk) 02:48, 5 March 2016 (EST)

My original intention for main storage, such as HDD and SSD. So those two should stay at the top of the page. I have already added and external HD section to the page. If you want to add flash drives/cds etc, go for it. Perhaps put them in a separate sub-category on the page and label it something like "movable storage". --Theredpikmin (talk) 14:26, 5 March 2016 (EST)

I just divided the page between primary and secondary storage. Again, feel free to add any secondary storage devices that you wish.--Theredpikmin (talk) 14:50, 5 March 2016 (EST)

Wear leveling with ssds

if someone who is savvy with ssds can better discuss wear-leveling and life span of them, I would appreciate it.

In particular, if someone could discuss how to use an ssd in the best way (example: should I install programs on it, etc).

I am reading into the technology more and more, and if I find answers myself I will add them, but help is always appreciated. --Theredpikmin (talk) 10:13, 7 March 2016 (EST)

Depends on the type of cell used by the NAND flash (MLC, TLC, SLC, e-MMC, ...). You can generally look the endurance rating up for most SSD models online, including the real values, as opposed to what the brands claim.
As for what you said, it's generally recommended to use mechanical discs to store media. SSDs for the rest given how durable they have become. Cache is usually a non-issue due to the fact most programs actually store it in memory nowadays. Those that don't, can be forced to, by using a RAMdisk that copies the cache from disc to RAM, symlinks it, and then copies it back to the main drive every n seconds (Linux's anything-sync-daemon, for instance). — Galactus (talk) 10:29, 7 March 2016 (EST)
Would you mind explaining that in greater detail on the page under the ssd section?--Theredpikmin (talk) 11:43, 7 March 2016 (EST)
A bit tight on time, maybe next weekend if you can wait. — Galactus (talk) 11:58, 7 March 2016 (EST)
that's fine with me. I would appreciate it greatly because I am thinking about buying one o_o--Theredpikmin (talk) 12:02, 7 March 2016 (EST)
I have a question: why do you say SSDs are more stable in the 100-500GB range? What do you mean by stable? — Galactus (talk) 13:47, 7 March 2016 (EST)
From reading reviews, forums and guides around the web it seems that ssds above the 500GB limit break easier than the lower ones. I could be wrong but that seemed like the general consensus.--Theredpikmin (talk) 14:28, 7 March 2016 (EST)
Doesn't make a ton of sense since they are rated higher in terms of endurance, due to having more cells and just as many writes per cell. They also tend to have better flash controllers and are more likely to have MLC flash nand, which is better than TLC. — Galactus (talk) 14:44, 7 March 2016 (EST)

What I got so far

I made time and gathered some facts and tweaks. I won't beautify this though, that's why I'm posting it here. Nothing on dynamic and static wear levelling mechanisms. There's not really a point.

Wear levelling

Flash controllers manage the data stored on the flash memory by keeping track of the movement of data across segments in order to ensure erasures and re-writes are distributed evenly, preventing any one cell from reaching its write ceiling.
Generally speaking, more expensive models tend to have more expensive flash NAND, like MLC, as well as higher quality flash controllers*.
* Crucial being the exception to the rule, as their SSD lineup ONLY features MLC NAND flash whilst being affordable.

Tweaks

Disable hibernation as it not only is unstable, it will also result in lots of writes to one's SSD.
Enable TRIM
TRIM lets an OS know which SSD blocks are not being used and can be cleared. Not doing this will force the SSD to TRIM the space it wants to write to RIGHT before writing the data, every single time there's a block of non-indexed data (which is what happens when one deletes a file).
Create a cron job for trim
# echo -e "#\x21/bin/sh\\nfstrim -v /" | sudo tee /etc/cron.daily/trim
# chmod +x /etc/cron.daily/trim
Noatime mount option in fstab for every ext4 ssd partitions
noatime is a mount option in linux. noatime disables atime updates on the file system. By adding noatime, you greatly reduce SSD load which translates to longer SSD life and even performance gains.
Mount /tmp as tmpfs in /etc/fstab, if your kernel supports it

shm /dev/shm tmpfs nodev,nosuid,noexec 0 0

Make most apps cache to RAM
Those that don't support it by default, can be forced to, by using a RAMdisk that copies the cache from disc to RAM, symlinks it, and then copies it back to the main drive every n seconds (Linux's anything-sync-daemon, for instance).
Tweak 'Cache write to disk' in /etc/sysctl.conf to prevent wear
Increase cache
Low swapiness to avoid caching to disk, perhaps even 0 to fully disable swapping
vm.dirty_background_ratio = 10 // percentage of memory pages that still need to be written to disk, keep it somewhat low to prevent heavy disk I/O
vm.dirty_ratio = 60 // the percentage of total system memory to store dirty pages (lower means the kernel will flush dirty data to disk more often with smaller writes, and higher vm.dirty_ratio will allow kernel to flush dirty data to disk less often with bigger writes)
vm.dirty_writeback_centisecs = 500 // is how often the pdflush/flush/kdmflush processes wake up and check to see if work needs to be done
vm.dirty_expire_centisecs = 3000 // how many seconds something can be in cache before it needs to be written
vm.swappiness = 10
Cons to keeping things in the OS page cache in memory for longer is that you run an increased disk of data loss in case of an abrupt loss of power, as RAM is volatile.
Encryption support
Most SSDs offer builtin hardware encryption—supporting OPAL, the IEEE 1667 spec, SED (self-encrypting drives), and so on, depending on the brand and the SSD. Be careful when picking one based on this, as encryption is hard to implement properly.

— Galactus (talk) 15:21, 7 March 2016 (EST)

Amazing stuff! Do these commands work for those who use Windows operating systems? If so, can you describe the process of running the commands (like does it all work in the command prompt, etc).
I will let you (or another ssd savvy user) clean up the text and publish it, because I dont want to screw anything up. I appreciate your research. I think this information will benefit /g/ because people are always asking about ssds in the /sqg/'s (that is, if they read the wiki)--Theredpikmin (talk) 10:05, 8 March 2016 (EST)
No, you don't have that much power over windows, but to enable trim, you run fsutil behavior query DisableDeleteNotify. 0 means it's enabled, 1 means it's disabled. If it's disabled, you can run fsutil behavior set DisableDeleteNotify 0 to turn it on.
Someone only needs to rearrange the paragraphs and beautify it, no big deal. I'll do it later if I can. — Galactus (talk) 11:11, 8 March 2016 (EST)

Thank you so much for adding all of this information! This definitely benefits my build-in-progress. It should help others as well.--Theredpikmin (talk) 13:01, 21 March 2016 (EDT)

All fine and dandy. It's fun to talk about things you enjoy. — Galactus (talk) 09:07, 25 March 2016 (EDT)

Under linux-specific...

Should I keep the format as it is, or should I instead opt for something similar to what I did under TRIM and just remove the equal signs and instead indent each tweak as follows:

fstab tweaks

Use the noatime mount option in /etc/fstab for every ext4 SSD partitions. Noatime is a mount option in linux. which disables atime updates on the file system. By adding noatime to your fstab, you greatly reduce SSD load, which translates to longer SSD life and even performance gains.

Edit: I changed it. Willing to revert those changes if enough people disagree (or if you give me a good reason).

EDIT2: Regarding style, should I keep the extra paragraphs for what I think constitutes better readability (most subsections)?

Please respond :^] — Galactus (talk) 19:20, 26 March 2016 (EDT)

I havent been able to respond recently because of the recent spambot blocks. I say it's up to you, if you would like to add linux stuff go for it. Just be sure to label it accurately as linux-exclusive features, so your information doesnt confuse everyone else. Personally I am a casual-scum windows user and I dont know anything about linux, so I probably cant help you with any of the stuff you mentioned. --Theredpikmin (talk) 20:20, 26 March 2016 (EDT)
This is about style though, nothing to do with content. — Galactus (talk) 14:26, 27 March 2016 (EDT)
Well hey, again, I am totally down for more content. Do what you wish. Just as long as it is labelled appropriately as a linux thing. Can you do fstab tweaks on windows? Because that would be amazing if you could and should be included in the text. --Theredpikmin (talk) 21:01, 27 March 2016 (EDT)
For the last time, the content is ALREADY there. This is about style (more empty space vs less empty space, for the sake of readability). As for fstab, it's a Unix exclusive. It essentially tells the system which partitions to mount and what properties the filesystem should have. Windows doesn't support filesystems other than fat32, ntfs and that other one whose name I've forgotten, and it doesn't give you that much power over the filesystems that it does indeed support. — Galactus (talk) 21:40, 27 March 2016 (EDT)