9.2 修改dble配置

说明: 此配置仅为示例配置,并非调优配置,请根据运行环境自行调优,调优步骤参考:2.18 性能观测以及调试概览

1)schema.xml

<?xml version="1.0"?>
<!DOCTYPE dble:schema SYSTEM "schema.dtd">
<dble:schema xmlns:dble="http://dble.cloud/">
<!--benchmarksql-->
<schema name="mytest">
<table name="sbtest1" primaryKey="id" dataNode="dn$1-9" rule="hash-sysbench" />
</schema>
<dataNode name="dn$1-3" dataHost="host_1" database="dbledb$1-3" />
<dataNode name="dn$4-6" dataHost="host_2" database="dbledb$4-6" />
<dataNode name="dn$7-9" dataHost="host_3" database="dbledb$7-9" />
<dataHost name="host_1" maxCon="1000" minCon="100" balance="0" switchType="-1"  slaveThreshold="-1">
<heartbeat>select user()</heartbeat>
<writeHost host="hostM1" url="10.186.17.111:3306" user="test1" password="test1"></writeHost>
</dataHost>

<dataHost name="host_2" maxCon="1000" minCon="100" balance="0" switchType="-1"  slaveThreshold="-1">
<heartbeat>select user()</heartbeat>
<writeHost host="hostM2" url="10.186.17.112:3306" user="test1" password="test1"></writeHost>
</dataHost>

<dataHost name="host_3" maxCon="1000" minCon="100" balance="0" switchType="-1" slaveThreshold="-1">
<heartbeat>select user()</heartbeat>
<writeHost host="hostM3" url="10.186.17.115:3306" user="test1" password="test1"></writeHost>
</dataHost>
</dble:schema>

2)rule.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE dble:rule SYSTEM "rule.dtd">
<dble:rule xmlns:dble="http://dble.cloud/">
<tableRule name="hash-sysbench">
        <rule>
            <columns>id</columns>
            <algorithm>hash-sysbench</algorithm>
        </rule>
    </tableRule>
    <function name="hash-sysbench" class="Hash">
        <property name="partitionCount">9</property>
        <property name="partitionLength">1</property>
    </function>
</dble:rule>

3)server.xml

<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE dble:server SYSTEM "server.dtd">
<dble:server xmlns:dble="http://dble.cloud/">
    <system>
        <property name="processors">10</property>
        <property name="backendProcessors">10</property>
        <property name="processorExecutor">8</property>
        <property name="backendProcessorExecutor">6</property>
        <property name="sqlExecuteTimeout">3000000</property>
    </system>
    <user name="test">
        <property name="password">111111</property>
        <property name="schemas">mytest</property>
        <property name="maxCon">1000000</property>
    </user>
     <user name="root">
         <property name="password">111111</property>
         <property name="manager">true</property>
      </user>
</dble:server>

在后端mysql节点创建相应物理库

  • 10.186.17.111:3306 创建库:dbledb1, dbledb2, dbledb3
  • 10.186.17.112:3306 创建库:dbledb4, dbledb5, dbledb6
  • 10.186.17.115:3306 创建库:dbledb7, dbledb8, dbledb9

results matching ""

    No results matching ""