Can somebody kindly clarify as to how Solaris and ZFS makes use of RAM? I have 4 gig of RAM installed on my Solaris/ZFS box serving a pool of 6 disks. I can see that it is using all of this memory, although the machine has never had to dip into swap space. What would be the net effect of adding more RAM? Would it just use all of that RAM and pretty much accomplish nothing, or will adding more RAM increase the size of my buffers and provide me with faster I/O that gets backlogged less frequently? How can I really tell whether my machine is RAM starved? -- This message posted from opensolaris.org
The following is a good explanation: http://blogs.sun.com/brendan/entry/test -Moazam On Sun, Oct 24, 2010 at 10:42 AM, besson3c <joe at netmusician.org> wrote:> Can somebody kindly clarify as to how Solaris and ZFS makes use of RAM? > > I have 4 gig of RAM installed on my Solaris/ZFS box serving a pool of 6 disks. I can see that it is using all of this memory, although the machine has never had to dip into swap space. > > What would be the net effect of adding more RAM? Would it just use all of that RAM and pretty much accomplish nothing, or will adding more RAM increase the size of my buffers and provide me with faster I/O that gets backlogged less frequently? How can I really tell whether my machine is RAM starved? > -- > This message posted from opensolaris.org > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss >
So, to paraphase this, if with these various I/O tests and tools it is determined that disks are suffering from latency issues, adding RAM or an L2ARC will help, and there is really no drawback of doing one or the other as both will be used as available. So, it''s just a question of to what extent to feed the seemingly insatiable beast until it is satiated? Would it be safe to say that given the price of RAM and its performance that it would be best to start with adding RAM until it is maxed out or close to being maxed out, particularly if you have the RAM slots (as I do)? Is it also accurate to say that this is all relevant to read speeds and not write speeds? Still, by improving read speeds you''d provide ceiling room for the drives, and in doing so increase write speeds as well. Correct? -- This message posted from opensolaris.org
On Sun, 24 Oct 2010, besson3c wrote:> So, to paraphase this, if with these various I/O tests and tools it > is determined that disks are suffering from latency issues, adding > RAM or an L2ARC will help, and there is really no drawback of doing > one or the other as both will be used as available. So, it''s just a > question of to what extent to feed the seemingly insatiable beast > until it is satiated?Zfs is just a big cache. Once the cache is large enough to hold the "working set" there should be hardly any reads to the disks.> Would it be safe to say that given the price of RAM and its > performance that it would be best to start with adding RAM until it > is maxed out or close to being maxed out, particularly if you have > the RAM slots (as I do)?That would depend on your budget. Given a sufficient budget, it is usually good to install lots of RAM since then the system will be fastest.> Is it also accurate to say that this is all relevant to read speeds > and not write speeds? Still, by improving read speeds you''d provide > ceiling room for the drives, and in doing so increase write speeds > as well. Correct?This is mostly true except that adding RAM can substantially improve write speeds as well. With sufficient RAM, overlapping writes may be coalesced (or even eliminated due to redundant writes) and the writes may be better optimized to disk layout so that the pool is more healthy and efficient. Zfs will buffer up to 30 seconds of async writes on systems with sufficiently large RAM and fast I/O. Bob -- Bob Friesenhahn bfriesen at simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer, http://www.GraphicsMagick.org/