CN107918528A - 一种提高linux系统固态硬盘性能的方法 - Google Patents
一种提高linux系统固态硬盘性能的方法 Download PDFInfo
- Publication number
- CN107918528A CN107918528A CN201711140594.6A CN201711140594A CN107918528A CN 107918528 A CN107918528 A CN 107918528A CN 201711140594 A CN201711140594 A CN 201711140594A CN 107918528 A CN107918528 A CN 107918528A
- Authority
- CN
- China
- Prior art keywords
- solid state
- hard disc
- state hard
- performance
- disk
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/0671—In-line storage system
- G06F3/0673—Single storage device
- G06F3/0679—Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/34—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
- G06F11/3409—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/061—Improving I/O performance
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Debugging And Monitoring (AREA)
Abstract
本申请发明一种提高linux系统固态硬盘性能的方法,通过对SSD磁盘最佳调度算法的验证、对最佳文件系统的验证、对CPU调频对性能影响进行考虑,将SSD的调度算法设定为noop,将SSD的文件系统设定为xfs,将CPU设置cpu为超频以及对磁盘参数优化设定,从而对linux系统固态硬盘性能进行改进。
Description
技术领域
本发明涉及服务器硬盘领域,具体涉及一种提高l inux系统固态硬盘性能的方法。
背景技术
固态硬盘相比传统的机械盘,具有更高的读写速度,更好的防震抗摔性,低功耗、无噪音、轻便以及工作温度范围大等优点,目前正在逐步替换传统硬盘。随着固态盘造价越来越低以及其自身的多种优点,各种计算机和服务器上将会有越来越多的固态硬盘取代传统机械盘。如何更大发挥固态盘的性能将是服务器性能指标需要考虑的一个重点。
现有的固态硬盘性能的优化方法,有些在实际的试验环境中不但没有使磁盘的性能得到提高,反而性能出现下降;通过分析现有技术所述的固态硬盘性能的优化方法,发现其中所涉及理论比较陈旧,没有使用最新的产品技术特点,主要缺点在于:首先,目前现有的优化手段过于陈旧,未考虑组raid对磁盘性能优化手段的影响,如TRIM技术会在组raid时失效;其次,现有的优化技术调度算法运用不合理,目前针对SSD的最佳调度算法应该是noop;再次,现有的优化技术文件系统采用不合理,目前对SSD性能最优的文件系统应当是xfs;最后,现有的优化技术未考虑CPU调频对磁盘性能的影响也未涉及具体调优参数。
针对现有技术存在的问题,本申请发明一种提高l inux系统固态硬盘性能的方法,能够对涉及组raid对SSD trim功能的影响及raid性能进行改进。
发明内容
本发明通过对SSD磁盘最佳调度算法的验证、对最佳文件系统的验证、对CPU调频对性能影响进行考虑以及对磁盘最佳性能参数进行分析整理,再使用hdparm对磁盘速率进行测定,从而设计一种提高l inux系统固态硬盘性能的方法。
具体实现思路为使用hdparm工具首先对磁盘速率进行测定,得到磁盘的基本读写理论值,为后续调优进行参照;
测试了对SSD磁盘最佳的采用的文件系统为xfs,及其相关挂载选项,使用vim/etc/fstab进行修改,具体挂载选项为:/dev/sdxX/data xfs rw,noat ime,inode64,allocize=16m 1 1;
测试了对SSD磁盘最佳的调度算法为noop,修改方式为:echo>noop/sys/block/sdX/queue/scheduler(默认值为deadl ine);
测定出对磁盘性能影响最大的一些系能参数,具体可使用head/sys/block/sda/{queue/{nr_requests,read_ahead_kb,nomerges,rotat ional,scheduler},device/queue_depth}命令查看,修改swappiness值;
分析了cpu瓶颈对磁盘性能的影响,若要磁盘达到最优的速度可设定/sys/devices/system/cpu/cpu0/cpufreq/scal ing_governor值为performance(默认值为powersave)。
具体地,本申请请求保护一种提高l inux系统固态硬盘性能的方法,其特征在于,该方法具体包括如下步骤:
将SSD的调度算法设定为noop;
将SSD的文件系统设定为xfs;
将CPU设置cpu为超频。
如上所述的提高l inux系统固态硬盘性能的方法,其特征还在于,选择磁盘改进具体的优化参数,将/proc/sys/vm/swappiness参数设定为10。
如上所述的提高l inux系统固态硬盘性能的方法,其特征还在于,对于组raid使用#echo value>/proc/sys/dev/raid/speed_l imit_min进行设定,使用blockdev--setra65535/dev/sdX设置每个raid设备的readahead。
具体实施方式
本申请发明的提高l inux系统固态硬盘性能的方法,通过使用l inux的hdparm工具对硬盘进行读取速度测定,连接磁盘性能优化前的基本速率,对后续磁盘性能优化提供参考;通过修改SSD磁盘挂载选项,涉及文件系统和挂载参数;通过分析验证对SSD磁盘最优的调度算法;通过对试验服务器对磁盘性能有效的具体参数进行设定测试,分析最有效参数值;通过分析cpu性能对磁盘性能的影响发明一种提高l inux系统固态硬盘性能的调优方法。
下面通过一个实施例对本发明所述的自动化测试具体实现步骤进行说明。
1、本发明使用hdparm对磁盘进行测速,具体使用hdparm–Tt/dev/sdx命令查看磁盘的读写速度;
使用vim/etc/fstab修改磁盘文件系统挂载选项,具体值为:/dev/sdxX/data xfsrw,noat ime,inode64,al locize=16m 1 1;
2、使用xfs,因为xfs对磁盘性能有提高,而且具备延迟分配,复杂的元数据预读算法等优点;
3、由于SSD盘无需磁盘寻道等操作,使用NOOP可以是更好的选择,因为NOOP调度程序使设备能够在l inux内部进行所有的IO调度,使用echo noop>/sys/block/sdX/queue/scheduler进行修改,默认值为deadl ine,该算法对磁盘性能有5%左右的提升;
4、针对磁盘改进具体的优化参数,可起到优化提升的作用。具体可用head/sys/block/sda/{queue/{nr_requests,read_ahead_kb,nomerges,rotat ional,scheduler},device/queue_depth}命令进行查看,使用echo命令进行修改;
对/proc/sys/vm/swappiness参数专门做下解释,vm.swappiness为不同值时的解析,0:内核酯交换一避免内存不足的情况;1:最小交换数量,而不完全禁用它,适用于内核版本3.5及更高版本,10:当系统存在足够的内存时,又是建议该值提高性能,60:默认值,100:内核将主动交换;
本发明将该参数值设定为10,对磁盘性能有一定的提高。
5、对于组raid使用#echo value>/proc/sys/dev/raid/speed_l imit_min进行设定,使用blockdev--setra 65535/dev/sdX设置每个raid设备的readahead。
6.使用echo performance>/sys/devices/system/cpu/cpu0/cpufreq/scal ing_governor值为performance(默认值为powersave);
设置cpu为超频可对磁盘性能有一定提高。
本发明通过分析具体的调度算法和文件系统对系统的影响,选择最优的调度算法和文件系统,对磁盘性能有大的提升;列举具体的优化参数,对具体的磁盘调优有指导意义;涉及raid的形况,此时RTRIM方式虽然失效,但本发明仍列出了raid时的优化方案。
显而易见地,上面所示的仅仅是本发明的一个具体实施方式,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据上述实施例获得其他的技术方案,以及在本发明保护的范围内做出的等同变化均应落入本发明的保护范围内,都属于本发明保护的范围。
综上所述,本发明所述的提高l inux系统固态硬盘性能的方法,能够有效地提高固态硬盘性能,极大地提高了服务器运行效率。
Claims (3)
1.一种提高linux系统固态硬盘性能的方法,其特征在于,该方法具体包括如下步骤:
将SSD的调度算法设定为noop;
将SSD的文件系统设定为xfs;
将CPU设置cpu为超频。
2.如权利要求1所述的提高linux系统固态硬盘性能的方法,其特征还在于,选择磁盘改进具体的优化参数,将/proc/sys/vm/swappiness参数设定为10。
3.如权利要求2所述的提高linux系统固态硬盘性能的方法,其特征还在于,对于组raid使用#echo value>/proc/sys/dev/raid/speed_limit_min进行设定,使用blockdev--setra 65535/dev/sdX设置每个raid设备的readahead。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711140594.6A CN107918528A (zh) | 2017-11-16 | 2017-11-16 | 一种提高linux系统固态硬盘性能的方法 |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711140594.6A CN107918528A (zh) | 2017-11-16 | 2017-11-16 | 一种提高linux系统固态硬盘性能的方法 |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107918528A true CN107918528A (zh) | 2018-04-17 |
Family
ID=61896554
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711140594.6A Pending CN107918528A (zh) | 2017-11-16 | 2017-11-16 | 一种提高linux系统固态硬盘性能的方法 |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107918528A (zh) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101727293A (zh) * | 2008-10-23 | 2010-06-09 | 成都市华为赛门铁克科技有限公司 | 一种固态硬盘ssd存储的设置方法、装置和系统 |
CN102521115A (zh) * | 2011-12-19 | 2012-06-27 | 浪潮电子信息产业股份有限公司 | 一种基于硬盘性能的数据资源预警方法 |
CN103268204A (zh) * | 2013-06-08 | 2013-08-28 | 北京百度网讯科技有限公司 | 固态硬盘的调优方法及装置 |
US20140351504A1 (en) * | 2013-05-23 | 2014-11-27 | Fujitsu Limited | Apparatus and method for transferring data between storages having different access speeds |
CN105224253A (zh) * | 2015-09-29 | 2016-01-06 | 浪潮电子信息产业股份有限公司 | 一种固态硬盘性能优化的方法 |
CN106406769A (zh) * | 2016-09-28 | 2017-02-15 | 郑州云海信息技术有限公司 | 一种提升固态硬盘在linux系统下IO性能的方法 |
-
2017
- 2017-11-16 CN CN201711140594.6A patent/CN107918528A/zh active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101727293A (zh) * | 2008-10-23 | 2010-06-09 | 成都市华为赛门铁克科技有限公司 | 一种固态硬盘ssd存储的设置方法、装置和系统 |
CN102521115A (zh) * | 2011-12-19 | 2012-06-27 | 浪潮电子信息产业股份有限公司 | 一种基于硬盘性能的数据资源预警方法 |
US20140351504A1 (en) * | 2013-05-23 | 2014-11-27 | Fujitsu Limited | Apparatus and method for transferring data between storages having different access speeds |
CN103268204A (zh) * | 2013-06-08 | 2013-08-28 | 北京百度网讯科技有限公司 | 固态硬盘的调优方法及装置 |
CN105224253A (zh) * | 2015-09-29 | 2016-01-06 | 浪潮电子信息产业股份有限公司 | 一种固态硬盘性能优化的方法 |
CN106406769A (zh) * | 2016-09-28 | 2017-02-15 | 郑州云海信息技术有限公司 | 一种提升固态硬盘在linux系统下IO性能的方法 |
Non-Patent Citations (1)
Title |
---|
IT_EXPERT: "比较全面的MySQL优化参考", 《百度文库 URL:HTTPS://WENKU.BAIDU.COM/VIEW/88539B61F8C75FBFC77DB2DA.HTML?FROM=SEARCH》 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9898341B2 (en) | Adjustable priority ratios for multiple task queues | |
JP3933027B2 (ja) | ディスクアレイ装置におけるキャッシュメモリ分割管理方式 | |
US8788764B2 (en) | Access controller for storage devices | |
TWI455022B (zh) | 提高處理器中渦輪加速模式之操作的電源效率之設備、方法及系統 | |
US9195409B2 (en) | Storage system with load balancing mechanism and method of operation thereof | |
US7895398B2 (en) | System and method for dynamically adjusting the caching characteristics for each logical unit of a storage array | |
US8793427B2 (en) | Remote memory for virtual machines | |
CN104461735B (zh) | 一种虚拟化场景下分配cpu资源的方法和装置 | |
US11087826B2 (en) | Storing method and apparatus of data | |
CN109032900B (zh) | 兼容多种类型的硬盘指示灯控制方法及系统 | |
KR102430934B1 (ko) | 서비스 하한 품질에 기초한 메모리 대역폭 스케줄링 | |
US11449230B2 (en) | System and method for Input/Output (I/O) pattern prediction using recursive neural network and proaction for read/write optimization for sequential and random I/O | |
CN104536902A (zh) | 一种测试服务器io子系统的性能调优方法 | |
US10310923B1 (en) | Probabilistic aging command sorting | |
US8527692B2 (en) | Data storage apparatus with a HDD and a removable solid state device | |
US10698826B1 (en) | Smart file location | |
Liu et al. | MLCache: A space-efficient cache scheme based on reuse distance and machine learning for NVMe SSDs | |
US10209749B2 (en) | Workload allocation based on downstream thermal impacts | |
US11429518B2 (en) | Paging in thin-provisioned disaggregated memory | |
CN107918528A (zh) | 一种提高linux系统固态硬盘性能的方法 | |
JP6721821B2 (ja) | ストレージ制御装置、ストレージ制御方法およびストレージ制御プログラム | |
CN102104614A (zh) | 一种数据访问方法及装置 | |
US20220222122A1 (en) | Model-based resource allocation for an information handling system | |
JP6900687B2 (ja) | ディスク制御装置、ディスク制御方法、および、ディスク制御プログラム | |
US9886209B2 (en) | Controlling file placement on a disk drive to improve file access |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20180417 |