informatica:linux:discos:benchmark
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
informatica:linux:discos:benchmark [2014/01/20 08:33] – [bonnie++] javi | informatica:linux:discos:benchmark [2015/04/13 20:19] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 4: | Line 4: | ||
Aqui se listan herramientas para analizar la velocidad de los discos y otro tipo de tests. | Aqui se listan herramientas para analizar la velocidad de los discos y otro tipo de tests. | ||
+ | |||
+ | ====== LBA ====== | ||
+ | |||
+ | Logical Block Address | ||
+ | |||
+ | ====== Sectores ====== | ||
+ | |||
+ | http:// | ||
+ | |||
+ | * Sector. 1 disco se divide en sectores. | ||
+ | * Tradicionalmente el tamanyo de cada sector era de 512 bytes, pero desde 2010 se han generalizado los discos de 4096 bytes por sector. | ||
+ | * Para mantener la compatibilidad, | ||
+ | * Para determinar el tamanyo de sectores fisico y logico: | ||
+ | < | ||
+ | sudo cat / | ||
+ | 4096 | ||
+ | sudo cat / | ||
+ | 512 | ||
+ | </ | ||
+ | Otro metodo: | ||
+ | < | ||
+ | sudo fdisk -l | egrep " | ||
+ | </ | ||
+ | Salida: | ||
+ | < | ||
+ | Disk /dev/md0 doesn' | ||
+ | Disk /dev/md1 doesn' | ||
+ | Disk /dev/sda: 1000.2 GB, 1000204886016 bytes | ||
+ | Sector size (logical/ | ||
+ | Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes | ||
+ | Sector size (logical/ | ||
+ | Disk /dev/md0: 983.2 GB, 983214915584 bytes | ||
+ | Sector size (logical/ | ||
+ | Disk /dev/md1: 16.8 GB, 16844193792 bytes | ||
+ | Sector size (logical/ | ||
+ | Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes | ||
+ | Sector size (logical/ | ||
+ | </ | ||
+ | En este caso se trata de uno de 4096 bytes. Los viejos son de 512 bytes | ||
+ | |||
+ | ===== Alineacion ===== | ||
+ | |||
+ | http:// | ||
+ | |||
+ | https:// | ||
+ | |||
+ | http:// | ||
+ | |||
+ | TODO: ver si es cierto o no que particiones no alineadas impactan en el rendimiento | ||
+ | |||
+ | * **SOLO** impacta negativamente, | ||
+ | * **Cada particion tiene que comenzar en un numero de sector divisible por 8** (relacion 4096 bytes fisico - 512 bytes logico) | ||
+ | * El impacto es **solo negativo en operaciones de escritura** | ||
+ | |||
+ | Con fdisk se puede alinear lanzando el siguiente comando cuando se particiona: | ||
+ | |||
+ | sudo fdisk -H 224 -S 56 /dev/sda | ||
+ | ====== Obtener IOPS ====== | ||
+ | |||
+ | http:// | ||
+ | |||
+ | IOPS = Input OutPut por Segundo | ||
+ | |||
+ | 1. Obtener el modelo de disco | ||
+ | |||
+ | 1.1. Obtener path: | ||
+ | |||
+ | sudo find /sys/ -type f -name " | ||
+ | |||
+ | Salida: | ||
+ | |||
+ | < | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | En este caso tengo dos discos. | ||
+ | |||
+ | 1.2. Ver contenido de ese path: | ||
+ | |||
+ | cat / | ||
+ | |||
+ | Salida: | ||
+ | |||
+ | ST1000DM003-1CH1 | ||
+ | |||
+ | 2. Copiar/ | ||
+ | |||
+ | [[http:// | ||
+ | | ||
+ | 3. Obtener los siguientes valores de la informacion del paso 2: | ||
+ | |||
+ | ^ Categoria ^ Unidades ^ Valor ^ Comentario ^ | ||
+ | | r.p.m. | r.p.m. | 7200 | Measured in revolutions per minute (RPM), most disks you'll consider for enterprise storage rotate at speeds of 7,200, 10,000 or 15,000 RPM with the latter two being the most common. A higher rotational speed is associated with a higher performing disk. This value is not used directly in calculations, | ||
+ | | Average seek, read | ms | 8.5 | The time (in ms) it takes for the hard drive' | ||
+ | | Average seek, write | ms | 9.5 | " | | ||
+ | | Average latency | ms | 4.16 | The time it takes for the sector of the disk being accessed to rotate into position under a read/write head. | | ||
+ | |||
+ | IOPS = 1/ | ||
+ | |||
+ | En mi caso: | ||
+ | |||
+ | < | ||
+ | IOPS = 1/(((8.5 / 1000) + (9.5 / 1000))/2 + (4.16 / 1000)) | ||
+ | IOPS = 1/((0.0085 + 0.0095)/2 + 0.00416) | ||
+ | IOPS = 1/(0.009 + 0.00416) | ||
+ | IOPS = 1/(0.01316) | ||
+ | IOPS = 75.99 | ||
+ | </ | ||
+ | |||
+ | Es decir, el disco es capaz de realizar **76 operaciones de lectura o escritura por segundo**. | ||
+ | |||
+ | ===== Penalizacion IOPS en RAID ===== | ||
+ | |||
+ | La siguiente tabla muestra el numero de IOPS que realiza un RAID en funcion del nivel y del tipo de operacion. | ||
+ | |||
+ | Por ejemplo para escribir sobre un RAID 1 se necesitan 2 IOPS. Por tanto el numero de IOPS calculado en el paso anterior se tiene que dividir por 2. | ||
+ | |||
+ | ^ RAID level ^ Read ^ Write ^ | ||
+ | | RAID 0 | 1 | 1 | | ||
+ | | RAID 1 (and 10) | 1 | 2 | | ||
+ | | RAID 5 | 1 | 4 | | ||
+ | | RAID 6 | 1 | 6 | | ||
====== Tests de rendimiento ====== | ====== Tests de rendimiento ====== | ||
Line 119: | Line 243: | ||
===== iostat ===== | ===== iostat ===== | ||
+ | |||
+ | http:// | ||
* Instalar en Debian: | * Instalar en Debian: | ||
Line 134: | Line 260: | ||
sda | sda | ||
</ | </ | ||
+ | |||
+ | ^ Campo ^ Explicacion ^ | ||
+ | | %user| Show the percentage of CPU utilization that occurred while executing at the user level (application). | | ||
+ | | %nice| Show the percentage of CPU utilization that occurred while executing at the user level with nice priority. | | ||
+ | | %system| Show the percentage of CPU utilization that occurred while executing at the system level (kernel). | | ||
+ | | %iowait| Show the percentage of time that the CPU or CPUs were idle during which the system had an outstanding disk I/O request. | | ||
+ | | %steal| Show the percentage of time spent in involuntary wait by the virtual CPU or CPUs while the hypervisor was servicing another virtual processor. | | ||
+ | | %idle| Show the percentage of time that the CPU or CPUs were idle and the system did not have an outstanding disk I/O request. | | ||
+ | | Device:| This column gives the device (or partition) name as listed in the /dev directory. | | ||
+ | | tps| Indicate | ||
+ | | Blk_read/s (kB_read/s, MB_read/s)| Indicate the amount of data read from the device expressed in a number of blocks (kilobytes, megabytes) per second. Blocks are equivalent | ||
+ | | Blk_wrtn/s (kB_wrtn/s, MB_wrtn/s)| Indicate the amount of data written to the device expressed in a number of blocks (kilobytes, megabytes) per second. | | ||
+ | | Blk_read (kB_read, MB_read)| The total number of blocks (kilobytes, megabytes) read. | | ||
+ | | Blk_wrtn (kB_wrtn, MB_wrtn)| The total number of blocks (kilobytes, megabytes) written. | | ||
+ | | rrqm/s| The number of read requests merged per second that were queued to the device. | | ||
+ | | wrqm/s| The number of write requests merged per second that were queued to the device. | | ||
+ | | r/s| The number (after merges) of read requests completed per second for the device. | | ||
+ | | w/s| The number (after merges) of write requests completed per second for the device. | | ||
+ | | rsec/s (rkB/s, rMB/s)| The number of sectors (kilobytes, megabytes) read from the device per second. | | ||
+ | | wsec/s (wkB/s, wMB/s)| The number of sectors (kilobytes, megabytes) written to the device per second. | | ||
+ | | avgrq-sz| The average size (in sectors) of the requests that were issued to the device. | | ||
+ | | avgqu-sz| The average queue length of the requests that were issued to the device. | | ||
+ | | await| The average | ||
+ | | r_await| The average time (in milliseconds) for read requests issued to the device to be served. This includes the time spent by the requests in queue and the time spent servicing them. | | ||
+ | | w_await| The average time (in milliseconds) for write requests issued to the device to be served. This includes the time spent by the requests in queue and the time spent servicing them. | | ||
+ | | svctm| The average service time (in milliseconds) for I/O requests that were issued to the device. Warning! Do not trust this field any more. This field will be removed in a future sysstat version. | | ||
+ | | %util| Percentage | ||
+ | |||
+ | |||
+ | |||
avgrq-sz: The average size (in sectors) of the requests that were issued | avgrq-sz: The average size (in sectors) of the requests that were issued | ||
En este caso es **60.27** | En este caso es **60.27** | ||
Line 167: | Line 323: | ||
sudo cat / | sudo cat / | ||
</ | </ | ||
+ | |||
informatica/linux/discos/benchmark.1390206826.txt.gz · Last modified: 2015/04/13 20:19 (external edit)