mete
2006-Oct-12 10:03 UTC
[zfs-discuss] zfs/raid configuration question for an application
Hi all, I am going to have solaris 06/06, a database (postgresql), application server (tomcat or sun app. server) on x86, 2GB with max. 3 scsi (hardware raid possible) disks. There will be no e-mail or file serving. The ratio of write/read operations to database is >=2 (and there is no other significant disk io). Block size of postgresql is default (I think it is 8K). Our application performance is bounded with database write (and then read) operations, so db write/read performance is important. I need redundancy in all over the system, not only for db data, but also os itself. Capacity efficieny is not that important (I can use full mirroring). Although I am not a sys.adm., I know some about raid levels and zfs, I want to ask your comments on disk configuration. Do you recommend mirroring or striping+some form of redundancy ? Specifically, raid 1 or raid 5 ? I am not going to use zfs as a root partition (since it is not possible in solaris officially yet), so I need some ufs partition. So, do you recommend me to use hardware raid or zfs ? If you recommend zfs, how can I configure it (I mean which disk/slice as zfs, and which disk/slice as ufs) since I only have 3 disks ? Thank you in advance. Mete This message posted from opensolaris.org
Anton B. Rang
2006-Oct-12 14:36 UTC
[zfs-discuss] Re: zfs/raid configuration question for an application
Mirroring will give you the best performance for small write operations. If you can get by with two disks, I?d divide each of them into two slices, s0 and s1, say. Set up an SVM mirror between d0s0 and d1s0 and use that for your root. Set up a ZFS mirror between d0s1 and d1s1 and use that for your data. Any 3-disk configuration would be significantly more awkward and waste some space. For mirroring in your situation, I would tend to avoid hardware RAID. You won?t be maxing out the controller rates so you won?t get much benefit. This message posted from opensolaris.org
mete
2006-Oct-12 14:56 UTC
[zfs-discuss] Re: zfs/raid configuration question for an application
Quite helpful, thank you. I think I should set the zfs mirror block size to 8K to match it with db, right ? and do you think I should create another zfs mirror for transaction log of pgsql ? or is this only useful if I create zfs mirror on a different set of disks but not slices ? Mete This message posted from opensolaris.org
Anton B. Rang
2006-Oct-12 21:45 UTC
[zfs-discuss] Re: zfs/raid configuration question for an application
Yes, set the block size to 8K, to avoid a read-modify-write cycle inside ZFS. As you suggest, using a separate mirror for the transaction log will only be useful if you''re on different disks -- otherwise you will be forcing the disk head to move back and forth between slices each time you write. This message posted from opensolaris.org
Robert Milkowski
2006-Oct-12 22:24 UTC
[zfs-discuss] Re: zfs/raid configuration question for an application
Hello Anton, Thursday, October 12, 2006, 11:45:40 PM, you wrote: ABR> Yes, set the block size to 8K, to avoid a read-modify-write cycle inside ZFS. Unfortunately it won''t help on 06/06 until patch is released to fix a bug (not to read old block if it''s "overwritten"). However it still is wise to do it (set to 8k) ''coz when patch will be released it could actually win some performance. ps. it''s fixed in snv for some time -- Best regards, Robert mailto:rmilkowski at task.gda.pl http://milek.blogspot.com
Since it is embedded into Solaris now, further improvements will be available by patching and we dont have to migrate to another update, right ? Two more things; 1) I know the benefits of ZFS, but I wonder if having ufs+zfs instead of only ufs on single disk mirroring (I mean there are two disks, one is mirror) configuration has real benefits (occam''s razor). Because, I usually see people are using it with many disks. 2) Regarding to SW Raid & HW Raid solutions, the only thing I understand is SW solutions may be implemented more efficiently due to talented OS engineers. Is there any other benefit of SW Raid over HW Raid or viceversa for mirroring ? HW Raid is quite transparent to OS, that is why I am questioning SW Raid. Thank you, your comments are really helpful to me. Mete This message posted from opensolaris.org
Anton B. Rang
2006-Oct-13 15:22 UTC
[zfs-discuss] Re: Re: zfs/raid configuration question for an
Most ZFS improvements should be available through patches. Some may require moving to a future update (for instance, ZFS booting, which may have other implications throughout the system). On most systems, you won?t see a lot of difference between hardware or software mirroring. The benefit of software mirroring is primarily that you don?t depend on a controller. ZFS gives the additional benefit that not only a failed disk block, but one which was written incorrectly, can be detected and recovered from the alternate side of the mirror. The benefit of hardware mirroring is twofold. First, the ?dirty map? can be maintained in fast hardware (e.g. NVRAM), which can reduce the amount of time that it takes to rebuild the mirror at startup and may slightly increase the speed of random writes. (ZFS uses a different technique to maintain consistency and does not need to rebuild its mirror after a crash, unlike SVM.) Second, you only move the data once across the host bus and disk controller, instead of twice, which on a heavily loaded system can increase your I/O throughput. This message posted from opensolaris.org