Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Performance > syslog performa...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 12 Topic 4158 of 4294
Post > Topic >>

syslog performance when logging big statements

by achill@[EMAIL PROTECTED] (Achilleas Mantzios) Jul 8, 2008 at 03:24 PM

Hi i have experienced really bad performance on both FreeBSD and linux,
with syslog,
when logging statements involving bytea of size ~ 10 Mb.
Consider this scenario:
postgres@[EMAIL PROTECTED]
 \d marinerpapers_atts
                                            Table
"public.marinerpapers_atts"
   Column    |           Type           |                                 
 Modifiers                                   
-------------+--------------------------+--------------------------------------------------------------------------------
 id          | integer                  | not null default
nextval(('public.marinerpapers_atts_id_seq'::text)::regclass)
 marinerid   | integer                  | not null
 filename    | text                     | not null
 mimetype    | character varying(50)    | not null
 datecreated | timestamp with time zone | not null default now()
 docsrc      | bytea                    | not null
Indexes:
    "marinerpapers_atts_pkey" PRIMARY KEY, btree (id)
    "marinerpapers_atts_ukey" UNIQUE, btree (marinerid, filename)
    "marinerpapers_atts_marinerid" btree (marinerid)
Foreign-key constraints:
    "$1" FOREIGN KEY (marinerid) REFERENCES mariner(id) ON DELETE CASCADE

The way the insert is done is like
INSERT INTO marinerpapers_atts(marinerid,filename,mimetype,docsrc)
VALUES(1,'foo.pdf','aplication/pdf','%PDF-1.3\\0124 0 o....%%EOF\\012');

When someone tries to insert a row in the above table which results to an
error (because e.g. violates the 
"marinerpapers_atts_ukey"  constraint), the whole statement is logged to
the logging system.

File sizes of about 3M result in actual logging output of ~ 10Mb.
In this case, the INSERT *needs* 20 minutes to return. This is because the
logging through syslog seems to severely slow the system.
If instead, i use stderr, even with logging_collector=on, the same
statement needs 15 seconds to return.

I am using syslog since like the stone age, and i would like to stick with
it, however this morning i was caught by this bad performance
and i am planning moving to stderr + logging_collector.

P.S.
Is there a way to better tune pgsql/syslog in order to work more
efficiently in cases like that?
I know it is a corner case, however i thought i should post my
experiences.
Thanx

-- 
Achilleas Mantzios

-- 
Sent via pgsql-performance mailing list (pgsql-performance@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance
 




 12 Posts in Topic:
syslog performance when logging big statements
achill@[EMAIL PROTECTED]   2008-07-08 15:24:46 
Re: syslog performance when logging big statements
tgl@[EMAIL PROTECTED] (T  2008-07-08 10:35:16 
Re: syslog performance when logging big statements
achill@[EMAIL PROTECTED]   2008-07-08 18:21:57 
Re: syslog performance when logging big statements
tgl@[EMAIL PROTECTED] (T  2008-07-08 14:34:01 
Re: syslog performance when logging big statements
achill@[EMAIL PROTECTED]   2008-07-09 15:31:05 
Re: syslog performance when logging big statements
threshar@[EMAIL PROTECTED  2008-07-08 15:00:06 
Re: syslog performance when logging big statements
tgl@[EMAIL PROTECTED] (T  2008-07-08 17:39:17 
Re: syslog performance when logging big statements
david@[EMAIL PROTECTED]   2008-07-08 17:47:34 
Re: syslog performance when logging big statements
achill@[EMAIL PROTECTED]   2008-07-09 15:37:26 
Re: syslog performance when logging big statements
achill@[EMAIL PROTECTED]   2008-07-09 15:51:30 
Re: syslog performance when logging big statements
ishii@[EMAIL PROTECTED]   2008-07-09 10:31:34 
Re: syslog performance when logging big statements
tgl@[EMAIL PROTECTED] (T  2008-07-08 22:08:46 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Sep 6 15:38:41 CDT 2008.