Low Performance for big hospital server ..

From: amrit@health2.moph.go.th
Subject: Low Performance for big hospital server ..
Date: ,
Msg-id: 1104634472.41d762681b548@webmail.moph.go.th
(view: Whole thread, Raw)
Responses: Re: Low Performance for big hospital server ..  (Mark Kirkwood)
Re: Low Performance for big hospital server ..  (Michael Adler)
List: pgsql-performance

Tree view

Low Performance for big hospital server ..  (, )
 Re: Low Performance for big hospital server ..  (Mark Kirkwood, )
 Re: Low Performance for big hospital server ..  (Michael Adler, )
  Re: Low Performance for big hospital server ..  (, )
   Re: Low Performance for big hospital server ..  (Dave Cramer, )
    Re: Low Performance for big hospital server ..  (, )
     Re: Low Performance for big hospital server ..  (William Yu, )
      Re: Low Performance for big hospital server ..  (Mike Mascari, )
      Re: Low Performance for big hospital server ..  (Dave Cramer, )
       Re: Low Performance for big hospital server ..  (William Yu, )
        Re: Low Performance for big hospital server ..  (Dave Cramer, )
     Re: Low Performance for big hospital server ..  (Dave Cramer, )
      Re: Low Performance for big hospital server ..  (, )
       Re: Low Performance for big hospital server ..  (Robert Treat, )
       Re: Low Performance for big hospital server ..  (Dave Cramer, )
   Re: Low Performance for big hospital server ..  (Mark Kirkwood, )
    Re: Low Performance for big hospital server ..  (, )
     Re: Low Performance for big hospital server ..  (Mark Kirkwood, )
      Re: Low Performance for big hospital server ..  (, )
       Re: Low Performance for big hospital server ..  (Pierre-Frédéric Caillaud<>, )
 Re: Low Performance for big hospital server ..  ("Gregory S. Williamson", )
 Re: Low Performance for big hospital server ..  ("Merlin Moncure", )
 Re: Low Performance for big hospital server ..  (, )
  Re: Low Performance for big hospital server ..  (Gavin Sherry, )
   Re: Low Performance for big hospital server ..  (, )
  Re: Low Performance for big hospital server ..  (, )
   Re: Low Performance for big hospital server ..  (Dave Cramer, )
   Re: Low Performance for big hospital server ..  (William Yu, )
   Re: Low Performance for big hospital server ..  (Dawid Kuroczko, )
    Re: Low Performance for big hospital server ..  (, )
    Re: Low Performance for big hospital server ..  (Josh Berkus, )
     Re: Low Performance for big hospital server ..  (Frank Wiles, )
      Re: Low Performance for big hospital server ..  (Dave Cramer, )
       Re: Low Performance for big hospital server ..  (Rod Taylor, )
        Re: Low Performance for big hospital server ..  (Yann Michel, )
      Re: Denormalization WAS: Low Performance for big hospital server ..  (Josh Berkus, )
       Re: Denormalization WAS: Low Performance for big hospital  (Frank Wiles, )
      Re: Low Performance for big hospital server ..  (Greg Stark, )
       Re: Low Performance for big hospital server ..  ("Joshua D. Drake", )
 Re: Low Performance for big hospital server ..  (, )

I try to adjust my server for a couple of weeks with some sucess but it still
slow when the server has stress in the moring from many connection . I used
postgresql 7.3.2-1 with RH 9 on a mechine of 2 Xeon 3.0 Ghz and ram of 4 Gb.
Since 1 1/2 yr. when I started to use the database server after optimizing the
postgresql.conf everything went fine until a couple of weeks ago , my database
grew up to 3.5 Gb and there were more than 160 concurent connections.
The server seemed to be slower in the rush hour peroid than before . There
is some swap process too. My top and meminfo are shown here below:

207 processes: 203 sleeping, 4 running, 0 zombie, 0 stopped
CPU0 states:  15.0% user  12.1% system    0.0% nice   0.0% iowait  72.2% idle
CPU1 states:  11.0% user  11.1% system    0.0% nice   0.0% iowait  77.2% idle
CPU2 states:  22.3% user  27.3% system    0.0% nice   0.0% iowait  49.3% idle
CPU3 states:  15.4% user  13.0% system    0.0% nice   0.0% iowait  70.4% idle
Mem:  4124720k av, 4085724k used,   38996k free,       0k shrd,   59012k buff
                   3141420k actv,   48684k in_d,   76596k in_c
