You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "dobet (via GitHub)" <gi...@apache.org> on 2023/03/02 04:01:35 UTC

[GitHub] [shardingsphere] dobet commented on issue #24369: How can I improve the performance of proxy?

dobet commented on issue #24369:
URL: https://github.com/apache/shardingsphere/issues/24369#issuecomment-1451266029

   This is my config
   
   server.yaml:
   ```
   sqlParser:
     sqlCommentParseEnabled: false
     sqlStatementCache:
       initialCapacity: 2000
       maximumSize: 65535
     parseTreeCache:
       initialCapacity: 128
       maximumSize: 1024
   
   props:
     max-connections-size-per-query: 1
     kernel-executor-size: 16  # Infinite by default.
     proxy-frontend-flush-threshold: 128  # The default value is 128.
     proxy-hint-enabled: false
     sql-show: false
     check-table-metadata-enabled: false
       # Proxy backend query fetch size. A larger value may increase the memory usage of ShardingSphere Proxy.
       # The default value is -1, which means set the minimum value for different JDBC drivers.
     proxy-backend-query-fetch-size: -1
     proxy-frontend-executor-size: 1000 # Proxy frontend executor size. The default value is 0, which means let Netty decide.
       # Available options of proxy backend executor suitable: OLAP(default), OLTP. The OLTP option may reduce time cost of writing packets to client, but it may increase the latency of SQL execution
       # and block other clients if client connections are more than `proxy-frontend-executor-size`, especially executing slow SQL.
     proxy-backend-executor-suitable: OLTP
     proxy-frontend-max-connections: 0 # Less than or equal to 0 means no limitation.
       # Available sql federation type: NONE (default), ORIGINAL, ADVANCED
     sql-federation-type: NONE
     proxy-mysql-default-version: 5.7.30 # In the absence of schema name, the default version will be used.
     proxy-default-port: 3307 # Proxy default port.
     proxy-netty-backlog: 1024 # Proxy netty backlog.
   ```
   
   other config is defalut in server.yaml
   
   
   and, I use distsql to create readwrite_splitting rules
   ```
   1. create database s1_sbtest;
   2. use s1_sbtest;
   3. register storage unit write_ds ( URL="jdbc:mysql://master_ip:3306/sbtest?useSSL=false&useUnicode=true&characterEncoding=UTF-8", USER="root", PASSWORD=password, PROPERTIES("maxPoolSize"=600, "minPoolSize"=600));
   4. register storage unit read_ds_1 ( URL="jdbc:mysql://slave1ip:3306/sbtest?useSSL=false&useUnicode=true&characterEncoding=UTF-8", USER="root", PASSWORD=password, PROPERTIES("maxPoolSize"=600, "minPoolSize"=600));
   5. register storage unit read_ds_2 ( URL="jdbc:mysql://slave2ip:3306/sbtest?useSSL=false&useUnicode=true&characterEncoding=UTF-8", USER="root", PASSWORD=password, PROPERTIES("maxPoolSize"=600, "minPoolSize"=600));
   6. create readwrite_splitting rule group_0 ( write_storage_unit=write_ds, read_storage_units(read_ds_1, read_ds_2), type(name="random") );
   ```
   
   I don't change other config.
   
   No, 16 cpu-cores used 70%, how to reduce ?
    
   Place give me some suggest。 tks
   
   
   
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org