====== Optimizar Dell SAS Raid ====== ===== Introducción ===== Utilizando un servidor Dell: [[http://www1.euro.dell.com/content/products/productdetails.aspx/pedge_sc440?c=es&l=es&s=bsd&cs=esbsdt1|PowerEdge SC440]] Con RAID: [[http://www.lsi.com/storage_home/products_home/standard_product_ics/sas_ics/lsisas1068/index.html#EFI|LSI SAS 1068 PCI-X]] root@fastfoot-ng:~# lspci | grep -i SAS 02:08.0 SCSI storage controller: LSI Logic / Symbios Logic SAS1068 PCI-X Fusion-MPT SAS (rev 01) Y Sistema Operativo: Ubuntu Feisty Se ha detectado que el acceso a disco con el RAID activado es demasiado lento, así que ... buscado y buscando se ha conseguido mejorar el acceso a disco: [[http://www.tomasek.cz/software/SAS5iRperf/index.html]] [[http://www.tomasek.cz/software/dellstuff/]] Así que... ===== pre-Benchmark ===== root@maquina:~# sync ; time (dd if=/dev/zero of=bigfile count=1024 bs=1M; sync) 1024+0 registros de entrada 1024+0 registros de salida 1073741824 bytes (1,1 GB) copiados, 12,492 segundos, 86,0 MB/s real 0m48.029s user 0m0.000s sys 0m1.256s root@maquina:~# sync ; time (dd if=/dev/zero of=bigfile count=1024 bs=1M; sync) 1024+0 registros de entrada 1024+0 registros de salida 1073741824 bytes (1,1 GB) copiados, 12,2961 segundos, 87,3 MB/s real 0m50.405s user 0m0.008s sys 0m1.708s ===== Habilitando la Cache ===== Es tan simple como descargar **lsutil** [[http://www.tomasek.cz/software/dellstuff/lsiutil-1.38.tar.bz2]] Se descomprime, compila y ejecuta: root@maquina:~# cd /usr/local/src root@maquina:~# wget http://www.tomasek.cz/software/dellstuff/lsiutil-1.38.tar.bz2 root@maquina:~# tar jxvf lsiutil-1.38.tar.bz2 root@maquina:~# cd lsiutil root@maquina:~# make Lo ejecutamos: root@maquina:~# ./lsiutil LSI Logic MPT Configuration Utility, Version 1.38, July 6, 2005 1 MPT Port found Port Name Chip Vendor/Type/Rev MPT Rev Firmware Rev 1. /proc/mpt/ioc0 LSI Logic SAS1068 B0 105 00063200 Select a device: [1-1 or 0 to quit] Pulsamos **1** 1. Identify firmware, BIOS, and/or FCode 2. Download firmware (update the FLASH) 4. Download/erase BIOS and/or FCode (update the FLASH) 8. Scan for devices 10. Change IOC settings (interrupt coalescing) 13. Change SAS IO Unit settings 16. Display attached devices 20. Diagnostics 21. RAID actions 22. Reset bus 23. Reset target 30. Beacon on 31. Beacon off 97. Reset SAS phy 98. Reset SAS link 99. Reset port Main menu, select an option: [1-99 or e for expert or 0 to quit] Pulsamos **21** 1. Show volumes 2. Show physical disks 3. Get volume state 23. Replace physical disk 30. Create volume 31. Delete volume 32. Change volume settings RAID actions menu, select an option: [1-99 or e for expert or 0 to quit] Pulsamos **32** Volume: [0-1 or RETURN to quit] Pulsamos **0** Volume 0 Settings: write caching enabled, auto configure, priority resync Volume 0 draws from Hot Spare Pools: 0 Enable write caching: [Yes or No, default is No] Escribimos **Yes** Offline on SMART data: [Yes or No, default is No] Auto configuration: [Yes or No, default is Yes] Priority resync: [Yes or No, default is Yes] Hot Spare Pools (bitmask of pool numbers): [00 to FF, default is 01] RAID actions menu, select an option: [1-99 or e for expert or 0 to quit] Pulsamos **0**, hasta salir del programa. Listo, ya esta habilitada la cache. ===== post-Benchmark ===== root@maquina:~# sync ; time (dd if=/dev/zero of=bigfile count=1024 bs=1M; sync) 1024+0 registros de entrada 1024+0 registros de salida 1073741824 bytes (1,1 GB) copiados, 6,27473 segundos, 171 MB/s real 0m23.095s user 0m0.008s sys 0m1.728s root@maquina:~# sync ; time (dd if=/dev/zero of=bigfile count=1024 bs=1M; sync) 1024+0 registros de entrada 1024+0 registros de salida 1073741824 bytes (1,1 GB) copiados, 6,23949 segundos, 172 MB/s real 0m21.212s user 0m0.008s sys 0m1.688s La mitad de tiempo ;)