Tag Info

Hot answers tagged

59

If you worry about write cycles, you won't get anywhere. You will have data on your SSD that changes frequently; your home, your configs, your browser caches, maybe even databases (if you use any). They all should be on SSD: why else would you have one, if not to gain speed for the things you do frequently? The number of writes may be limited, but a modern ...


38

Linux automatically detects SSD, and since kernel version 2.6.29, you may verify sda with: cat /sys/block/sda/queue/rotational You should get 1 for hard disks and 0 for a SSD. See this answer for more information...


21

Ok, so the goal is to get as much bang for the buck as possible - Speed vs. the price of replacement hardware (assuming a single large harddisk and medium-size SSD, which seems to be the norm). To simplify you can to weigh how much you notice the speed increase from moving a file to the SSD against the number of sectors written to move that file to the SSD. ...


19

Naturally, you need to unmount any filesystems on the disk, and it'd be a good idea to deactivate any LVM groups (vgchange -an), and generally make sure nothing is using the disk for anything. Once you've done that, it should be safe to unplug. If you want to be extra cautious, do echo 1 > /sys/block/(whatever)/device/delete first. That'll unregister ...


15

Use smartctl to retrieve vendor information, sudo smartctl -a /dev/sdb If you see a line like this, Rotation Rate: Solid State Device That would be a SSD drive.


14

Bcache could be exactly what you're looking for: Bcache is a Linux kernel block layer cache. It allows one or more fast disk drives such as flash-based solid state drives (SSDs) to act as a cache for one or more slower hard disk drives. I'm eagerly awaiting its inclusion into Linux mainline, but unfortunately it's still not quite there. Some nice and ...


11

This has been a known issue for awhile. Using an SSD-tuned FS like Btrfs might help, but it might not. Ultimately, it is a bug in the IO scheduler/memory management systems. Recently, there have been some patches that aim to address this issue. See Fixed: The Linux Desktop Responsiveness Problem? These patches may eventually make their way into the ...


10

While it is true that all flash based storage devices have a limited number of writes before the transistor insulation breaks down, it's not as bad as before with wear leveling nowadays. Basically due to the fact that most modern SSD's employ wear leveling and are based on NandFlash, burning through a drive is not a problem like it used to be. You ...


9

There is no point in disabling logging because of SSD characteristics. SSD firmwares are even able to distribute repeated writes to the same sector 'wear leveling' - and the specified maximal write cycle count (for each sector) is quite high. For example Hitachi specifies its SSD drives for '10 full drive writes per day for five years'. As a vendor, you ...


8

Note: These are generalized instructions. Some comments below indicate that your specific distro may or may not have problems with you doing this. That is why the backup in step 4 is recommended. Format SSD. What file system to use on SSD is another question. Boot from a rescue CD and mount up both HD and SSD. rsync -avP /usr from HD to SSD. Move /usr to ...


7

bchache might be what you are looking for. It can act as write through or write back cache. ZFS and Btrfs also have features to put more often used blocks on flash storage.


7

In general you can just ignore fragmentation altogether. More so for SSD which do not suffer from seek times like HDD. Defragmenting a SSD will do nothing except waste write cycles. Although there may be extreme cases where fragmentation has a noticable effect, such as a sparse file written to in random order (as some BitTorrent clients do), or when the ...


6

If the SSD is to be your only disk platform, regardless of number of devices, then you have a quandry; how to minimize writes while maintaining reliability and performance. More specifically, ext4, and 3 for that matter, NILFS, and almost any other modern file system will maintain a journal. Ordinarily this is desirable, however, when dealing with SSD ...


6

