473,569 Members | 2,845 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Postgresql 8.0 beta 1 - strange cpu usage statistics and slow vacuuming

I'm putting 8.0 through its paces and here are a few
things I've noticed on the native win32 port running
on my workstation (2.0g p4 w/256 megs of ram).

Here is the output of "vacuum verbose item":

=============== =====
INFO: vacuuming "public.ite m"
INFO: "item": removed 246381 row versions in 24044
pages
DETAIL: CPU -1.-1612s/-1.99u sec elapsed 1434.79 sec.
INFO: "item": found 246381 removable, 492935
nonremovable row versions in 50413 pages
DETAIL: 0 dead row versions cannot be removed yet.
There were 100991 unused item pointers.
0 pages are entirely empty.
CPU 1081264882.-821s/0.02u sec elapsed 1682.87 sec.

Query returned successfully with no result in 1683460
ms.
=============== =====

As you can see the cpu statistics are obviously bogus
although the elasped time is correct.

My other concern is the length of time that vacuum
runs when cost based vacuuming is disabled.

Under 8.0, if I run an update statement (update item
where set cost = cost + 0 where country = 'US' [causes
an update w/o really changing data]) that updates half
the rows in the table (~250k out of 500k - average
tuple width is about 500 bytes) and then execute a
regular vacuum it takes approximately 1400 seconds to
complete. A vacuum full performed immediately after
takes on the order of 2000 seconds to complete.

During the update, I see anywhere from 5 to 10 meg/s
of disk transfer, an average disk queue length of 1-2
and a relatively large number of split I/O operations
per second (as reported via performance monitor).
However, during vacuum and vacuum full (once they
begin in earnest) I see less than 1 meg/s of disk
transfer, an average disk queue length of less than 1
and a virtually no split I/O operations per second.

With the same table data loaded under 7.4.x on cygwin
it takes approximately 100 seconds to complete the
vacuum after the same update. A vacuum full run
immediately afterwards on the table takes around 250
seconds to complete.

During the update, vacuum and vacuum full I see
anywhere from 5 to 10 meg/s of disk transfer, an
average disk queue length of 1-2 and a relatively
large number of split I/O operations per second (as
reported via performance monitor).

In both cases, cpu usage is nil and the 7.4.x and 8.0
..conf files are virtually indentical. Can anyone
offer an explanation as to why I'm seeing such a huge
performance difference in vacuum between 7.4.x and
8.0?

Regards,

Shelby Cain


_______________ _______________ ____
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postg resql.org

Nov 23 '05 #1
2 1823
Shelby Cain <al******@yahoo .com> writes:
I'm putting 8.0 through its paces and here are a few
things I've noticed on the native win32 port running
on my workstation (2.0g p4 w/256 megs of ram). Here is the output of "vacuum verbose item": DETAIL: CPU -1.-1612s/-1.99u sec elapsed 1434.79 sec.
...
CPU 1081264882.-821s/0.02u sec elapsed 1682.87 sec.
Hmm ... something broken about getrusage() on Windows?
CC'd to pgsql-hackers-win32 for comment.
My other concern is the length of time that vacuum
runs when cost based vacuuming is disabled.


Are you sure you had cost-based vac disabled? I tried to reproduce
your experiment here. I saw some degradation in vacuuming speed
but not nearly as large as you're reporting (85 vs 73 seconds),
and as far as I could tell it was still maxing out my disk.
But the behavior you're describing is exactly what I'd expect if
cost-based vac was on.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 23 '05 #2
Shelby Cain wrote:
I'm putting 8.0 through its paces and here are a few
things I've noticed on the native win32 port running
on my workstation (2.0g p4 w/256 megs of ram).

Here is the output of "vacuum verbose item":

=============== =====
INFO: vacuuming "public.ite m"
INFO: "item": removed 246381 row versions in 24044
pages
DETAIL: CPU -1.-1612s/-1.99u sec elapsed 1434.79 sec.
INFO: "item": found 246381 removable, 492935
nonremovable row versions in 50413 pages
DETAIL: 0 dead row versions cannot be removed yet.
There were 100991 unused item pointers.
0 pages are entirely empty.
CPU 1081264882.-821s/0.02u sec elapsed 1682.87 sec.

Query returned successfully with no result in 1683460
ms.
=============== =====

As you can see the cpu statistics are obviously bogus
although the elasped time is correct.

My other concern is the length of time that vacuum
runs when cost based vacuuming is disabled.

Under 8.0, if I run an update statement (update item
where set cost = cost + 0 where country = 'US' [causes
an update w/o really changing data]) that updates half
the rows in the table (~250k out of 500k - average
tuple width is about 500 bytes) and then execute a
regular vacuum it takes approximately 1400 seconds to
complete. A vacuum full performed immediately after
takes on the order of 2000 seconds to complete.


On Windows XP with 8.0beta1 I'm experiencing different
values instead, after updating 800K rows the plain vacuum
takes 200 seconds and the vacuum full immediately after
takes 620 seconds.

In both case the cpu usage was near zero.
I'm using a 2.2GHZ 1GB di RAM and I'm using 64MB to workmem.

Regards
Gaetano Mendola


Nov 23 '05 #3

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

Similar topics

1
2432
by: John H | last post by:
Can anyone help with why our pages are slow to load during peak-use hours? We run a database site getting 4 million hits a month which becomes painfully slow during peak hours. The slowness is not reflected in Coldfusion's debug output; for example the total run-time of 5 heavy queries is typically 1000 ms, but during peak times the page...
26
10785
by: jini us | last post by:
Hi, I am starting a new project where I intend to use embedded database server in my win32 application. I intend to use VC++ microsoft studio 6.0 as my development environment. The postgres.org website seems to be catering for people with all sorts of requirements and platforms.
59
7126
by: Jeff Bowden | last post by:
For ease of configuration and other reasons, I would like for my single-user GUI app to be able to use postgresql in-process as a library accessing a database created in the users home directory. I think I could possibly get what I want by launching a captive copy of postmaster with appropriate args but it seems conceptually cleaner to not...
1
1793
by: Campano, Troy | last post by:
Do you know what I did wrong? I'm trying to enable some logging features in postgresql.conf, but now I get this message when I try to connect to the postgresql server... WARNING: statement-level statistics are disabled because parser, planner, or executor statistics are on psql: FATAL: invalid cache id: 30
12
1663
by: jao | last post by:
I have an application with a table that tracks objects with a "size" attribute. What we want to do is to periodically report on the number of these objects and the sum of the object sizes. The table will typically have 1-5 million rows. I know that the obvious "select count(*), sum(size) ..." is not a good idea, and we have seen the impact...
6
1724
by: Jean-Guillaume LALANNE | last post by:
Hi, I am pretty new to the postgresql community. My question may seem a little bit strange but I'd like to know if it is possible to run 2 postgresql processes with 2 separate databases on the same machine (change of the ports, different paths to logs, ...)? Thanks in advance for your answers.
1
1754
by: Shelby Cain | last post by:
When I enable log_statement_stats AND log_parser_stats in my postgresql.conf file and attempt the start the service I receive the following error: "Could not start the PostgreSQL Database SErver 8.0-beta1 service on Local Computer. The service did not return an error." Attempting to start the server manually using the following...
10
4397
by: Henk Ernst Blok | last post by:
Hi Posgres users/developers, Can anyone explain why PosgreSQL (version 7.4.5 on Linux) does a full table scan to compute a count(*) on a base table after a vacuum analyze has been done with no following updates that might have outdated any statistics. Strangly the explain command does give the correct number of tuples instantaniously from...
0
2853
by: Patvs | last post by:
I use poker software (HoldemManager) to keep track of the statistics (and show nice graphs) of millions of poker hand histories. This software (also PokerTracker 3) imports all the poker hands in PostgreSQL. The software runs on Windows) only. All of its users have NORMAL PCs. From single-core laptops, to a quadcore desktop at best. ...
0
7695
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7922
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. ...
0
8119
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...
1
7668
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...
0
6281
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3653
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3637
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2111
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
1
1209
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.