Swap: 20370412k av,   46556k used, 20323856k free                 3493136k
cached

  PID USER     PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME CPU COMMAND
16708 postgres  15   0  264M 264M  261M S    14.7  6.5   0:18   2 postmaster
16685 postgres  15   0  264M 264M  261M S    14.5  6.5   1:22   0 postmaster
16690 postgres  15   0  264M 264M  261M S    13.7  6.5   1:35   3 postmaster
16692 postgres  15   0  264M 264M  261M S    13.3  6.5   0:49   1 postmaster
16323 postgres  16   0  264M 264M  261M R    11.1  6.5   1:48   2 postmaster
16555 postgres  15   0  264M 264M  261M S     9.7  6.5   1:52   3 postmaster
16669 postgres  15   0  264M 264M  261M S     8.7  6.5   1:58   3 postmaster
16735 postgres  15   0  264M 264M  261M S     7.7  6.5   0:15   0 postmaster
16774 postgres  16   0  256M 256M  254M R     7.5  6.3   0:09   0 postmaster
16247 postgres  15   0  263M 263M  261M S     7.1  6.5   0:46   0 postmaster
16696 postgres  15   0  263M 263M  261M S     6.7  6.5   0:24   1 postmaster
16682 postgres  15   0  264M 264M  261M S     4.3  6.5   1:19   3 postmaster
16726 postgres  15   0  263M 263M  261M S     1.5  6.5   0:21   3 postmaster
   14 root      15   0     0    0     0 RW    1.3  0.0 126:42   1 kscand/HighMem
16766 postgres  15   0  134M 134M  132M S     1.1  3.3   0:01   2 postmaster
16772 postgres  15   0  258M 258M  256M S     1.1  6.4   0:04   1 postmaster
16835 root      15   0  1252 1252   856 R     0.9  0.0   0:00   3 top
 2624 root      24   0 13920 7396  1572 S     0.5  0.1   6:25   1 java
16771 postgres  15   0  263M 263M  261M S     0.5  6.5   0:06   0 postmaster
   26 root      15   0     0    0     0 SW    0.3  0.0   3:24   1 kjournald
 2114 root      15   0   276  268   216 S     0.1  0.0   2:48   2 irqbalance
    1 root      15   0   108   76    56 S     0.0  0.0   0:07   3 init
    2 root      RT   0     0    0     0 SW    0.0  0.0   0:00   0 migration/0
    3 root      RT   0     0    0     0 SW    0.0  0.0   0:00   1 migration/1
    4 root      RT   0     0    0     0 SW    0.0  0.0   0:00   2 migration/2
    5 root      RT   0     0    0     0 SW    0.0  0.0   0:00   3 migration/3
    6 root      15   0     0    0     0 SW    0.0  0.0   0:03   1 keventd

[root@data3 root]# cat < /proc/meminfo
        total:    used:    free:  shared: buffers:  cached:
Mem:  4223713280 4203782144 19931136        0 37982208 3684573184
Swap: 20859301888 65757184 20793544704
MemTotal:      4124720 kB
MemFree:         19464 kB
MemShared:           0 kB
Buffers:         37092 kB
Cached:        3570800 kB
SwapCached:      27416 kB
Active:        3215984 kB
ActiveAnon:     245576 kB
ActiveCache:   2970408 kB
Inact_dirty:    330796 kB
Inact_laundry:  164256 kB
Inact_clean:    160968 kB
Inact_target:   774400 kB
HighTotal:     3276736 kB
HighFree:         1024 kB
LowTotal:       847984 kB
LowFree:         18440 kB
SwapTotal:    20370412 kB
SwapFree:     20306196 kB

[root@data3 root]# cat < /proc/sys/kernel/shmmax
4000000000[root@data3 root]# cat < /proc/sys/kernel/shmall
134217728

max_connections = 165
shared_buffers = 32768
sort_mem = 20480
vacuum_mem = 16384
effective_cache_size = 256900

I still in doubt whether this figture is optimized and putting more ram will
help the system throughtput.

Any idea please . My organization is one oof the big hospital in Thailand
Thanks
Amrit
Thailand



pgsql-performance by date:

From: amrit@health2.moph.go.th
Date:
Subject: Low Performance for big hospital server ..
From: Mark Kirkwood
Date:
Subject: Re: Low Performance for big hospital server ..