473,513 Members | 2,356 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

stone-age maintenance procedures ;-)

Hi,

lately I've been acused of "stone-age maintenance procedures".
Hopefully I will find some help to develop from stone-age to roman
empire. ;-)

To optimize the performance and to minimize the maintainance needs I
would like to ask you guys about some values in my postgresql.conf.

select version();

PostgreSQL 7.3.4 on i386-redhat-linux-gnu, compiled by GCC
i386-redhat-linux-gcc (GCC) 3.2.2 20030222 (Red Hat Linux 3.2.2-5)
(1 row)

max_connections = 32
superuser_reserved_connections = 2
shared_buffers = 30000
max_fsm_relations = 10000
max_fsm_pages = 100000
max_locks_per_transaction = 128
wal_buffers = 32
sort_mem = 1024
vacuum_mem = 8192
checkpoint_segments = 16 # in logfile segments, min 1, 16MB each
fsync = false
open_datasync
effective_cache_size = 20000 # typically 8KB each

The total database size on disk is ~6GB.

Some tables get changed *very* frequently. A nightly "vacuum full
analyze" frees about 250,000 rows on each of three tables.

And yes I will change to 7.4 this week.

TIA

Ulrich

--
------------------------------------------------------------
Relevant Traffic AB, Riddargatan 10, 11435 Stockholm, Sweden
Tel. +46-8-6789750 http://www.relevanttraffic.se
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly

Nov 23 '05 #1
2 1267
A long time ago, in a galaxy far, far away, ul***********@relevanttraffic.se (Ulrich Wisser) wrote:
select version();

PostgreSQL 7.3.4 on i386-redhat-linux-gnu, compiled by GCC
i386-redhat-linux-gcc (GCC) 3.2.2 20030222 (Red Hat Linux 3.2.2-5)
(1 row)
Happily, that's not _scary_ obsolete. There's still a few 7.1
instances around, which is "scary."
shared_buffers = 30000
effective_cache_size = 20000 # typically 8KB each
fsync = false
These three look interesting.

1. By turning fsync off, you're leaving yourself vulnerable to any
kind of hardware problem that stops the machine _destroying_ the
database.

2. There is little evidence that having shared_buffers higher than
10000 is of benefit, ever. You might want to drop that.

3. Are you sure that you have _less_ usable cache than you have
shared buffers? That would seem surprising, and having more is quite
likely to affect some query plans.
Some tables get changed *very* frequently. A nightly "vacuum full
analyze" frees about 250,000 rows on each of three tables.


If you have the time to schedule the outage, I guess it's nice to be
able to do this. Can you give some more stats on those three tables?

In one of the applications I support, we have a "customer balance"
table that gets lots of dead tuples, but we can keep that vacuumed by
vacuuming it every five minutes, which goes lickety-split fast, and
keeps there from being a lot of dead/wasted tuples.

There is definitely merit to vacuuming important tables _very
frequently_ to prevent growth rather than using VACUUM FULL. What
with the changes between 7.2 and 7.4, numerous of the reasons to need
VACUUM FULL or REINDEX have gone away.

For the apps I support, we used to need to take the system down about
every 2 months to REINDEX/VACUUM FULL a bunch of tables; that's no
longer necessary, and I'd expect 8.0 to become a little better still.
--
output = ("cbbrowne" "@" "ntlug.org")
http://www.ntlug.org/~cbbrowne/linux.html
Trying to be happy is like trying to build a machine for which the
only specification is that it should run noiselessly.
Nov 23 '05 #2
Ulrich Wisser <ul***********@relevanttraffic.se> writes:
max_fsm_relations = 10000
max_fsm_pages = 100000 The total database size on disk is ~6GB.
Most likely, you need larger max_fsm_pages. 6GB would work out to about
750K pages (of 8K each). With max_fsm_pages of 100K you are saying that
you don't expect more than one page in eight to have interesting amounts
of free space. That would be plenty for a low-turnover database ...
but ...
Some tables get changed *very* frequently. A nightly "vacuum full
analyze" frees about 250,000 rows on each of three tables.
.... that does not sound like a low-turnover database.
And yes I will change to 7.4 this week.


Once you are on 7.4, you can do a database-wide VACUUM VERBOSE to get
some stats about how loaded or overloaded the FSM is. Look at the last
few lines of the (very voluminous) output. If you have several active
databases, do a database-wide VACUUM in each of them and then look at
the VERBOSE result for the last. You want "total pages needed" to be
comfortably less than max_fsm_pages.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)

Nov 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
1700
by: Frank Buss | last post by:
A new challenge: http://www.frank-buss.de/marsrescue/index.html Have fun! Now you can win real prices. -- Frank Buß, fb@frank-buss.de http://www.frank-buss.de, http://www.it4-systems.de
1
1728
by: SamBenjamin | last post by:
Is it possible to incorporate a search into a form using a text field for the search word(s) and a command button to start the search, returning results that don't exactly match.. For example...
3
1108
by: envyisevil | last post by:
This article is dedicated to: A man I met, with most of his body heavily burned, simply because he was a Chinese during the 1998 May Riot in Indonesia. Lots of capitalists that are slaughtered...
0
1715
by: pamela anderson | last post by:
SHARON STONE PAMELA DAVID MARIA SHARAPOVA www.alphasearch.gr
0
1343
by: S S | last post by:
sharon stone paris hilton www.alphasearch.at www.alphasearch.be www.alphasearch.it www.alphasearch.info www.alphasearch.gr www.alphasearch.es
0
898
by: D - A - T - I - N - G | last post by:
Sharon Stone - Anna Kournikova Lindsay lohan ------------------------ search engines + cams ------------------------ www.alphasearch.gr www.alphasearch.ru
6
1352
mishela
by: mishela | last post by:
Hello, I have a program - it is accually a game, BoulderDash. A man runs an collets some crystals and when he has already collected the needed amount of crystals, he goes to the given destination...
0
968
by: Goteborgbank | last post by:
A Different Giuen Multifarious Business Activity Encouraged to A First Class of Consistency and Precision of the Knowledge and Care Required website http://giuelith.wordpress.com...
0
796
by: austinslik | last post by:
hello can anybody help me in converting some of my java code to c#... i have done uptill this place and stock here now please help me someone. The Bold taged and underlined part with...
10
2165
by: j0k3r | last post by:
Hiya, i'm trying to create a Go (the game) simulation in PHP, the problem is how to mark dead stones. each stone has some liberties wich are the empty territories nearby, when a group of stones...
0
7175
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7391
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7553
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7120
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5697
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4754
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3247
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1609
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
809
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.