对于Jira系统,如果使用Jira的默认连接配置,如下所示:
<?xml version="1.0" encoding="UTF-8"?>
<jira-database-config>
<name>defaultDS</name>
<delegator-name>default</delegator-name>
<database-type>postgres72</database-type>
<schema-name>public</schema-name>
<jdbc-datasource>
<url>jdbc:postgresql://[IP]:5432/jiradb</url>
<driver-class>org.postgresql.Driver</driver-class>
<username>jiradbuser</username>
<password>{PASSWORD}</password>
<pool-min-size>20</pool-min-size>
<pool-max-size>20</pool-max-size>
<pool-max-wait>30000</pool-max-wait>
<validation-query>select 1</validation-query>
<min-evictable-idle-time-millis>60000</min-evictable-idle-time-millis>
<time-between-eviction-runs-millis>300000</time-between-eviction-runs-millis>
<pool-max-idle>20</pool-max-idle>
<pool-remove-abandoned>true</pool-remove-abandoned>
<pool-remove-abandoned-timeout>300</pool-remove-abandoned-timeout>
<pool-test-on-borrow>false</pool-test-on-borrow>
<pool-test-while-idle>true</pool-test-while-idle>
</jdbc-datasource>
</jira-database-config>在postgresql的配置文件中:
postgresql.conf
max_connections = 300
shared_buffers = 80MB在/etc/sysctl.conf文件中:
kernel.shmmax=100663296在测试阶段,它可以工作。但是在生产环境中,对于1000个用户使用这个系统,如果一个应用服务器为500个用户服务,那么在postgresql.conf文件中设置多少池连接大小比较好?如果使用弹跳器,它可以减少多少连接?
发布于 2020-02-17 08:50:45
答案取决于您的数据库系统上有多少核,它可以处理多少并发I/O请求,以及应用程序使用连接时活动时间与空闲时间的比率。
我将从最多20次会议开始。
https://dba.stackexchange.com/questions/259821
复制相似问题