Обсуждение: Raid 10 settings for optimal postgres performance?
I have just configured our disks to raid10 from raid5.
The raid 10 is now 6 drives giving us 750G use by OS and postgres.
What is the preferred setup for postgres concerning cache settings on the controller and disks and the preferred block size allocated for the disks when postgres uses block size 8192?
df -h
/dev/sda3 750G 65G 647G 10% /
/dev/sda1 496M 17M 454M 4% /boot
show all;
server_version | 8.4.2
block_size | 8192
Controller settings
Read-cache mode - Enabled
Write-cache mode - Enabled (write-back)
Write-cache setting - Enabled (write-back) when protected by battery
Stripe-unit size : 256 KB
Disk setting
Write Cache : Disabled (write-through)
Postgresql.conf
fsync = on # turns forced synchronization on or off
#synchronous_commit = on # immediate fsync at commit
wal_sync_method = fsync # the default is the first option
Logical drive number 1
Logical drive name : RAID10
RAID level : 10
Status of logical drive : Okay
Size : 858000 MB
Read-cache mode : Enabled
Write-cache mode : Enabled (write-back)
Write-cache setting : Enabled (write-back) when protected by battery
Partitioned : Yes
Number of segments : 6
Stripe-unit size : 256 KB
Stripe order (Channel,Device) : 0,0 0,1 0,2 0,3 0,4 0,5
Defunct segments : No
Defunct stripes : No
Device #0
Device is a Hard drive
State : Online
Supported : Yes
Transfer Speed : SAS 3.0 Gb/s
Reported Channel,Device : 0,0
Vendor : IBM-ESXS
Model : ST3300655SS
Firmware : BA26
World-wide name : 5000C5000A42EFAC
Size : 286102 MB
Write Cache : Disabled (write-through)
FRU : None
PFA
Sincerely,
Chris
Stay in touch. Get Messenger on your phone now.
The raid 10 is now 6 drives giving us 750G use by OS and postgres.
What is the preferred setup for postgres concerning cache settings on the controller and disks and the preferred block size allocated for the disks when postgres uses block size 8192?
df -h
/dev/sda3 750G 65G 647G 10% /
/dev/sda1 496M 17M 454M 4% /boot
show all;
server_version | 8.4.2
block_size | 8192
Controller settings
Read-cache mode - Enabled
Write-cache mode - Enabled (write-back)
Write-cache setting - Enabled (write-back) when protected by battery
Stripe-unit size : 256 KB
Disk setting
Write Cache : Disabled (write-through)
Postgresql.conf
fsync = on # turns forced synchronization on or off
#synchronous_commit = on # immediate fsync at commit
wal_sync_method = fsync # the default is the first option
Logical drive number 1
Logical drive name : RAID10
RAID level : 10
Status of logical drive : Okay
Size : 858000 MB
Read-cache mode : Enabled
Write-cache mode : Enabled (write-back)
Write-cache setting : Enabled (write-back) when protected by battery
Partitioned : Yes
Number of segments : 6
Stripe-unit size : 256 KB
Stripe order (Channel,Device) : 0,0 0,1 0,2 0,3 0,4 0,5
Defunct segments : No
Defunct stripes : No
Device #0
Device is a Hard drive
State : Online
Supported : Yes
Transfer Speed : SAS 3.0 Gb/s
Reported Channel,Device : 0,0
Vendor : IBM-ESXS
Model : ST3300655SS
Firmware : BA26
World-wide name : 5000C5000A42EFAC
Size : 286102 MB
Write Cache : Disabled (write-through)
FRU : None
PFA
Sincerely,
Chris
Stay in touch. Get Messenger on your phone now.
Chris Barnes wrote:
You already have the right cache settings: write-back when protected by battery, write cache on disks disabled. And there aren't any interesting settings to change for block of stripe size on a RAID10 array that do anything you'll be able to measure. You're done with controller and disk setup.
Looks like a standard ext3 filesystem under Linux, right? Next you should run tests with bonnie++ to make sure the array is performing as expecting.
What is the preferred setup for postgres concerning cache settings on the controller and disks and the preferred block size allocated for the disks when postgres uses block size 8192?
Controller settings
Read-cache mode - Enabled
Write-cache mode - Enabled (write-back)
Write-cache setting - Enabled (write-back) when protected by battery
Stripe-unit size : 256 KB
Disk setting
Write Cache : Disabled (write-through)
You already have the right cache settings: write-back when protected by battery, write cache on disks disabled. And there aren't any interesting settings to change for block of stripe size on a RAID10 array that do anything you'll be able to measure. You're done with controller and disk setup.
Looks like a standard ext3 filesystem under Linux, right? Next you should run tests with bonnie++ to make sure the array is performing as expecting.
-- Greg Smith 2ndQuadrant US Baltimore, MD PostgreSQL Training, Services and Support greg@2ndQuadrant.com www.2ndQuadrant.us