Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 1C93A634242 for ; Fri, 6 Mar 2009 07:43:56 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 12398-05 for ; Fri, 6 Mar 2009 07:43:54 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.225]) by mail.postgresql.org (Postfix) with ESMTP id 1D01C632DC7 for ; Fri, 6 Mar 2009 07:43:52 -0400 (AST) Received: by rv-out-0506.google.com with SMTP id f6so454653rvb.43 for ; Fri, 06 Mar 2009 03:43:51 -0800 (PST) MIME-Version: 1.0 Received: by 10.142.11.20 with SMTP id 20mr1068256wfk.62.1236339830889; Fri, 06 Mar 2009 03:43:50 -0800 (PST) Date: Fri, 6 Mar 2009 19:43:50 +0800 Message-ID: <8f750b7c0903060343l60cf0870rb7e421abcda63d6e@mail.gmail.com> Subject: multi-threading access problem From: Tony Liao To: pgsql-admin@postgresql.org Content-Type: multipart/alternative; boundary=000e0cd177ce711ef6046471cc7e X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200903/86 X-Sequence-Number: 31586 --000e0cd177ce711ef6046471cc7e Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit hello,everyone. I have a c test-program for "select query",if the program create thread every 3ms,it runs smoothly.but when the duration time interval reduce to 2.8ms,the sleeping process increase more and more,and then the server crash.the cpu and memory used percentage under 50%. my postgresql.conf file as bellow: max_connections = 5000 shared_buffers = 1000MB work_mem = 256MB maintenance_work_mem = 512MB max_stack_depth = 10MB max_fsm_pages = 204800 max_fsm_relations = 1000 checkpoint_segments = 5 checkpoint_timeout = 5min checkpoint_completion_target = 0.5 checkpoint_warning = 30s enable_seqscan = off seq_page_cost = 10.0 # measured on an arbitrary scale random_page_cost = 20.0 # same scale as above cpu_tuple_cost = 1.0 # same scale as above cpu_index_tuple_cost = 0.4 # same scale as above cpu_operator_cost = 0.2 # same scale as above effective_cache_size = 128MB geqo = on geqo_threshold = 11 geqo_effort = 6 default_statistics_target = 250 from_collapse_limit = 16 join_collapse_limit = 16 datestyle = 'iso, mdy' lc_messages = 'en_US.UTF-8' lc_monetary = 'en_US.UTF-8' # locale for monetary formatting lc_numeric = 'en_US.UTF-8' # locale for number formatting lc_time = 'en_US.UTF-8' default_text_search_config = 'pg_catalog.english' deadlock_timeout = 1s max_locks_per_transaction = 96 server hardware : double cpu xeon 5405,4G memory.the table of database have 2millions records. Maybe I should adjust system performance,but how? anyone can help me? thanks. Tony Liao --000e0cd177ce711ef6046471cc7e Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable hello,everyone.
=A0=A0=A0=A0=A0=A0=A0=A0 I have a c=A0 test-program for = "select query",if the program create thread every 3ms,it runs smo= othly.but when the duration time interval reduce to 2.8ms,the sleeping proc= ess increase more and more,and then the server crash.the cpu and memory use= d percentage under 50%.
=A0=A0=A0=A0=A0=A0=A0=A0 my postgresql.conf file as bellow:

max_connections =3D 5000
shared_buffers =3D 1000MB
work_mem =3D 256MB
maintenance_work_mem =3D 512MB
max_stack_depth =3D 10MB
max_fsm_pages =3D 204800
max_fsm_relations =3D 1000
checkpoint_segments =3D 5
checkpoint_timeout =3D 5min
checkpoint_completion_target =3D 0.5
checkpoint_warning =3D 30s
enable_seqscan =3D off
seq_page_cost =3D 10.0 # measured on an arbitrary scale<= br> random_page_cost =3D 20.0 # same scale as above
cpu_tuple_cost =3D 1.0 # same scale as above
cpu_index_tuple_cost =3D 0.4 # same scale as above
cpu_operator_cost =3D 0.2 # same scale as above
effective_cache_size =3D 128MB
geqo =3D on
geqo_threshold =3D 11
geqo_effort =3D 6
default_statistics_target =3D 250
from_collapse_limit =3D 16
join_collapse_limit =3D 16
datestyle =3D 'iso, mdy'
lc_messages =3D 'en_US.UTF-8'
lc_monetary =3D 'en_US.UTF-8' # locale for mone= tary formatting
lc_numeric =3D 'en_US.UTF-8' # locale for numb= er formatting
lc_time =3D 'en_US.UTF-8'
default_text_search_config =3D 'pg_catalog.english'
deadlock_timeout =3D 1s
max_locks_per_transaction =3D 96


server hardware : double cpu= xeon 5405,4G memory.the table of database have 2millions records.

M= aybe I should adjust system performance,but how? anyone can help me?
thanks.

Tony Liao

--000e0cd177ce711ef6046471cc7e--