From: Bastian Voigt <post@bastian-voigt.de>
To: pgsql-performance@postgresql.org
Subject: My quick and dirty "solution" (Re: Performance Problem with Vacuum of bytea table (PG 8.0.13))
Date: Fri, 25 May 2007 14:30:36 +0200
Message-ID: <4656D6EC.5060506@bastian-voigt.de> (raw)
In-Reply-To: <4656CDC2.6030106@archonet.com>
References: <46569E6A.2060509@bastian-voigt.de>
<4656BB5E.3000109@archonet.com>
<4656BEF1.4050609@bastian-voigt.de>
<4656C1C7.3000003@archonet.com>
<4656C411.8010509@bastian-voigt.de>
<4656CDC2.6030106@archonet.com>
No, this did not help. The vacuum process is still running far too long
and makes everything slow. It is even worse than before, cause now the
system is slow almost all the time while when vacuuming only every 3
hours it is only slow once every three hours.....
I now did the following. Well, no comment.....
Shellscript A:
while true
do
psql -U $user -d $database -c "vacuum analyze verbose binary_cache"
echo "Going to sleep"
sleep 60
done
Shellscript B:
while true
do
ps aux > $tempfile
numwaiting=`grep UPDATE.waiting $tempfile | grep -c -v grep`
echo "Number of waiting updates: $numwaiting"
vacuumpid=`grep VACUUM $tempfile| grep -v grep | awk '{print $2}'`
echo "PID of vacuum process: $vacuumpid"
if [ $numwaiting -gt 5 ]
then
echo "Too many waiting transactions, killing vacuum
process $vacuumpid..."
kill $vacuumpid
fi
echo "Sleeping 30 Seconds"
sleep 30
done
--
Bastian Voigt
Neumünstersche Straße 4
20251 Hamburg
telefon +49 - 40 - 67957171
mobil +49 - 179 - 4826359
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: post@bastian-voigt.de
Subject: Re: My quick and dirty "solution" (Re: Performance Problem with Vacuum of bytea table (PG 8.0.13))
In-Reply-To: <4656D6EC.5060506@bastian-voigt.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox