This is a discussion on Postgresql and resource isolation within the Pgsql General forums, part of the PostgreSQL category; --> Hello, We are considering using Postgresql for rather large project and I have questions about where it stands in ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hello, We are considering using Postgresql for rather large project and I have questions about where it stands in respect to the following. Consider these two features already found in major commercial products. A) "resource governor" - the ability to configure how much resources (IO per second, CPU slices) particular users or sessions are allowed to use B) ability to collect statistics about how much IO and CPU particular usersand sessions actually use I understand that I should be able to get at least some IO data by queryingpg_stat_* views, but what about getting numbers about CPU usage? And more general question - what are the plans to support these and similarfeatures in Postgresql? Thanks! ---------------------------(end of broadcast)--------------------------- TIP 4: Have you searched our list archives? http://archives.postgresql.org/ |
| |||
| On Thu, Nov 15, 2007 at 10:12:51AM -0800, Garber, Mikhail wrote: > > A) "resource governor" - the ability to configure how much resources (IO > per second, CPU slices) particular users or sessions are allowed to use PostgreSQL is not like several other commercial systems, in that it doesn't "take over" the OS as some others do. So it sort of can't do some of these things. Moreover, there is a possible problem with putting in these governors, which is called priority inversion. Because Postgres has quite advanced concurrency control, it is possible for a user who has been "throttled" to restrict the ability of others to do their work, too. A paper discussed not long ago in one of the mailing lists, however, suggests this problem isn't as bad as some (including me) historically thought. I can't put my fingers on it this minute, but a little digging in the archives for "nice settings" or something similar ought to turn it up. > And more general question - what are the plans to support these and > similar features in Postgresql? If someone comes along with an implementation that doesn't impose serious costs on the rest of the system, I'd be surprised if people balked. But I know of nobody working on it today. -- Andrew Sullivan Old sigs will return after re-constitution of blue smoke ---------------------------(end of broadcast)--------------------------- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match |
| |||
| On 11/15/07, Joshua D. Drake <jd@commandprompt.com> wrote: > > A) "resource governor" - the ability to configure how much resources > > (IO per second, CPU slices) particular users or sessions are allowed > > to use > That is controlled from the operating system. What OSes support this? ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend |
| |||
| Trevor Talbot wrote: > On 11/15/07, Joshua D. Drake <jd@commandprompt.com> wrote: > >>> A) "resource governor" - the ability to configure how much resources >>> (IO per second, CPU slices) particular users or sessions are allowed >>> to use > >> That is controlled from the operating system. > > What OSes support this? Well I know that FreeBSD through Jails and Linux through Xen can give you fine grained control over how much resources a particular instance can use. My understanding is that Solaris Zones also give you quite a bit of control but someone else would have to comment on that. Sincerely, Joshua D. Drake > ---------------------------(end of broadcast)--------------------------- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq |
| ||||
| On 11/15/07, Joshua D. Drake <jd@commandprompt.com> wrote: > Well I know that FreeBSD through Jails and Linux through Xen can give > you fine grained control over how much resources a particular instance > can use. I hadn't seen the new limits in jail, the CPU limiting in particular is neat. I'm not familiar with Xen's capabilities, but neither one will actually work for this scenario, since both can only contain an entire database cluster. In order to get per-session resource throttiling, it would at least need to support limits on a per-process basis. Per-user would require grouping several postgres processes, although this doesn't seem to be as pressing a need (limit number of connections instead, etc). There doesn't seem to be an answer to I/O throttling either. Even if an OS does supply these capabilities, it would seem to require cooperation from postgres. > My understanding is that Solaris Zones also give you quite a bit of > control but someone else would have to comment on that. I'd be interested in hearing about Solaris too, it seems to get a lot of neat capabilities that don't show up elsewhere. ---------------------------(end of broadcast)--------------------------- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match |