How to get the common performance parameters of the server MySQL performance jetty performance

Source: Internet
Author: User
Tags garbage collection joins mysql query python script

MySQL Storage server S:I5,8G,SSD; CentOS 7 x64; Install graphical monitoring tools (the monitoring tools themselves also consume resources)

Jetty Application Server A:I5,8G,SSD; CentOS 7 x64; Install graphical monitoring tools (the monitoring tools themselves also consume resources)

LAN Internal testing machine T:I5,8G,SSD

How to obtain the limit performance parameters of S and a, and the limit performance parameters after s and a combined



Ensure that LAN bandwidth is not a bottleneck.



S service test method:

Write a Python script on T to ensure that the Python script execution is not a bottleneck. Or use the MySQL test tool.

1, only open the MySQL connection, do not turn off the MySQL connection, observing the s parameters (CPU, RAM, network traffic access, disk IO) trend map. Increase the number of parallel (note that the number of concurrent numbers is the number of concurrent numbers that are visually visible on T.) The ability of T determines the maximum number of concurrent numbers that can be reached, and the stages of the process are expected: the normal open connection, the time it takes to open the connection is significantly longer (thus determining what the primary resource is for MySQL to maintain a connection), the connection cannot be opened, and s freezes.

2a, open the MySQL connection, select a complex constant expression, close the connection. Increase the number of parallel, experience the various stages of the expected: normal, CPU consumption fierce.

2b, change the complex expression to execute a stored procedure call that specifies the length of time. Increase the number of parallel, through the various stages of the expected: normal, CPU consumption fierce, s panic. Observe the changes in resource occupancy experienced by S.

3, constructs a table, inserts only.   Increase the number of concurrent and watch s resource occupancy changes. This amplifies the consumption of each phase of an INSERT statement

4, a table, size beyond 8GB, only inserted. Observe at this time S.

5, a table, first insert, then query.  Increase the number of concurrent observations. This is the general e-commerce system under the pressure of a single server (amplified after what is the phenomenon?) )

6, constructs the memory table, re-simulates 3, 4 (table size changed to half memory), 5, observe the phenomenon. The limit of CPU and RAM is obtained in the case of no disk bottleneck.

7, Memory table, select a from T1 where non-indexed field = ' xx ', using different size of T1 table, observation. Observing conditions in non-indexed cases

8. Change the 7 field to an indexed field, and the index file is in memory. Observation.

9, Memory table, group by non-indexed field, observation.

10. Change 9 to Index field, index file in memory. Observation.

11, trigger, adjust the height, observation.

12, the user table joins the order form joins the commodity table, observes.

13. Disk table, select ID ... where ...    and select * ..., (pay attention to the conditions of the change against the MySQL query cache) to compare observations. Zooming in is the pattern of storage on disk between records of the same row.

... Cond


Jetty Part Spring Mvc+freemarker

The jetty log file is configured under the memory partition and is set to 32MB after discarding. Prevent disk first as a bottleneck.

1, request a null method in the controller, high parallel, observe a. This should be the spring MVC itself, the network bandwidth, the JVM itself consumption.

2, request the controller in a dead loop method, high parallel, observe a. Observe the condition at the time of the crash.

3, the controller has a sleep10 seconds, high parallel, observe a.

4. Add new ArrayList (100) to the method to increase parallelism and observe a.

5, the method constructs a reference ring-dependent, to ensure that two objects are not recycled by garbage collection thread, to ensure that each leak 1MB of memory, increase concurrency, observe a.

6, the method directly do 2/0 operation, increase concurrency, observe a. If you can zoom in, you should see the consumption of exceptions propagating on the method call chain.

7. Change 6 to (int) 1.0

8, Freemarker loop A 1MB array, high concurrency, observation.



MySQL Jetty combined

1, Memory table user size 2GB, perform login (query User,md5, record session, return to home page content), high-speed parallel. Observe S, A, who freezes first. If not, add more t and each t adjusts to a parallel number that is close to the T panic.

2, 1 if a first crash, change to A1 A2 S, high parallel until the crash.

3, 1 if s first crash, then change to a S1 S2, high parallel until the crash.

4, Memory table, display a page of goods, orders, change the status of the order.    increase concurrency, observation. This is to enlarge the e-commerce to order.

5, the 4 of the goods, the order table size is changed to 1/4 memory size

6, the operation of the log, a random display of a page. Increase concurrency.

... Cond


The above experiment is about the intuitive mastery of disk IO, computer (CPU, RAM), multi-machine mate (cluster)


Specific steps to add later



This article is from the "12426146" blog, please be sure to keep this source http://12436146.blog.51cto.com/12426146/1884403

How to get the common performance parameters of the server MySQL performance jetty performance

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.