ALT Linux sysadmins discussion
 help / color / mirror / Atom feed
From: Anton Gorlov <stalker@altlinux.ru>
To: ALT Linux sysadmin discuss <sysadmins@lists.altlinux.org>
Subject: Re: [Sysadmins] bacula slow Dir inserting Attributes
Date: Mon, 20 Oct 2014 00:53:05 +0400
Message-ID: <544424B1.8030702@altlinux.ru> (raw)
In-Reply-To: <544422EF.3030801@altlinux.ru>

Да в  запросах при этом много локов

postgres=# SELECT current_query from pg_stat_activity ;
                                                                 
current_query                                                                 

-------------------------------------------------------------------------------------------------------------------------------------------------
 <IDLE>
 autovacuum: VACUUM public.file
 BEGIN; LOCK TABLE Path IN SHARE ROW EXCLUSIVE MODE
 BEGIN; LOCK TABLE Path IN SHARE ROW EXCLUSIVE MODE
 INSERT INTO Path (Path) SELECT a.Path FROM (SELECT DISTINCT Path FROM
batch) AS a WHERE NOT EXISTS (SELECT Path FROM Path WHERE Path = a.Path)
 BEGIN; LOCK TABLE Path IN SHARE ROW EXCLUSIVE MODE
 SELECT current_query from pg_stat_activity ;
 BEGIN; LOCK TABLE Path IN SHARE ROW EXCLUSIVE MODE
 BEGIN; LOCK TABLE Path IN SHARE ROW EXCLUSIVE MODE
(9 строк)


20.10.2014 00:45, Anton Gorlov пишет:
> Знатоки бакулы и postgresql подскажите  как решить такую проблему - с
> некоторых пор крайне долго стал выполняться
> "Dir inserting Attributes"  после непосредственно бекапа. Более 5 часов  аж.
> Бекапится конечно много данных, но так долго всё равно не было. База  с
> тех пор конечно выросла, но не на столько.
> Текущий размер базы 81 гиг. postgresql
>
>
> Вырезка из конфигурации postgresql
>
> max_connections = 100
> shared_buffers = 128MB
> temp_buffers = 512MB
> work_mem = 64MB
> maintenance_work_mem = 32MB
> fsync = off
> checkpoint_segments = 90
>
>
> При этом особой нагрузки на дисковую подсистему в этот момент нет.LA 
> 1.4-2.2
> В atop в 1 строке маячит postgres - bacula INSERT
> При этом чтение с диска не превышает по данным iotop 5 M/s и запись
> килобайты.
>
> hdparm -tT /dev/mapper/main-pgsql
>
> /dev/mapper/main-pgsql:
>  Timing cached reads:   14626 MB in  2.00 seconds = 7321.24 MB/sec
>  Timing buffered disk reads: 918 MB in  3.03 seconds = 302.72 MB/sec
>
>
> _______________________________________________
> Sysadmins mailing list
> Sysadmins@lists.altlinux.org
> https://lists.altlinux.org/mailman/listinfo/sysadmins



      reply	other threads:[~2014-10-19 20:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-19 20:45 Anton Gorlov
2014-10-19 20:53 ` Anton Gorlov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=544424B1.8030702@altlinux.ru \
    --to=stalker@altlinux.ru \
    --cc=sysadmins@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux sysadmins discussion

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/sysadmins/0 sysadmins/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 sysadmins sysadmins/ http://lore.altlinux.org/sysadmins \
		sysadmins@lists.altlinux.org sysadmins@lists.altlinux.ru sysadmins@lists.altlinux.com
	public-inbox-index sysadmins

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.sysadmins


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git