I suggest using a different testing method. hdparm is a bit weird as it gives device addresses rather than filesystem addresses, and it doesn't say which device those addresses relate to (e.g. it resolves partitions, but not devicemapper targets, etc.). Much easier to use something that sticks with filesystem addresses, that way it's consistent (maybe except ...


5

There is none, and it really doesn't make sense anymore. ReadyBoost was useful for a short period of time when machines were RAM-limited, drives were slow, and flash was cheap. With RAM so cheap now, it makes much more sense to use RAM instead. Typical flash drives these days have write speeds of only about 5MB/s and read speeds of about 20MB/s. Compare ...


5

Pre-loading a movie to memory probably only matters for network streams or if you don't want your disk respinning. In any case you can try increasing cache size in your media player. With mplayer it can be achieved with following command. mplayer -cache <HUGE_NUMBER_IN_KILOBYTES> <VIDEO_FILE> Usually the problem with slow/choppy video is in ...


5

I'd strongly suggest getting more memory installed so that you are not swapping. Any swapping just KILLS the performance of a Linux or UNIX(tm) system. So install enough memory to stop the swap!


5

I would suggest you use udev to set parameters for the SSD disks. This way you can configure a specific queue scheduler that is more appropriate for SSD, etc. You can also apply parameters only to some of the devices, based on a lot of parameters. You can obtain the specific attributes necessary to match your devices (eg. the disk model and manufacturer) by ...


5

For ext4 the defragger is called e4defrag. (It's now part of the official e2fsprogs). There's also an fstrim command which should work on both ext4 and (I'd think) xfs. It sends discard requests for unused space on the filesystem. It could be particularly useful if your filesystem was not mounted with -o discard (i.e. sending discards for deleted files ...


5

Others have mentioned that defragementation might not have an effect on SSD. (I realize this is an old question, but I'd like to add context.) I'd like to advance a stronger version of the same argument: the concept of defragmentation doesn't make any sense for SSD at all. The SSD does not write sequential logical blocks to sequential blocks in flash; in ...


4

This is pretty easy, now that TRIM can pass through LVM to the underlying device(s). When you install, make sure your filesystems are all set to ext4. TRIM is not supported on ext3. After you install, login as root and edit /etc/fstab. In the fourth column (that usually reads defaults) add the keyword discard. Do this for both the / and /boot partitions, ...


4

I'm running btrfs on top of dm-crypt for a while now. Since btrfs is a multi-device capable and dynamic (grow, shrink etc) filesystem, I don't really need the LVM layer for my purposes. Other than that, use a recent enough dm-crypt that has --allow-discards capability, 3.1+ kernel and a filesystem that also allows discards (btrfs, ext*, ...). Some stuff to ...


4

Yes it is possible. You can first mount a tmpfs partition and then play your video file from there. I mount my /tmp partition in RAM since the contents do not need to be preserved between reboots and there are definite speed benefits. Here is my entry in my /etc/fstab which creates it on each boot: tmpfs /tmp tmpfs ...


4

The author of the article is selling snakeoil. While it is true that you will see a decrease in performance on an SSD if you do fully random small block ( 4k ) IO, this never happens in practice, even on Windows filesystems that are notorious for badly fragmenting themselves. The effect of fragmentation on an SSD is something on the order of 100-1000 times ...


4

I like hddtemp, which provides a pretty standard way of getting the temperature for supported devices. It requires SMART support though.


4

There is little essential difference between /tmp and /var/tmp in this regard. Step back a bit, though. It is by no means a settled question that you should avoid putting /tmp on an SSD. The earliest SSDs were subject to being worn out by excessive writes, but high quality modern SSDs have solved a lot of this. Partly they do this through wear leveling, and ...


4

In your first example, what I think you are referring to is the "Media Wearout Indicator" on Intel drives, which is attribute 233. Yes, it has a range of 0-100, with 100 being a brand new, unused drive, and 0 being completely worn out. According to your ouptut, this field doesn't seem to exist. In your second example, please read the official docs about ...


4

You're looking for fallocate's FALLOC_FL_PUNCH_HOLE. It's then up to the filesystem to discard/trim/unmap those blocks. I believe ext4 will do so. For example, you'd do something like this to discard 2MiB starting 1MiB in: err = fallocate(fd, FALLOC_FL_PUNCH_HOLE|FALLOC_FL_KEEP_SIZE, 1048576, 2097152); if (0 != err) { /* handle error */ } On success, ...


4

async is the opposite of sync, which is rarely used. async is the default, you don't need to specify that explicitely. The option sync means that all changes to the according filesystem are immediately flushed to disk; the respective write operations are being waited for. For mechanical drives that means a huge slow down since the system has to move the ...


3

Those two sections are for different things. The first is for unplugging. The second is for plugging. For unplugging, the OS will sync the data during the unmount operation. Thus, if the disk is unmounted (assuming you in fact do have full hardware support) you can power off the disk then unplug it without risk of data loss or corruption. For plugging, ...



Only top voted, non community-wiki answers of a minimum length are eligible