473,667 Members | 2,692 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_reser ved_connections = 2
shared_buffers = 30000
max_fsm_relatio ns = 10000
max_fsm_pages = 100000
max_locks_per_t ransaction = 128
wal_buffers = 32
sort_mem = 1024
vacuum_mem = 8192
checkpoint_segm ents = 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*******@postg resql.org so that your
message can get through to the mailing list cleanly

Nov 23 '05 #1
2 1279
A long time ago, in a galaxy far, far away, ul***********@r elevanttraffic. 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_relatio ns = 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 YourEmailAddres sHere" to ma*******@postg resql.org)

Nov 23 '05 #3

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

Similar topics

8
1703
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
1733
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 searching for Aluminium could return all records that have aluminium in a field. The reason this needs to be done in a form as opposed to just using Access' find facility is that it will be used by people that aren't used to computers and especially...
3
1118
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 during the cultural evolution. Ten thousands of peaceful smugglers that are massacred in Banda island by the Dutch for conducting peaceful spice trade and all that are similar to them. All minority groups and individuals that face discrimination,...
0
1722
by: pamela anderson | last post by:
SHARON STONE PAMELA DAVID MARIA SHARAPOVA www.alphasearch.gr
0
1356
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
903
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
1363
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 and goes to another level. In the game besides the crystals there are also stones. When a stone or a crystal falls on the man's head, the game is over. The stone or crystal cannot fall from the grass or wall, but from another stone or crystal it can...
0
977
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 http://groups.yahoo.com/group/Communiques-Celebrities
0
804
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 StoneList.size() is more confusing. Thanx. Here is the part i'm stock with public void paint(Graphics g) {
10
2175
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 is completly enclosed in stones of another color, is dead. here the example of what i've done so far: http://www.k4s.ch/test/sca/test.php p= player x,y = &reset to wipe
0
8888
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8790
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8565
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6206
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5677
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4372
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2779
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 we have to send another system
2
2017
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1779
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.