Mysql Scalability(5)benchmark
>bin/benchmark -P 3306 -c 50 -f ./benchmark/query.xml -h ubuntu-master -n 100000 -u root -p kaishi
Prepare 1000000
Here is the initData.xml
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> <properties version="1.0"> <entry key="class">com.meidusa.amoeba.mysql.net.packet.QueryCommandPacket</entry> <entry key="command">3</entry> <entry key="query"><![CDATA[ insert into sillycat.branduser (id, username, age) values ( ${@Math@abs( 1 + #atomicLong.getAndIncrement())}, "test",32); ]]> </entry> </properties>
-c 50 means 50 connections.
-f ./beachmark/query.xml means execute the SQL in that file.
-n 100000 means totally run 100000 query.
Insert 1000,000 data
>bin/benchmark -P 3306 -c 50 -f ./benchmark/sql/insertData.xml -h ubuntu-master -n 1000000 -u root -p kaishi
Here the insertData.xml
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> <properties version="1.0"> <entry key="class">com.meidusa.amoeba.mysql.net.packet.QueryCommandPacket</entry> <entry key="command">3</entry> <entry key="query"><![CDATA[ insert into sillycat.branduser (id, username, age) values ( ${@Math@abs( 1000000 + #atomicLong.getAndIncrement())}, "test",32); ]]> </entry> </properties>
Here is the queryData.xml
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> <properties version="1.0"> <entry key="class">com.meidusa.amoeba.mysql.net.packet.QueryCommandPacket</entry> <entry key="command">3</entry> <entry key="query"><![CDATA[ select id, username, age from sillycat.branduser where id=${@Math@abs(#random.nextInt(1000000))} LIMIT ${@Math@abs(#random.nextInt(100))}, ${@Math@abs(#random.nextInt(100))}; ]]> </entry> </properties>
Query 1000,000 data
>bin/benchmark -P 3306 -c 50 -f ./benchmark/sql/queryData.xml -h ubuntu-master -n 1000000 -u root -p kaishi
Results from Single Mysql
Query Result
completed requests total=1000000, errorNum=0, cost=582804ms , TPS=1715/s min=0ms max=610ms average=29ms create Connections time=308ms TPS(after connected)=1716/s
Insert Result
completed requests total=1000000, errorNum=0, cost=601626ms , TPS=1662/s min=0ms max=637ms average=30ms create Connections time=150ms TPS(after connected)=1662/s
Run from Amoeba through 4 Machines
>bin/benchmark -P 8066 -c 50 -f ./benchmark/sql/initData.xml -h ubuntu-client4 -n 100000 -u root -p kaishi
>bin/benchmark -P 8066 -c 50 -f ./benchmark/sql/insertData.xml -h ubuntu-client4 -n 100000 -u root -p kaishi
>bin/benchmark -P 8066 -c 50 -f ./benchmark/sql/queryData.xml -h ubuntu-client4 -n 100000 -u root -p kaishi
Configuration and running ha proxy
Download the latest haproxy
>sudo apt-get install build-essential
>sudo apt-get install libpcre3-dev
>make TARGET=custom CPU=native USE_PCRE=1 USE_LIBCRYPT=1 USE_LINUX_SPLICE=1 USE_LINUX_TPROXY=1
>make install DESTDIR='/home/carl/tool/haproxy-1.5.3' PREFIX=''
>sudo sbin/haproxy -f conf/haproxy.conf
References:
http://docs.hexnova.com/amoeba/jvm-settings.html
http://louwrentius.com/how-to-compile-haproxy-from-source-and-setup-a-basic-configuration.html
- 浏览: 2552403 次
- 性别:
- 来自: 成都
最新评论
-
nation:
你好,在部署Mesos+Spark的运行环境时,出现一个现象, ...
Spark(4)Deal with Mesos -
sillycat:
AMAZON Relatedhttps://www.godad ...
AMAZON API Gateway(2)Client Side SSL with NGINX -
sillycat:
sudo usermod -aG docker ec2-use ...
Docker and VirtualBox(1)Set up Shared Disk for Virtual Box -
sillycat:
Every Half an Hour30 * * * * /u ...
Build Home NAS(3)Data Redundancy -
sillycat:
3 List the Cron Job I Have>c ...
Build Home NAS(3)Data Redundancy
相关推荐
"Scalability Mastery" Scalability是指系统、软件或应用程序能够满足增长和变化的需求,而不影响其性能和可靠性。Scalability是一个非常重要的概念,在现代软件开发和 IT 行业中扮演着关键角色。下面是从《The Art...
MySQL 8 Administrator's Guide pdf ...MySQL 8 - Scalability & High Availability MySQL 8 - Security Optimizing MySQL 8 Extending MySQL 8 MySQL 8 Best Practices & Benchmarking Troubleshooting MySQL 8
本文档《5 Scalability Poisons and 3 Cloud Scalability Antidotes》将深入探讨这些毒药和解药,并给出实际的解决策略。 首先,我们来探讨五个影响系统可扩展性的因素: 1. 对象关系映射器(Object Relational ...
1.5.1. Scalability Improvements 1.5.2. InnoDB I/O Subsystem Changes 1.5.3. Enhanced Solaris Support 1.5.4. Diagnostic and Monitoring Capabilities 1.6. MySQL Information Sources 1.6.1. MySQL Mailing ...
##### 3.4 HA/Scalability Guide - **高可用性**: 包括 MySQL Thread Pool、MySQL Partitioning 等。 - **扩展性**: 如 MySQL Proxy、MySQL and Virtualization 等。 #### 四、安全与合规 ##### 4.1 Security - ...
Each optimization discusses techniques to improve the performance and scalability of your code. Every claim is substantiated with hard numbers and an experience-based evaluation. Java(TM) Performance...
- **HA/Scalability Guide**:介绍如何设置高可用性和可扩展性的 MySQL 架构。 - **Server Administration**:涵盖服务器管理的基础知识,包括安装、配置和日常维护。 - **MySQL Yum Repository**:介绍了如何使用 ...
- **HA/Scalability**: 高可用性和可扩展性解决方案,如MySQL和DRBD的集成。 - **Storage Engines**: 多种存储引擎支持,如InnoDB、MyISAM等。 - **Globalization**: 国际化支持,包括多语言环境和字符集管理。 ###...
8. MySQL Enterprise Scalability(第10部分):这部分内容可能讲述了如何利用MySQL企业版来扩展数据库应用,以应对高流量和高并发情况。 9. MySQL Enterprise High Availability(第11部分):讨论了如何使用MySQL...
Improving .NET Application Performance and Scalability provides an approach to engineering applications for performance and scalability.
MySQL High Availability and Scalability team. He is architect and implementor of several MySQL features. Dr. Lars Thalmann is the development director and technical lead of the MySQL Replication, ...
- **HA/Scalability Guide**:文档中还包含了一个关于高可用性和可扩展性的指南,这对于构建能够处理大量数据和高并发访问的应用程序至关重要。 - **MySQL Yum Repository**:为便于在Linux系统上安装MySQL及其相关...
- **HA/Scalability Guide** - 提供了关于如何提高MySQL系统的高可用性和可扩展性的指南。 - **复制** - 解释MySQL复制的工作原理,包括主从复制、多源复制等不同模式。 - **虚拟化** - 探讨在虚拟化环境中...
5. **性能vs可扩展性(Performance vs Scalability)**: - 如果系统对单个用户响应缓慢,可能是性能问题;如果系统对单个用户快速响应,但在高负载下变慢,则是可扩展性问题。 6. **延迟能力vs吞吐量(Latency vs ...
Java Performance and Scalability Volume 1