2013-01-04 2 views
0

로드 밸런싱 및 연결 풀을 사용하여 스트리밍 복제 모드에서 2 백엔드와 함께 pgpool 3.2.1을 설치했습니다. pgpool 연결을 줄이기 위해 고부하 테스트를 수행했습니다. 이 규칙은 올바른지pgpool connections이 동결 됨

Suposing : max_pool * num_init_children < = (MAX_CONNECTIONS - superuser_reserved_connections)

시험 1 :

num_init_children = 90 max_pool = (만 마스터)

1 max_connections = 100 superuser_reserved_connections = 3

결과 psql -U postgres - C 'pg_stat_activity로부터 SELECT COUNT는'였다 90

시험 2 :

num_init_children = 90 max_pool = 2

(만 마스터) MAX_CONNECTIONS = 100 superuser_reserved_connections = 3

psql -U postgres -c 'pg_stat_activity에서 SELECT COUNT'에 대한 결과는 91이었습니다. 다른 6 개의 연결에서 97 개의 연결을 얻으려면 어떻게됩니까? postgresql에 연결할 수있는 최대 연결 수입니다.

두 경우 모두 pgpoolAdmin에서 모든 연결을 사용하고 데이터베이스 연결이 중단되어 새로운 연결이 허용되지 않습니다.

감사합니다. pgpool에서

답변

0

그들은 연결을 제어하기 위해 다음과 같은 규칙을 사용하고 있습니다 :

max_pool * num_init_children을 < = (MAX_CONNECTIONS - superuser_reserved_connections) (어떤 쿼리가 필요하지 취소) max_pool * num_init_children * 2 < = (MAX_CONNECTIONS - superuser_reserved_connections) (쿼리 취소 필요)

따라서 문제는 쿼리 취소가있을 때 pgpool에 구성된 이중 연결 수를 postgresql에 설정해야한다는 것입니다.