Re: Weird processes

From: "Marc Mitchell" <marcm(at)eisolution(dot)com>
To: <pgsql-admin(at)postgresql(dot)org>, "Gary DeSorbo" <isasitis(at)uchicago(dot)edu>
Subject: Re: Weird processes
Date: 2002-11-13 19:53:07
Message-ID: 012601c28b4e$4994e580$7901050a@marcmdelltop
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

It would seem that SELECT queries are active for reasonably long periods of
time. I would suggest using pgmonitor run as postgres and, using the
"query" functionality, grab the actual SQL being issued and run an EXPLAIN
on it. It is likely that due to either table size, index or statistics
differences between your development and production databases, you are
experiencing the election of a different and less optimum query plan on one
machine vs. the other. An "explain" would quickly confirm this.

Hope this helps.

Marc Mitchell - Senior Application Architect
Enterprise Information Solutions, Inc.
Downers Grove, IL 60515
marcm(at)eisolution(dot)com

----- Original Message -----
From: "Gary DeSorbo" <isasitis(at)uchicago(dot)edu>
To: <pgsql-admin(at)postgresql(dot)org>
Sent: Wednesday, November 13, 2002 1:38 PM
Subject: [ADMIN] Weird processes

> I have been having some problems with my database/web server machine
> and ma having difficulty in finding out what the problem is. I have
> two machines configured exactly the same; one for development and one
> for production. Pages on production are taking up to 10X longer to
> load than the same pages on development. We have tested the line
> speeds and they are comparable.
>
> I have been searching through the processes and have come across some
> items that I have never seen on the machine before. The processes
> listed below seem to be hanging around much longer than they should
> be. Perl is the cgi and the only postgres user on this machine is the
> web server. Any help would be greatly appreciated. Below is the
> output:
>
> postgres 7633 2.6 2.2 505612 45968 ? S 10:57 0:02
> postgres: postgres pro [local] SELECT
> nobody 7679 1.7 0.7 16792 15616 ? S 10:57 0:01 perl
> /www/cgi-bin/reporting/report_search.pl
> nobody 7682 1.5 0.3 8712 7548 ? S 10:57 0:01 perl
> /www/cgi-bin/staffing/orderconfirmation.pl
> postgres 7684 2.5 1.5 505100 32864 ? S 10:57 0:02
> postgres: postgres pro [local] SELECT
> postgres 7685 1.4 1.6 505008 34508 ? S 10:57 0:01
> postgres: postgres pro [local] idle
> postgres 7758 3.9 2.2 505088 45864 ? S 10:58 0:02
> postgres: postgres pro [local] SELECT
> nobody 7768 0.7 0.3 8832 7672 ? S 10:58 0:00 perl
> /www/cgi-bin/userapp/csc/contractor/contractorsearch.pl
> postgres 7769 2.2 1.5 505096 32864 ? S 10:58 0:01
> postgres: postgres pro [local] SELECT
> nobody 7800 0.0 0.1 5384 2596 ? S 10:58 0:00
> /www/bin/httpd -DSSL
> nobody 7842 0.3 0.3 8768 7600 ? S 10:58 0:00 perl
> /www/cgi-bin/passthru.pl
> nobody 7846 0.4 0.3 8768 7600 ? S 10:58 0:00 perl
> /www/cgi-bin/passthru.pl
> postgres 7853 2.5 1.5 505096 32860 ? S 10:58 0:01
> postgres: postgres pro [local] SELECT
> nobody 7861 0.8 0.3 8624 7448 ? S 10:58 0:00 perl
> /www/cgi-bin/staffing/supplier/resumesearch.pl
> postgres 7862 2.5 1.5 505100 32860 ? S 10:58 0:01
> postgres: postgres pro [local] SELECT
> postgres 7870 1.6 1.5 505100 32916 ? S 10:58 0:00
> postgres: postgres pro [local] idle
> nobody 7871 0.5 0.3 8776 7608 ? S 10:58 0:00 perl
> /www/cgi-bin/staffing/orderdetail.pl
> postgres 7875 2.4 1.5 505100 32864 ? S 10:58 0:01
> postgres: postgres pro [local] SELECT
> nobody 7891 0.9 0.3 8840 7680 ? S 10:58 0:00 perl
> /www/cgi-bin/staffing/csc/orderdetailedit.pl
> postgres 7896 5.6 2.2 505612 46236 ? S 10:58 0:02
> postgres: postgres pro [local] SELECT
> nobody 7917 0.8 0.3 8644 7468 ? S 10:58 0:00 perl
> /www/cgi-bin/timecard/csc/force_process.pl
> postgres 7925 1.9 1.5 505100 32784 ? S 10:58 0:00
> postgres: postgres pro [local] UPDATE
> nobody 7946 1.2 0.3 8640 7472 ? S 10:58 0:00 perl
> /www/cgi-bin/staffing/orderdetail.pl
> postgres 7948 4.1 1.7 505016 35372 ? R 10:58 0:01
> postgres: postgres pro [local] SELECT
> nobody 7950 0.0 0.1 5384 2592 ? S 10:58 0:00
> /www/bin/httpd -DSSL
> nobody 7971 0.0 0.1 5384 2512 ? S 10:58 0:00
> /www/bin/httpd -DSSL
> nobody 7993 1.5 0.3 8844 7684 ? S 10:58 0:00 perl
> /www/cgi-bin/timecard/csc/create_invoice_search_form.pl
> nobody 7994 1.9 0.3 8688 7508 ? S 10:58 0:00 perl
> /www/cgi-bin/timecard/supplier/submit_days.pl
> nobody 8004 1.3 0.3 8732 7564 ? S 10:58 0:00 perl
> /www/cgi-bin/staffing/csc/financial_detail.pl
> postgres 8005 3.8 1.5 505100 32876 ? S 10:58 0:01
> postgres: postgres pro [local] SELECT
> postgres 8007 0.7 1.1 505100 23268 ? S 10:58 0:00
> postgres: postgres pro [local] SELECT
> postgres 8010 1.8 1.6 505096 34000 ? S 10:58 0:00
> postgres: postgres pro [local] UPDATE
> nobody 8040 2.9 0.3 8844 7684 ? S 10:59 0:00 perl
> /www/cgi-bin/timecard/csc/create_invoice_search_form.pl
> postgres 8047 3.6 1.5 505100 32876 ? S 10:59 0:00
> postgres: postgres pro [local] SELECT
> nobody 8058 3.1 0.3 8692 7528 ? S 10:59 0:00 perl
> /www/cgi-bin/login.pl
> nobody 8063 3.5 0.3 8716 7540 ? S 10:59 0:00 perl
> /www/cgi-bin/userapp/csc/contractor/basic_info/basic_info.ppostgres
> 8069 0.8 1.0 505028 22104 ? S 10:59 0:00 postgres:
> postgres pro [local] SELECT
> postgres 8074 4.5 1.5 505096 32904 ? S 10:59 0:00
> postgres: postgres pro [local] idle
> nobody 8105 0.0 0.0 5260 1808 ? S 10:59 0:00
> /www/bin/httpd -DSSL
> nobody 8109 7.5 0.3 8860 7684 ? S 10:59 0:00 perl
> /www/cgi-bin/timecard/supplier/process_days.pl
> postgres 8113 2.0 0.8 505100 16692 ? S 10:59 0:00
> postgres: postgres pro [local] SELECT
> nobody 8114 17.0 0.3 8852 7672 ? S 10:59 0:00 perl
> /www/cgi-bin/timecard/supplier/process_days.pl
> postgres 8115 4.0 0.7 505100 15568 ? S 10:59 0:00
> postgres: postgres pro [local] SELECT
> nobody 8117 21.3 0.3 8692 7528 ? S 10:59 0:00 perl
> /www/cgi-bin/login.pl
> postgres 8118 7.0 0.9 505028 19256 ? S 10:59 0:00
> postgres: postgres pro [local] SELECT
> nobody 8123 29.5 0.3 8584 7396 ? S 10:59 0:00 perl
> /www/cgi-bin/passthru.pl
> postgres 8127 26.0 1.2 505100 25156 ? S 10:59 0:00
> postgres: postgres pro [local] SELECT
>
> Gary DeSorbo
> isasitis(at)uchicago(dot)edu
> Cell: 415.606.3857
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message LDC - Pablo Endres Lozada 2002-11-13 21:27:50 xlog dir problem
Previous Message Gary DeSorbo 2002-11-13 19:38:42 Weird processes