Optimized RAID 5 (small random read) for Backuppc

I am running a BackupPC server with hardware RAID 5, which is used as the primary storage for backups. Since the machine was created under a small budget, the controller is used for the PCI port 3Ware 9500S-4LP, and the drive is a 200 GB SATA type slow drive.

However, even with this hardware, the performance I see is far below expectations. Client and The backup server uses rsync as the transmission on the gigabit network and has never even approached saturation. It takes more than three hours to back up a normal Linux installation of about 5 GB.

So I use atop process monitor to monitor the server. It It shows that processor and memory usage are not important, but read access to RAID is the bottleneck.

When I built the server, I chose RAID 5, because according to this tabular overview of RAID characteristics, it seems to be The best compromise between read performance and space efficiency on a 4-port controller.

By the way, although this is a backup server, using rsync means that more content is read than written Import-currently about 1000 times. I think moving and linking old files in BackupPC’s old backup hierarchy will also help a lot.

So, how would you optimize the performance of this machine? I have the following tunable parameters:

>Use a different transfer from BackupPC (tar is another option)
>Change the file system of the array from ext4 (noatime) to something else
> Change the RAID level (preferably not due to data loss)
>Recreate the array with a different stripe size (preferably not due to data loss)
>Add more memory to use as buffer cache
> Add a second controller and more drives (yes, I have the ones around)
>Change the controller (due to financial constraints, preferably not)
>Change all drives (preferably not because of financial Limits)

This is a brief introduction to small random IO: 7200RPM disk drive is about 100 IOPS. 15k Twice the RPM drive, about 200 IOPS. With a RAID-5 array, the best IOPS that can be achieved is the number of data drive time single drive performance; because you have 3 data drives, the best sustained value you get is 300 IOPS.

Use iostat -mx while the backup is running 5. If you see many read or write operations in the 300 range (third and fourth columns), then you basically The setup can be completed.

Note: Most modern SSD drives have IOPS up to 20000. A pair of SSDs in RAID-1 can shame a rack full of rotating rust. SSD changes everything. Dang Yu When it comes to IOPS issues, 99% of the time the solution is called “SSD”.

If you are not currently maximizing the RAID array output, then you can do the following:

> Enhanced queue depth. The standard kernel queue depth is suitable for old single drives with small cache, but not for modern drives or RAID arrays:

echo 512> /SYS/block/SDA/queue/nr_requests
>Try different IO schedulers. CFQ (the default scheduler of modern kernels) often bad server operations:

echo’noop’> /SYS/block/SDA/queue/scheduling>Try RAID -10. In single-threaded operation, RAID-10 does not need to fold writes together and is better than RAID-5. >Or, try to run as many threads as data drives. It can improve overall performance.

< /div>

I am running a BackupPC server with hardware RAID 5, which is used as the primary storage for backups. Because the machine is on a small budget So the controller is a 3Ware 9500S-4LP for PCI port, and the drive is a slow drive of 200 GB SATA type.

However, even with this kind of hardware, I see The performance obtained is far below expectations. The client and backup server use rsync as the transmission on the Gigabit network, and it has never even been close to saturation. It takes more than three hours to back up a normal Linux installation of about 5 GB.

So I use atop process monitor to monitor the server. It shows that processor and memory usage are not important, but read access to RAID is the bottleneck.

When I built the server, I chose RAID 5. Because according to this tabular overview of RAID characteristics, it seems to be the best compromise between read performance and space efficiency on a 4-port controller.

By the way, although this is a backup server, use rsync means much more content is read than written-currently about 1000 times. I think moving and linking old files in BackupPC’s old backup hierarchy will also help a lot.

Then , How will you optimize the performance of this machine? I have the following tunable parameters:

>Use a different transfer from BackupPC (tar is another option)
>Change the file system of the array from ext4 (noatime) to something else
> Change the RAID level (preferably not due to data loss)
>Recreate the array with a different stripe size (preferably not due to data loss)
>Add more memory to use as buffer cache
> Add a second controller and more drives (yes, I have those around)
>Change the controller (due to financial constraints, preferably not)
>Change all drives (preferably not because of financial Limits)

This is a short introduction to random IO: 7200RPM disk drive is about 100 IOPS. 15k RPM drive is twice that, about 200 IOPS. Use RAID -5 array, the best achievable IOPS is the number of data drive time single drive performance; because you have 3 data drives, the best sustained value you get is 300 IOPS.

Use iostat -mx while the backup is running 5. If you see many read or write operations in the 300 range (third and fourth columns), then you can basically complete the setup.

Note : The IOPS of most modern SSD drives reaches 20000. A pair of SSDs in RAID-1 can make a rack full of spinning and rusty shame. SSD changes everything. When encountering IOPS problems, 99% of the time will be the solution Called “SSD”.

If you currently do not maximize the output of the RAID array, then you can do the following:

>Enhance the queue depth. The standard kernel queue depth is suitable for small Cached old single drive, but not suitable for modern drives or RAID arrays:

echo 512> /SYS/block/SDA/Queue/nr_requests
>Try different IO schedulers. CFQ (Modern Kernel’s default scheduler) often bad server operation:

echo’noop’> /SYS/block/SDA/queue/scheduling>Try RAID-10. In single-threaded operation, RAID-10 No need to fold writes together and is better than RAID-5.>Or, try to run as many threads as data drives. It can improve overall performance.

Leave a Comment

Your email address will not be published.