Debian SSD ext4 4K 对齐

新入手了一台thinkpad, 原来的机械硬盘是500G的, 于是购入一块镁光的MX200 250G的SSD来新装debian stable(jessie)

1, 安装系统的之前按住F1进入bios后把模式改为AHCI. 2, 用U盘做的启动盘.版本是debian 8.1 AMD64 3, 安装系统的时候选择默认推荐分区,也就是一整块 4, debian8 默认是ext4 文件系统. 5, 装完后fdisk -lu 发现已经是4K对齐了.

root@debian:/home/tommy# fdisk -lu

Disk /dev/sda: 232.9 GiB, 250059350016 bytes, 488397168 sectorsUnits: sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 4096 bytesI/O size (minimum/optimal): 4096 bytes / 4096 bytesDisklabel type: dosDisk identifier: 0xa6c609e3

Device Boot Start End Sectors Size Id Type/dev/sda1 * 2048 499711 497664 243M 83 Linux/dev/sda2 501758 488396799 487895042 232.7G 5 Extended/dev/sda5 501760 488396799 487895040 232.7G 8e Linux LVMDisk /dev/mapper/debian–vg-root: 223.2 GiB, 239649947648 bytes, 468066304 sectorsUnits: sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 4096 bytesI/O size (minimum/optimal): 4096 bytes / 4096 bytesDisk /dev/mapper/debian–vg-swap_1: 9.5 GiB, 10150215680 bytes, 19824640 sectorsUnits: sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 4096 bytesI/O size (minimum/optimal): 4096 bytes / 4096 bytes原来内核>=2.6.3以后ext4就可以直接支持了.

测试下写入

#dd if=/dev/zero of=./largefile bs=1M count=10241024+0 records in1024+0 records out1073741824 bytes (1.1 GB) copied, 0.800335 s, 1.3 GB/s

#sh -c “sync && echo 3 > /proc/sys/vm/drop_caches”

#dd if=./largefile of=/dev/null bs=4k262144+0 records in262144+0 records out1073741824 bytes (1.1 GB) copied, 4.68755 s, 229 MB/s这写入速度,1.3GB/s, 读取的速度比较符合接入的是sata2的速度.

本文永久更新链接地址:

,这些那些,我们是多么的了然于心,却依然,没有任何办法。

Debian SSD ext4 4K 对齐

相关文章:

你感兴趣的文章:

标签云: