SSD Trim Support -- 保护 SSD
今天同事告诉我,换了 ssd 之后需要做以下配置能使 ssd 寿命更长。原理是配置系统定期清理和回收 ssd 的资源。
最终效果:

步骤:
1、下载 trim enabler: https://gist.github.com/return1/4058659
2、解压后内容如下:
#
# Original version by Grant Parnell is offline (http://digitaldj.net/2011/07/21/trim-enabler-for-lion/)
# Update July 2014: no longer offline, see https://digitaldj.net/blog/2011/11/17/trim-enabler-for-os-x-lion-mountain-lion-mavericks/
#
# Looks for "Apple" string in HD kext, changes it to a wildcard match for anything
#
# Alternative to http://www.groths.org/trim-enabler-3-0-released/
# Method behind this madness described: http://forums.macrumors.com/showthread.php?t=1409151&page=4
# See discussion in comments here: https://www.macupdate.com/app/mac/39654/lion-tweaks
# And here: http://forums.macrumors.com/showthread.php?t=1410459
# And here: http://forums.macrumors.com/showthread.php?t=1480302
#
# Yosemite: for recovering from stop sign on boot screen, please see http://www.cindori.org/update-on-trim-in-yosemite/ # backup patched file
sudo cp /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage.original # For Yosemite you have to disable driver signature check
sudo nvram boot-args="kext-dev-mode=1" # !for Yosemite only! please reboot after settings the boot-args!
sudo shutdown -r now # for Yosemite, Mavericks 10.9.5 and 10.9.4 (thanks Tobi)
sudo perl -pi -e 's|(^\x00{1,20})[^\x00]{9}(\x00{1,20}\x54)|$1\x00\x00\x00\x00\x00\x00\x00\x00\x00$2|sg' /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage # !for Yosemite only! rebuild kext cache manually (could take a while)
sudo kextcache -m /System/Library/Caches/com.apple.kext.caches/Startup/Extensions.mkext /System/Library/Extensions # for Mavericks and Mountain Lion from 10.8.3 to 10.9.3
#sudo perl -pi -e 's|(\x52\x6F\x74\x61\x74\x69\x6F\x6E\x61\x6C\x00{1,20})[^\x00]{9}(\x00{1,20}\x54)|$1\x00\x00\x00\x00\x00\x00\x00\x00\x00$2|sg' /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage # for Mountain Lion from 10.8.1 to 10.8.2 and Lion 10.7.5
#sudo perl -pi -e 's|(\x52\x6F\x74\x61\x74\x69\x6F\x6E\x61\x6C\x00{1,20})[^\x00]{9}(\x00{1,20}\x4D)|$1\x00\x00\x00\x00\x00\x00\x00\x00\x00$2|sg' /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage # for Mountain Lion 10.8.0 and Lion 10.7.4 BELOW
#sudo perl -pi -e 's|(\x52\x6F\x74\x61\x74\x69\x6F\x6E\x61\x6C\x00{1,20})[^\x00]{9}(\x00{1,20}\x51)|$1\x00\x00\x00\x00\x00\x00\x00\x00\x00$2|sg' /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage sudo touch /System/Library/Extensions/ # now reboot!
sudo shutdown -r now
3、Terminal 输入:
1) 修改此文件属性 "chmod 777 该 .sh 文件保存路径"
2) 运行"该 .sh 文件路径",只时候电脑会自动重启。
3) 重启后,注释掉 .sh 文件的前三行,已经执行了的语句。再运行一次该 .sh 文件,电脑会再执行一次重启操作。
4、打开磁盘工具优化磁盘的使用:

