Re: -F option, RAM usage, more...
От | Dominic J. Eidson |
---|---|
Тема | Re: -F option, RAM usage, more... |
Дата | |
Msg-id | Pine.LNX.4.10.10010041323500.6452-100000@morannon.the-infinite.org обсуждение исходный текст |
Ответ на | -F option, RAM usage, more... ("Mike Biamonte" <mike@dbeat.com>) |
Список | pgsql-general |
On Wed, 4 Oct 2000, Mike Biamonte wrote: > I understand from the docs that -F ".. prevents fsync()'s from > flushing to disk after every transaction.." and that this boosts > performance because RAM accesses are far faster than disk accesses. I > have also seen some impressive stats regarding the degree of this > performance boost. Normally, in order to ensure integrity of the database/datafiles, PostgreSQL calls fsync() after each transaction - what this does, is it ensures that all disk buffers are flushed to disk - ensuring that any changes done in that transaction are committed to disk. > 1. How often DOES PG flush to disk - if at all - when the -F option is > invoked? Can this be controllled? Once after each transaction. > 2. I have no first hand experience with Oracle, but I understand that > one of the keys to its speed is its ability to pull the entire > database (or selected tables) into RAM and work them from there. Is > this comparable to Postgres' -F option? No. As far as I know PostgreSQL can't load an entire table into memory beyond what could/would/might be cached in-memory as part of the OS'es disk caching. > 3. With -F, does PG pull the database into RAM at startup? Or does it > pull data into RAM as it is accessed. (eg: the first few queries > would be slower, but subsequent queries on same data would be > faster...)? No. > 4. Does the -F option speed SELECTs as well as it speeds INSERTs? I'll wager to assume that fsync() is only called after INSERT/UPDATE/DELETE/ALTER's - since these are the only ones that modify the on-disk data - although I could be wrong. So no, it wouldn't speed up SELECT's. > 5. I have a dedicated Linux 2.2.16 db server with 2GB of RAM. How can > I be sure that Postgres is using all the RAM that it can? (-S > option? -B option?) Adjust your -S and -B options appropriately - not that I have any "recommended values" :( -- Dominic J. Eidson "Baruk Khazad! Khazad ai-menu!" - Gimli ------------------------------------------------------------------------------- http://www.the-infinite.org/ http://www.the-infinite.org/~dominic/
В списке pgsql-general по дате отправления: