LVM for a Database
We are in the process of building a database on a 4 processor 1.8GHz, 4GB RAM Dell 6650.
I am trying to figure out the most efficient way to use LVM for our raw data storage. We have a RAID array with 8x36GB drives in it. Should I do a raid 1+0(mirror 4 disks, and span them to get one logical volume)?
If so this leaves me a /dev/sdb. Or would I get better performance if I mirror 1 + 5, 2 + 6, 3 + 7, 4+ 8 to give me /dev/sd[b-e]. Is it possible to figure out where the center of our spindles are? So I can arrange for the heads to spend little time seeking?
Any perfomance hints would be greatly appreciated.
thanks
Joe K.
Quoted 4 lines
We are in the process of building a database on a 4 processor 1.8GHz, 4GB RAM Dell 6650.
I am trying to figure out the most efficient way to use LVM for our raw data storage. We have a RAID array with 8x36GB drives in it. Should I do a raid 1+0(mirror 4 disks, and span them to get one logical volume)?
This is a fast and easy setup.. But what will you use to the disks for? RAID 5 is generally fast and space efficient, though it can be slower on writes.
Quoted 2 lines
If so this leaves me a
/dev/sdb. Or would I get better performance if I mirror 1 + 5, 2 + 6, 3 + 7, 4+ 8 to give me /dev/sd[b-e]. Is it possible to figure out where the center of our spindles are? So I can arrange for the heads to spend little time seeking?
By mirroring pairs your would end up with 4 logical drives that you can use LVM (with striping if necessary) on top and have more freedom to replace and change drive setup (like if you want to replace a pair of disks for newer/bigger models).
I am not sure if LVM 1.x support changing size of striped volumes, but LVM 2 should have much freedom to do basically whatever you want (still in beta though). Disk spanning with LVM 1 is quite fast though, for most applications.
Quoted 5 lines
Any perfomance hints would be greatly appreciated.
thanks
Joe K.
What type of database?
Quoted 4 lines · Joseph Kezar
We are in the process of building a database on a 4 processor 1.8GHz, 4GB RAM Dell 6650.
I am trying to figure out the most efficient way to use LVM for our raw data storage. We have a RAID array with 8x36GB drives in it. Should I do a raid 1+0(mirror 4 disks, and span them to get one logical volume)?
I've never worked with an Oracle DBA that would favor this. "Spindles, spindles, spindles" they cry. Now, I realize that you're going to have 8 spindles no matter what.
Quoted 1 line
If so this leaves me a
/dev/sdb. Or would I get better performance if I mirror 1 + 5, 2 + 6, 3 + 7, 4+ 8 to give me /dev/sd[b-e].
If you have to do RAID for everything, then this would probably be most favored (easiest to optimize), but I know several DBAs that would prefer to use 8 independent disks, along with a good backup plan and "Oracle journal logs" for recovery. Of course, I'd probably do the RAID thing because I'm not a DBA :)
David Corbin
-- Joseph Kezar <[email protected]>
Quoted 11 lines
We are in the process of building a database on a 4 processor 1.8GHz, 4GB RAM Dell 6650.
I am trying to figure out the most efficient way to use LVM for our raw data storage. We have a RAID array with 8x36GB drives in it. Should I do a raid 1+0(mirror 4 disks, and span them to get one logical volume)?If so this leaves me a
/dev/sdb. Or would I get better performance if I mirror 1 + 5, 2 + 6, 3 + 7, 4+ 8 to give me /dev/sd[b-e]. Is it possible to figure out where the center of our spindles are? So I can arrange for the heads to spend little time seeking?
Any perfomance hints would be greatly appreciated.
(1) Use hardware RAID.
(2) RAID5 with a stripe == O/S I/O page size will avoid the
write penalty. This normally means using 4 drives with 1K chunk size or 8 with 1-page chunk.
(3) Striping across RAID5 stripes using a stripe size equal to the page (which is equal to the stripe) gives good performance by avoids write penalty and spreading the data over more devices and controllers (or SCSI at least chains). High-end RAID controllers (e.g., from Mylex) have multiple SCSI chains, which makes striping across the SCSI controllers a rather nice alternative.
RAID5 avoids loosing data; its performance if a drive fails will be pretty dismal even with hot spares. RAID1 avoids the performance penalty during failures and has the additional advantage of making "cold" backups from a split mirror. Price is doubling the storage cost.
For the best uptime results use RAID0+5 (mirrored drives grouped into RAID5 stripes). This allows up to 1/2 the drives to fail without any serious performance penalty (if you have lots of spare cash for drives).
Once the hardware RAID5 has been set up to spread the I/O out and avoid downtime, LVM is a rather nice choice for managing the space. At this point the RAID system is doing considerable work to spread out the I/O and buffer the data at multiple levels. This saves you from having to play games with cyl numbers for speed: just use the space and be done with it.
--
Steven Lembark 2930 W. Palmer
Workhorse Computing Chicago, IL 60647
+1 800 762 1582
Quoted 17 lines · Anders Widman
Quoted 4 lines
We are in the process of building a database on a 4 processor 1.8GHz, 4GB RAM Dell 6650.
I am trying to figure out the most efficient way to use LVM for our raw data storage. We have a RAID array with 8x36GB drives in it. Should I do a raid 1+0(mirror 4 disks, and span them to get one logical volume)?
This is a fast and easy setup.. But what will you use to the disks for? RAID 5 is generally fast and space efficient, though it can be slower on writes.
Quoted 2 lines
If so this leaves me a
/dev/sdb. Or would I get better performance if I mirror 1 + 5, 2 + 6, 3 + 7, 4+ 8 to give me /dev/sd[b-e]. Is it possible to figure out where the center of our spindles are? So I can arrange for the heads to spend little time seeking?By mirroring pairs your would end up with 4 logical drives that you can use LVM (with striping if necessary) on top and have more freedom to replace and change drive setup (like if you want to replace a pair of disks for newer/bigger models).
Quoted 4 lines
I am not sure if LVM 1.x support changing size of striped volumes, but LVM 2 should have much freedom to do basically whatever you want (still in beta though). Disk spanning with LVM 1 is quite fast though, for most applications.
LVM1 stripes are restricted to the physical volume. LVM2 doesn't have that constraint.
Using LVM1 is in general a good idea for databases, because you can relocate data later once you realize performance problems on certain spindels with pvmove(8).
pvmove is the only missing major feature in LVM2 (to be added ASAP). Smooth migration from LVM1 to LVM2 without loosing any VGs/LVs is possible.
Once pvmove is available on LVM2 that is the path to go.
Quoted 13 lines
Quoted 6 lines
Any perfomance hints would be greatly appreciated.
thanks
Joe K._______________________________________________
linux-lvm mailing list
[email protected]
http://lists.sistina.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
Signature · 15 lines
Regards,
Heinz -- The LVM Guy --
*** Software bugs are stupid.
Nevertheless it needs not so stupid people to solve them ***
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Heinz Mauelshagen Sistina Software Inc.
Senior Consultant/Developer Am Sonnenhang 11
56242 Marienrachdorf
Germany
[email protected] +49 2626 141200
FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-