Extremely high context switching

From: "Bojan Belovic" <bbelovic(at)usa(dot)net>
To: <pgsql-admin(at)postgresql(dot)org>
Subject: Extremely high context switching
Date: 2004-04-19 06:53:28
Message-ID: CEEHKDODNFHFNMLFNMFGKEKLDLAA.bbelovic@usa.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

I have just moved a database to a new server and new version of Postgres
(7.1.2 to 7.3.4). The new server is much more powerful (2GB RAM, 2xXeon,
RAID) than the old one (1GB RAM, 1 CPU, single drive) and I would expect at
least twice the performance if not more, however, it is constantly showing
high load and very high context switching, even outside peak hours. Here's a
portion of vmstat output:

procs memory swap io system
cpu
r b swpd free buff cache si so bi bo in cs us sy id
wa
3 0 0 128000 68040 1680488 0 0 5 23 29 17 1 0 23
1
3 0 0 128028 68040 1680488 0 0 0 0 114 242523 43 16
41 0
3 0 0 128112 68040 1680488 0 0 0 0 114 239304 42 16
41 0
4 0 0 127556 68040 1680488 0 0 0 0 166 211554 43 27
30 0
2 0 0 127476 68040 1680488 0 0 0 448 220 194517 50 14
35 1
3 0 0 127200 68040 1680488 0 0 0 0 142 190350 50 14
36 0
3 0 0 127864 68040 1680656 0 0 0 0 182 209546 55 19
26 0
3 0 0 127424 68040 1680752 0 0 0 0 162 155351 52 17
31 0
3 0 0 127856 68040 1680848 0 0 32 0 137 198027 59 18
23 0
2 0 0 127588 68040 1680920 0 0 0 548 238 220461 38 16
46 0
2 0 0 127864 68040 1680920 0 0 0 0 123 193224 27 12
61 0
1 0 0 127960 68040 1680920 0 0 0 0 135 220137 38 16
47 0
5 0 0 126472 68040 1680920 0 0 0 0 152 131971 34 9
57 0
4 0 0 127016 68040 1680920 0 0 0 0 151 45508 32 3 65
0
3 0 0 126872 68040 1680920 0 0 0 120 138 47118 31 5 64
1
1 0 0 126988 68040 1680920 0 0 0 0 142 41675 30 3 66
0
1 0 0 126860 68040 1680920 0 0 0 0 132 64751 29 4 67
0
1 0 0 126896 68040 1680920 0 0 0 0 164 43179 23 3 73
0
2 0 0 126872 68040 1680920 0 0 0 0 115 42461 24 3 74
0
1 0 0 127452 68040 1680920 0 0 0 416 153 40434 24 2 73
1
1 0 0 127436 68040 1680920 0 0 0 0 123 42127 23 4 73
0
1 1 0 127372 68040 1680960 0 0 8 0 146 74913 28 5 67
0
1 0 0 127004 68040 1681072 0 0 8 0 148 47233 26 7 67
0
1 0 0 126988 68040 1681072 0 0 0 0 123 47676 30 6 64
0

When the system is idle, cs is ok (less than 50).
Is this postgres problem or a system problem? Unfortunatelly, too many
parameters have changed, but I'm hoping for any sort of suggestion as to how
I can fix this.

Thanks,

Bojan

Browse pgsql-admin by date

  From Date Subject
Next Message scott.marlowe 2004-04-19 15:55:45 Re: Any Tips or Tricks?
Previous Message Chris 2004-04-18 15:30:43 Re: Any Tips or Tricks?