Re: High cpu usage after many inserts

From: Jordan Tomkinson <jordan(at)moodle(dot)com>
To: Greg Smith <gsmith(at)gregsmith(dot)com>
Cc: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: High cpu usage after many inserts
Date: 2009-02-25 01:48:37
Message-ID: 6de2f13b0902241748y1cd57c28n1a3e63dcd784f400@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Feb 24, 2009 at 4:40 PM, Jordan Tomkinson <jordan(at)moodle(dot)com> wrote:

> taken before the ~7000 rows were entered.
>
> relation | size
> -------------------------------+--------
> public.mdl_log | 595 MB
> public.mdl_forum_posts | 375 MB
> public.mdl_log_coumodact_ix | 197 MB
> public.mdl_user | 191 MB
> public.mdl_cache_text | 162 MB
> public.mdl_log_usecou_ix | 137 MB
> public.mdl_log_act_ix | 119 MB
> public.mdl_log_cmi_ix | 97 MB
> public.mdl_log_tim_ix | 97 MB
> public.mdl_log_id_pk | 97 MB
> public.mdl_question_states | 48 MB
> public.mdl_stats_user_daily | 48 MB
> public.mdl_hotpot_responses | 47 MB
> public.mdl_register_downloads | 45 MB
> public.mdl_message_read | 37 MB
> public.mdl_course_display | 37 MB
> public.mdl_stats_user_weekly | 31 MB
> public.mdl_mnet_log | 27 MB
> public.mdl_user_ema_ix | 26 MB
> public.mdl_regidown_url_ix | 23 MB
> (20 rows)
>
>
Taken after 9000 rows entered, by this stage performance is terrible.
relation | size
-------------------------------+--------
public.mdl_log | 597 MB
public.mdl_forum_posts | 389 MB
public.mdl_log_coumodact_ix | 198 MB
public.mdl_user | 193 MB
public.mdl_cache_text | 162 MB
public.mdl_log_usecou_ix | 137 MB
public.mdl_log_act_ix | 119 MB
public.mdl_log_cmi_ix | 98 MB
public.mdl_log_tim_ix | 97 MB
public.mdl_log_id_pk | 97 MB
public.mdl_question_states | 48 MB
public.mdl_stats_user_daily | 48 MB
public.mdl_hotpot_responses | 47 MB
public.mdl_register_downloads | 45 MB
public.mdl_message_read | 37 MB
public.mdl_course_display | 37 MB
public.mdl_stats_user_weekly | 31 MB
public.mdl_mnet_log | 27 MB
public.mdl_user_ema_ix | 26 MB
public.mdl_regidown_url_ix | 23 MB
(20 rows)

as you can see, the tables arent growing by much (only a few mb) so is this
really to do with buffer/cache size?
I set shared_buffers to 3072 (from 2048) and it hasnt made much improvement,
requests are still taking longer and longer to execute.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ron Mayer 2009-02-25 01:56:05 Re: High cpu usage after many inserts
Previous Message Joshua D. Drake 2009-02-25 00:59:40 Re: High cpu usage after many inserts