Solaris Priority Paging and Database products.
Posted in 1999
Someone asked whether enabling Solaris priority paging (which keeps executable pages resident and pages out data pages first) actually improves database performance. No single definitive answer emerged. Replies clarified it arrived with Solaris 7, backported to 2.6 via patch 105181-09, and only matters when memory is tight/page scanning is high. Reported experience: minor gains (one site ~5-10%, not Sun's claimed 10-300%), with real wins coming from fixing bad SQL joins and tuning fsflush; advice included clearing execute bits on data files and using forcedirectio for cooked-file databases. One poster warned it isn't universally beneficial.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Performance & Tuning, Platform-Specific Issues
A quick question - has anyone implemented priority paging on Solaris and noticed a performance change with their database product? If so, I shall be very interested to hear any conclusions reached! I have done some testing, but due to certain factors formed no firm ideas, other than "it *should* be a good thing". Richard Yates. -- Erratic news-swerver! :. post+e-mail to be sure I get your msg. The Open University is not responsible for content herein, which may be incorrect and is used at reader's own risk.
In article <37D77F35.6D53E6A3@open.ac.uk>, r.j.yates@open.ac.uk (Richard Yates) wrote: > A quick question - has anyone implemented priority paging on Solaris > and noticed a performance change with their database product? If so, > I shall be very interested to hear any conclusions reached! I have > done some testing, but due to certain factors formed no firm ideas, > other than "it *should* be a good thing". > > Richard Yates. > -- > Erratic news-swerver! :. post+e-mail to be sure I get your msg. > > The Open University is not responsible for content herein, which > may be incorrect and is used at reader's own risk. > Turn it on, it's been there since Solaris 2.4, the entire memory paging sub-system was new in Solaris 2.4. By default it's turned off Paul Watson # I don't suffer from WF Software Ltd. # stress, I'm just Tel. (+44) 1436 674729 # a carrier Fax. (+44) 1436 678693 # www.wfsoftware.com
In article <37D77F35.6D53E6A3@open.ac.uk>, Richard Yates <r.j.yates@open.ac.uk> wrote: > A quick question - has anyone implemented priority paging on Solaris > and noticed a performance change with their database product? If so, > I shall be very interested to hear any conclusions reached! I have > done some testing, but due to certain factors formed no firm ideas, > other than "it *should* be a good thing". I haven't personally turned it on in anything. My feeling is that it shouldn't make any difference. If it does make any difference at all, it will be at really low memory situations, where your pagescan rate is approaching 100 pages/sec. (You can see your pagescan rate through sar - g or vmstat.) But when you think about it, Solaris's existing default paging algorithm should be more than adequate at keeping pages in memory that it really needs and discarding pages that it doesn't. I was actually a little surprised to see Solaris advertised with this new paging scheme when it seemed to me that the existing scheme was already quite adequate. But you know the old marketing trick for cars, if there isn't at least a new grill changed from the previous year, you won't make a sale. Yousuf Khan Sent via Deja.com http://www.deja.com/ Share what you know. Learn what you don't.
In article <memo.19990909150136.6371D@wfsoftware.compulink.co.uk>, paulw@wfsoftware.co.uk wrote: > In article <37D77F35.6D53E6A3@open.ac.uk>, r.j.yates@open.ac.uk (Richard > Yates) wrote: > > > A quick question - has anyone implemented priority paging on Solaris > > and noticed a performance change with their database product? If so, > Turn it on, it's been there since Solaris 2.4, the entire memory paging > sub-system was new in Solaris 2.4. By default it's turned off Are you sure that priority paging has been in there since 2.4? My impression was that it was new with Solaris 7, they backgrafted it into 2.6 with one kernel patch, and they are either working on or have already implemented a backgraft to 2.5.1 on one of its kernel patches. But I haven't heard of such a patch for kernels 2.4 or 2.5. Are we talking about the same thing, by the way? Priority paging is the new Solaris feature where it attempts to lock all executable pages into memory and page only data pages out, before trying to page out executable pages. Before Solaris would simply page out based on least- recently used pages. Yousuf Khan Sent via Deja.com http://www.deja.com/ Share what you know. Learn what you don't.
In article <7r8vv5$rbl$1@nnrp1.deja.com>, ykhan@my-deja.com (Yousuf Khan) wrote: > In article <memo.19990909150136.6371D@wfsoftware.compulink.co.uk>, > paulw@wfsoftware.co.uk wrote: > > In article <37D77F35.6D53E6A3@open.ac.uk>, r.j.yates@open.ac.uk > (Richard > > Yates) wrote: > > > > > A quick question - has anyone implemented priority paging on Solaris > > > and noticed a performance change with their database product? If so, > > Turn it on, it's been there since Solaris 2.4, the entire memory > paging > > sub-system was new in Solaris 2.4. By default it's turned off > > Are you sure that priority paging has been in there since 2.4? My > impression was that it was new with Solaris 7, they backgrafted it into > 2.6 with one kernel patch, and they are either working on or have > already implemented a backgraft to 2.5.1 on one of its kernel patches. > But I haven't heard of such a patch for kernels 2.4 or 2.5. To the best of my knowledge yes, there was a discussion about it in comp.sys.sun.admin recently, but I'm regularly wrong or so my wife tells me. > > Are we talking about the same thing, by the way? Priority paging is the > new Solaris feature where it attempts to lock all executable pages into > memory and page only data pages out, before trying to page out > executable pages. Before Solaris would simply page out based on least- > recently used pages. > I was under the impression that Sun, and most modern Unix's, used a MRU based system queueing system inconjunction with a tick-based clearing mechansim. The priority paging influences this I believe. Paul Watson # I don't suffer from WF Software Ltd. # stress, I'm just Tel. (+44) 1436 674729 # a carrier Fax. (+44) 1436 678693 # www.wfsoftware.com
In article <7r8vv5$rbl$1@nnrp1.deja.com>, ykhan@my-deja.com (Yousuf Khan) wrote: > In article <memo.19990909150136.6371D@wfsoftware.compulink.co.uk>, > paulw@wfsoftware.co.uk wrote: > > In article <37D77F35.6D53E6A3@open.ac.uk>, r.j.yates@open.ac.uk > (Richard > > Yates) wrote: > > > > > A quick question - has anyone implemented priority paging on Solaris > > > and noticed a performance change with their database product? If so, > > Turn it on, it's been there since Solaris 2.4, the entire memory > paging > > sub-system was new in Solaris 2.4. By default it's turned off > > Are you sure that priority paging has been in there since 2.4? My > impression was that it was new with Solaris 7, they backgrafted it into > 2.6 with one kernel patch, and they are either working on or have > already implemented a backgraft to 2.5.1 on one of its kernel patches. > But I haven't heard of such a patch for kernels 2.4 or 2.5. > > Are we talking about the same thing, by the way? Priority paging is the > new Solaris feature where it attempts to lock all executable pages into > memory and page only data pages out, before trying to page out > executable pages. Before Solaris would simply page out based on least- > recently used pages. > We were talking at cross purposes. You are correct the paging_priorty is new to Solaris 7 (2.7) but can be applied to 2.6 with patch 105181-09, although it to be included in the later 2.5.1 generic releases. Now I wonder what I was getting confused with - just proves the wife is always right :-)) Paul Watson # I don't suffer from WF Software Ltd. # stress, I'm just Tel. (+44) 1436 674729 # a carrier Fax. (+44) 1436 678693 # www.wfsoftware.com
I have implemented it for a large customer running SAP/Oracle on a large E10K domain. I don't think it directly contributed to a performance increase. The trick today is not to be memory starved. This domain had 20GB of memory. That meant that fsflush was running like crazy but not that we were doing real paging. We tuned the entire memory system including priority paging and fsflush parameters like slowscan and handspreadpages and saw some improvement. Further investigation revealed some horrific joins in the custom stuff added to SAP and once those were tuned performance really settled down. Paul Rogers Sun Professional Services Richard Yates wrote: > A quick question - has anyone implemented priority paging on Solaris > and noticed a performance change with their database product? If so, > I shall be very interested to hear any conclusions reached! I have > done some testing, but due to certain factors formed no firm ideas, > other than "it *should* be a good thing". > > Richard Yates. > -- > Erratic news-swerver! :. post+e-mail to be sure I get your msg. > > The Open University is not responsible for content herein, which > may be incorrect and is used at reader's own risk.
Hi All! My standpoint on prioroty paging is, why not implement it, because, *it can only help*. It's a tweak to the way Solaris manages it's buffercache, and it's a tweak for the better. The white paper at http://www.sun.com/sun-on-net/performance/priority_paging.html claims "performance gains between 10-300% on customer workloads". Well I certainly haven't seen that kind of dramatic improvement since implementing it a few months ago, but I guess it all depends on your workload, type of apps used, etc. I do agree with the previous post in this thread that page-stealing (which is the activity that priority paging seeks to tweak) only occurs when you're running low on memory, so it follows that prioroty paging will only "come to the fore" in instances of memory contention. So it's not a general panacea, but rather IMHO a "good ace to have up your sleave" if and when you start to run into memory shortages. Another important thing to note is that you must take pains to ensure that data files do not have their executable bits set, because this will fool the VM manager into thinking it's an executable, thereby subverting the priority algorithm. Hope you don't have f/s's with millions of data files default umask'd to 0755, or you're in for a pretty lengthy find -perm ... I believe you can set p.p. dynamically on a running system via some ndd incantation. If so I guess you could do some performance tests... just make sure you pass on the results to the n.g. :) Your post metions p.p. with specific reference to db products. As well as SA'ing Solaris I DBA a smallish (4GB) Informix installation. I did not notice any great leaps in performance of the RDBMS with the implementation of p.p., but I'd have to say that any effects were more than likely masked by the 100 other performance tweaks I'm continually implementing. To diverge from the topic just a little, if your talking databases and memory, your best friend is the the forcedirectio (man mount_ufs(1M)) mount option. This only applies if you're using cooked ufs files for your db files (most Oracle sites), rather than raw devices (most Informix sites), but if you are using cooked files, forcedirectio will save your db from swamping from vm buffercache with data that's already in it' own cache anyway. But I digress :) Cheers Andrew Std.disclaimer: forget you read this, it's all crap, blah blah blah... Richard Yates wrote: > > A quick question - has anyone implemented priority paging on Solaris > and noticed a performance change with their database product? If so, > I shall be very interested to hear any conclusions reached! I have > done some testing, but due to certain factors formed no firm ideas, > other than "it *should* be a good thing". > > Richard Yates. Sent via Deja.com http://www.deja.com/ Share what you know. Learn what you don't.
In article <7rcfod$d00$1@nnrp1.deja.com>, andrew.reardon@australia.boeing.com wrote: > Hi All! > > My standpoint on prioroty paging is, why not implement it, because, *it > can only help*. > It's a tweak to the way Solaris manages it's buffercache, and it's a > tweak for the better. > > The white paper > at http://www.sun.com/sun-on-net/performance/priority_paging.html claims > "performance gains between 10-300% on customer workloads". Well I > certainly haven't seen that kind of dramatic improvement since > implementing it a few months ago, but I guess it all depends on your > workload, type of apps used, etc. I don't agree with "just implement it, because it can only help" as a philosophy. Yes, p.p. is a performance tweak that's designed to improve performance, but it's not necessarily the appropriate performance tweak for all performance problems. In some cases, it might actually be detrimental. I analogize it to tweaking an engine. The engine that is tweaked to push a car through a superspeedway at 250mph is not necessarily a good engine to pull a tree stump out of the ground. Sure the engine has got great performance, but it's all the wrong kind of performance for the second type of job. I can see that if this tweak were applied, and executable pages stayed in memory a little longer than data pages, then if those executable pages are no longer needed then those data pages will just have had some of their space stolen by useless executable pages. Yousuf Khan Sent via Deja.com http://www.deja.com/ Share what you know. Learn what you don't.
In article <memo.19990910100652.27111B@wfsoftware.compulink.co.uk>, paulw@wfsoftware.co.uk wrote: > > Are we talking about the same thing, by the way? Priority paging is the > > new Solaris feature where it attempts to lock all executable pages into > > memory and page only data pages out, before trying to page out > > executable pages. Before Solaris would simply page out based on least- > > recently used pages. > > > > I was under the impression that Sun, and most modern Unix's, used a MRU > based system queueing system inconjunction with a tick-based clearing > mechansim. The priority paging influences this I believe. Yes, that's right, the paging is based on an MRU (or LRU; same thing, just refers to the exact opposite action) algorithm that measures what pages have been used most recently or least recently. Priority paging seperates out the time counter between data and executable pages. Whereas previously, a single time tick counter would page out pages based on which was LRU, the new system has two such counters one for executable and the other for data. The executable page time counter is designed to begin paging much later than the data page time counter. Yousuf Khan Sent via Deja.com http://www.deja.com/ Share what you know. Learn what you don't.
Solaris 2.6 e5000 with priority paging on, a crappy Anacle 7.3.4 database, 8cpu, 1.5GB RAM, about 1.5GB virtual memory used, shows higher page scanning and pages freed (sar -g) than when priority paging is off ( high "pages desired" and paging in and out) We think we like the priority paging better. But it is an incremental affect, closer to 5-10%, not a 300% improvement in our memory starved environment. -- --------------------------------------------------------- Steven Hauser email: hause011@tc.umn.edu URL: http://www.tc.umn.edu/~hause011 ---------------------------------------------------------