SSD Trim Support -- 保护 SSD的更多相关文章
- 关于SSD Trim功能
TRIM指令是微软联合各大SSD厂商所开发的一项技术,属于ATA8-ACS规范的技术指令. TRIM是告诉NAND闪存固态存储设备要擦除哪些数据的SATA接口指令.当相关页面的数据可以被覆盖时,操 ...
- Yosemite 升级后第三方SSD TRIM失败不能进入系统处理
no zuo no die, 这把手欠升级到了Yosemite, 然后发现原来在Mavericks里已经激活的TRIM在这里不行了, 又提示trim enable软件不适于此版本. 然后,悲剧就开始了 ...
- SSD trim及4k对齐
trim可以帮助减小SSD的写放大WA问题,删除文件后不仅仅是将文件标记为删除,而是在SSD空闲的时候统一进行删除. Linux下的trim支持叫discard,修改fstab文件,在挂载参数中加上d ...
- SSD TRIM
SSD 在操作方式上与传统磁性驱动器不同,并且它们需要在软件上另行处理以达到功能优化.-- Don Watkins 编译自: https://opensource.com/article/17/1/s ...
- 保护SSD,设置Chrome浏览器临时文件夹到ramdisk分区
很多用低端/山寨SSD的朋友都用Ramdisk来保护硬盘,一般都把系统temp目录和IE浏览器临时文件夹目录设到Ramdisk分区了. 最近用谷歌的chrome浏览器,发现浏览网页时候硬盘灯 ...
- Vmware Vsan 部署中如何将非SSD 硬盘标识为SSD
通过SSH 登录ESXi主机 # esxcli storage nmp device list #查询ESXI 发现的存储设备 # esxcli storage nmp satp rule add ...
- Linux判断SSD或HDD + 模拟SSD
判断方法 方法一 判断cat /sys/block/*/queue/rotational的返回值(其中*为你的硬盘设备名称,例如sda等等),如果返回1则表示磁盘可旋转(HDD),返回0,则表示磁盘不 ...
- CentOS7 vs centos6
The CentOS Project has announced general availability of CentOS-7, the first release of the free Lin ...
- SSD 固态硬盘,Trim指令 ,查看状态、开启、关闭
一说到SSD 固态硬盘,经常会看到Trim指令这个名词,那什么是Trim? Trim是什么? 为了解决硬盘降速的问题,微软联合各大SSD厂商开发了一个新技术——Trim.Trim指令也叫disab ...
随机推荐
- 使用Java判断字符串中的中文字符数量
Java判断一个字符串str中中文的个数,经过总结,有以下几种方法(全部经过验证),可根据其原理判断在何种情况下使用哪个方法: 1. char[] c = str.toCharArray(); for ...
- [转]odoo常用openerp-server.conf配置参数详解
参数 说明 用法 addons_path addons模块的查找路径,多个路径用逗号分隔 addons_path = E:\GreenOdoo8.0\source\openerp\addons csv ...
- 使用 CUDA范例精解通用GPU编程 配套程序的方法
用vs新建一个cuda的项目,然后将系统自动生成的那个.cu里头的内容,除了头文件引用外,全部替代成先有代码的内容. 然后程序就能跑了. 因为新建的是cuda的项目,所以所有的头文件和库的引用系统都会 ...
- ORACLE用户创建&删除
●sqlplus登陆sqlplus sys/isc@testgmmc as sysdba●创建用户create user testpoi3 IDENTIFIED by iscaccount unloc ...
- 移动WEB前端开发资源整合
meta篇 1.视窗宽度 <meta name="viewport" content="width=device-width,initial-scale=1.0,m ...
- pyhon 模块与库
引用“http://www.iplaypython.com/module/” 引用“http://codingnow.cn/language/265.html” Python模块是什么? 玩蛇网:一个 ...
- 操作jQuery
==================================== $('img').each(function(){ this.alt='This is image['+n+'] with a ...
- log4php的配置
网上关于log4php配置的文章很多,下面是我的配置,跟网上部分略有不同 (1)添加日志 1.下载log4php,到官网就可以下载到,下载后解压 我的版本是log4php_2.3.0 ...
- About_类与对象
所谓类,就是把具有相同行为,特征的归为一类: 1)什么是面向对象: 起初,“面向对象”是专指在程序设计中采用封装.继承.抽象等设计方法.可是,这个定义显然不能再适合现在情况.面向对象的思想已经涉及到软 ...
- 李洪强经典面试题145-Runloop
李洪强经典面试题145-Runloop Runloop 什么是 Runloop? 从字面上讲就是运行循环. 它内部就是do-while循环,在这个循环内部不断地处理各种任务. 一个线程对应一个Ru ...