Thread: how to limit postgresql process and memory time
hi, how can I limit all my postgresql processes to a certain percent of processor work and a maximum amount of memory. for exemple, to limit postgresql to 50% of processor work and 250mo of memory. all automatically. thanks, and sorry for my english :-) bye -- Emmanuel SARACCO Email: esaracco@noos.fr
Attachment
Emmanuel SARACCO wrote: > hi, > > how can I limit all my postgresql processes to a certain percent of > processor work and a maximum amount of memory. > for exemple, to limit postgresql to 50% of processor work and 250mo of > memory. I don't know of any UNIX operating system that can be configured that way. You might have to look into some virtual machine architectures. Or you can try to get PostgreSQL running on DEC VMS. That OS does have all these tuning options, real time capabilities, lots of switches that could be tuned and tuned forever. > all automatically. You want something very special, how could that be done automatically? Jan -- #======================================================================# # It's easier to get forgiveness for being wrong than for being right. # # Let's break this rule - forgive me. # #================================================== JanWieck@Yahoo.com # _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com
[2002-01-17 10:26] Jan Wieck said: | Emmanuel SARACCO wrote: | > hi, | > | > how can I limit all my postgresql processes to a certain percent of | > processor work and a maximum amount of memory. | > for exemple, to limit postgresql to 50% of processor work and 250mo of | > memory. | | I don't know of any UNIX operating system that can be | configured that way. You might have to look into some virtual | machine architectures. Would it be useful to have settings for nice(2) and setrlimit(2) calls? I can see the utility in having setrlimit, but I get the feeling nice is not something we want to put a knob on. b -- "Develop your talent, man, and leave the world something. Records are really gifts from people. To think that an artist would love you enough to share his music with anyone is a beautiful thing." -- Duane Allman
Brent Verner <brent@rcfile.org> writes: > Would it be useful to have settings for nice(2) No; see prior discussions. > and setrlimit(2) calls? Not sure about that one. An admin can set ulimit settings before starting the postmaster, and I'm not sure I see any point in changing them on-the-fly. regards, tom lane
Emmanuel, I think that this will depend on the OS functionality re process scheduling, accounting and control. A useful ref for Linux is http://iamexwiwww.unibe.ch/studenten/schlpbch/linuxScheduling/LinuxSchedulin g.html regards steve boyle ----- Original Message ----- From: "Emmanuel SARACCO" <esaracco@noos.fr> To: <pgsql-general@postgresql.org> Sent: Thursday, January 17, 2002 2:20 PM Subject: [GENERAL] how to limit postgresql process and memory time
[2002-01-17 11:36] Tom Lane said: | Brent Verner <brent@rcfile.org> writes: | > Would it be useful to have settings for nice(2) | | No; see prior discussions. I can probably guess... | > and setrlimit(2) calls? | | Not sure about that one. An admin can set ulimit settings before | starting the postmaster, and I'm not sure I see any point in changing | them on-the-fly. except that admin (root) could set max limits for the postmaster, then the db admin could set (potentially per database/account) limits for each backend. This might allow some measure of control in a multi-user (think hosting) environment. just a random thought; maybe not worth the bytes on the wire... b -- "Develop your talent, man, and leave the world something. Records are really gifts from people. To think that an artist would love you enough to share his music with anyone is a beautiful thing." -- Duane Allman