![]() | |
#11
| |||
| |||
|
|
As far as I know, the memory *is* usable by other processes. Normally "free" will report very small values on a Linux machine, but that won't keep a large memory allocation request from succeeding. |
#12
| |||
| |||
|
|
http://kerneltrap.org/node/7563 I am afraid that I am the one of those "brain dead database people" who has been using it on Unix, long before the advent of Linux. What is more, I am hell bent on remaining one of those "brain dead database people" and if Linux doesn't provide that interface, something else will. The question is only whether my DB of choice will allow me to use it. If not, there is always another DB. |
#13
| |||
| |||
|
|
assume that the reason for this is that in the old days, file systems used to be much worse than they are now, with performance penalties on directories with many files in them and the like. |
| The test case you show in another posting on the same thread seems indeed very slow. Did you try it without kernel/file system tuning (excluding the necessary shared memory parameters)? Was is even slower there? |
|
Is there a lot of dead space in the table? |
#14
| |||
| |||
|
|
That is the main problem. I should have done a full vacuum. Also, the table is partitioned into 3 tables, each containing a month worth of data and a large text column on which I am creating indexes: news_archive=# create index fti_segs_data0558 on news.news_segs_data0558 news_archive-# using gin(to_tsvector('english',segment_text)); NOTICE: word is too long to be indexed DETAIL: Words longer than 2047 characters are ignored. |
#15
| |||
| |||
|
|
On Wed, 27 Jan 2010 15:44:15 +0100, Anselmo Canfora wrote: Contrary to what I had expected, many knowledgable PostgreSQL developers advocate version b) and say that they experience better performance that way. are performance better only on write or in queries too? I imagine that the performance would be better primarily on queries, because of the pre-fetch. |
#16
| |||
| |||
|
|
Anselmo Canfora wrote: I ask because there are two approaches to buffering PostgreSQL databases in RAM: a) make shared_buffers as large as possible and let PostgreSQL do the buffering (this is probably what you are doing). b) keep shared_buffers comparatively small and let the file system buffer do the work. Hi, usually I keep shared_buffers high (25% of RAM) how much % of memory is it meant for comparatively small? I don't know :^) 25% of RAM seems to be the wrong value in any case - see the mail I quoted in my response to Mladen's posting in the same thread. |
|
What impact would have a low shared_buffers value on checkpoints? I would expect checkpoints to be faster, because there are probably fewer dirty pages. On the downside, overall I/O performance may be worse because dirty pages will be forced to disk more often... |
|
Contrary to what I had expected, many knowledgable PostgreSQL developers advocate version b) and say that they experience better performance that way. are performance better only on write or in queries too? Again, I don't know. You'd have to experiment. Yours, Laurenz Albe |
#17
| ||||
| ||||
|
|
25% of RAM seems to be the wrong value in any case - see the mail I quoted in my response to Mladen's posting in the same thread. Some people advises so: http://www.slideshare.net/oscon2007/...e-whack-a-mole slide 30 |
|
I am used to keep shared_buffers at 25% with good performances. |
|
The only thing I am dissatisfied about is update performances on large tables (say, +50.000 records). |
|
I would expect checkpoints to be faster, because there are probably fewer dirty pages. On the downside, overall I/O performance may be worse because dirty pages will be forced to disk more often... In concurrent scenarios to have a short RAM queue against disk operations perhaps would drive to very bad performances, isn't? |
#18
| ||||
| ||||
|
|
Anselmo Canfora wrote: 25% of RAM seems to be the wrong value in any case - see the mail I quoted in my response to Mladen's posting in the same thread. Some people advises so: http://www.slideshare.net/oscon2007/...e-whack-a-mole slide 30 Immediately below that piece of advice there is a recommendation to set work_mem to some constant, with the comment: - but not more than RAM / no_connections |
|
That is pretty obviously nonsense, because that limit is way too high: if all connections use their work_mem, then all your RAM will get exhausted. So I am not too sure if I would trust that source. I am used to keep shared_buffers at 25% with good performances. Never change a working system. The only thing I am dissatisfied about is update performances on large tables (say, +50.000 records). Do you have fillfactor< 100? That can improve update performance. |
|
I would expect checkpoints to be faster, because there are probably fewer dirty pages. On the downside, overall I/O performance may be worse because dirty pages will be forced to disk more often... In concurrent scenarios to have a short RAM queue against disk operations perhaps would drive to very bad performances, isn't? What is a "RAM queue"? |

|
Yours, Laurenz Albe |
#19
| |||
| |||
|
|
The only thing I am dissatisfied about is update performances on large tables (say, +50.000 records). Do you have fillfactor< 100? That can improve update performance. do you mean for indexes? never tweaked that, how can I visualize the fillfactor of an already existing index? |
#20
| |||
| |||
|
|
Anselmo Canfora wrote: The only thing I am dissatisfied about is update performances on large tables (say, +50.000 records). Do you have fillfactor< 100? That can improve update performance. do you mean for indexes? never tweaked that, how can I visualize the fillfactor of an already existing index? Thsi is already quite off-thread... |

|
No, I meant fillfactor on tables. The default fillfactor for a B-tree index is 90 by default anyway: http://www.postgresql.org/docs/curre...AGE-PARAMETERS You can find the setting in the "reloptions" column of the "pg_class" catalog. If you *cannot* find it there, it is set to the default. If fillfactor on a table is less than 100, you can profit from "heap only tuples": if there is enough free space in the data block, the new row will be written to the same block as the old row and any indexes will not need to be updated (if no indexed column has changed of course) because the old row will reference the new row. Moreover, only one table block will be touched. |
![]() |
| Thread Tools | |
| Display Modes | |
| |