Re: priority on a process - Mailing list pgsql-general

From Tom Lane
Subject Re: priority on a process
Date
Msg-id 29296.1053115339@sss.pgh.pa.us
Whole thread Raw
In response to priority on a process  ("Johnson, Shaunn" <SJohnson6@bcbsm.com>)
List pgsql-general
"Johnson, Shaunn" <SJohnson6@bcbsm.com> writes:
> I have a process running and it seems that it is not
> using very much of the available resources on the server

> PID USER     PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME COMMAND

> postgres 11467  3.4  0.3  8204 3176 ?        D    07:58  12:02 postgres:
> charles  testdb [local] UPDATE

It's waiting for disk I/O --- that's what the D means.

> Q2: why will some jobs hog system resouces and others,
> like this one, won't do much of anything?

You have too narrow a view of what system resources are ;-).  I feel
sure that this query is banging the heck out of your disk.  When the
disk is the bottleneck, worrying about improving CPU usage is pointless.

            regards, tom lane

pgsql-general by date:

Previous
From: "scott.marlowe"
Date:
Subject: Re: priority on a process
Next
From: "alex b."
Date:
Subject: Re: realtime data inserts