MySQL performance indicator calculation and Optimization1 QPS computing (queries per second) for databases dominated by the MyISAM Engine
Mysql> show GLOBAL status like 'questions ';+ --------------- + ------------ +| Variable_name | Value |+ --------------- + ------------ +| Questions | 2009191409 |+ --------------- + ------------ +1 row in set (0.00 sec)
Mysql> show global status like 'uptime ';+ --------------- + -------- +| Variable_name | Value |
How to view system boot time and run time under Linux1.uptime commandOutput: 16:11:40 up, 4:21, 2 users, load average:0.00, 0.01, 0.002. View the/proc/uptime file calculation system start timeCat/proc/uptimeOutput: 5113396.94 575949.85The first number is the system has been running for 5,113,396,.94 seconds, using the System tool date to calculate the system boot time
Code: Select All
1.uptime commandOutput: 16:11:40 up, 4:21, 2 users, load average:0.00, 0.01, 0.002. View the/proc/uptime file calculation system start timeCat/proc/uptimeOutput: 5113396.94 575949.85The first number is the system has been running for 5,113,396,.94 seconds, using the System tool date to calculate the system boot time
Code:
[[email protected] ~]# date-d "$ (awk-f. ' {print $} '/proc/
In the analysis of the system, one of the first and most basic tools is often a simple measurement of the CPU utilization of the system. Linux and most unix-based operating systems provide a command to display the system's average load (loadaverage).
[huangc@v-02-01-00860 ~]$ uptime 11:18:05 up for days
, 1:17, one users, load average:0.20, 0.13, 0.12
Specifically, the average load value represents the average number of tasks that can be run with
Tags: random 5.4 Good handle OBA Rev calculation option occupiedMySQL performance index calculation and optimization method1 QPS calculation (number of queries per second)For MyISAM engine-based DB Mysql> show global status like ' questions '; +---------------+------------+ | variable_name | Value | +---------------+------------+ | Questions | 2805815665 | +---------------+------------+ 1 row in Set (0.00 sec) mysql> show global status like ' uptime
If you want to write ruby code on your own and deploy it at any time, you can view it everywhere. The heroku domain name is unfriendly and slow in China, so I think of capistrano, so I started learning...
Capistrano
Https://www.evernote.com/shard/s6/sh/72a2b7c8-d531-4efc-9e16-ac82af2a92b7/e54fca8a9e7014ad87c79e7a7a5538c4
Capistrano new version installation
Http://capistranorb.com/documentation/getting-started/preparing-your-application/
Http://capistranorb.com/
# Deploy in GemfileGem 'capis
Tags: showstatus; flushstatus; view current number of connections SHOWSTATUSLIKE ' thread_% '; Thread_cached: Number of threads cached thread_running: Number of threads active thread_connected: Number of threads currently connected thread_created: The number of threads that are created in total cachehitsthread_connected=showglobalstatuslikethread_ Created connections=showglobalstatuslike ' Connections '; Tch= (1- (threads_created/connections)) *100 View active connection content showprocesslist
%, creating a connection takes time and increases the number of thread_cachedQPS(query throughput per second) MyISAM engineQuestions = SHOW GLOBAL STATUS like ' Questions ';Uptime = SHOW GLOBAL STATUS like ' Uptime ';Qps=questions/uptimeTps(number of things transferred per second), that is, the number of transactions processed per second by the server, and if InnoDB is displayed, no InnoDB will be displayed
There are two sorting fields, the update time: upTime release time: After the addTime article is published, there will be its release time. If you modify the article, a modification time will be saved. Sort data on the homepage according to the following rules: 1. If an article with an update time uses upTime, only the published time uses ad..., there are two sorting fields,
Update Time:
Original post address:Http://community.csdn.net/Expert/topic/3662/3662135.xml? Temp =. 4289972.
-- Test DataCreate Table Tb (ID int primary key, grade varchar (10), uptime datetime)Insert TB select 1, 'A', '2017-12-11'Union all select 2, 'B', '2017-12-11'Union all select 3, 'C', '2017-12-11'Union all select 4, 'A', '2017-12-12'Union all select 5, 'C', '2017-12-13'Union all select 6, 'C', '2017-12-13'Union all select 7, 'A', '2017-12-14'Union all Selec
SHOW STATUS;FLUSH STATUS;View current number of connections show STATUS like ' thread_% ';Thread_cached: The number of threads being cachedThread_running: The number of threads in the active stateThread_connected: The number of threads currently connectedthread_created: Number of threads created in totalThread Cache Hitsthread_connected = SHOW GLOBAL STATUS like thread_created;Connections = SHOW GLOBAL STATUS like ' Connections ';Tch= (1-(threads_created/connections)) * 100View Active Connected
View boot time in WindowsUnder Windows, you can use the systeminfo command to view.Here's what the site extracts about how long windows started.1.Windows systems can see how long it has been running from power on to now, which is useful, for example, in order to test the stability of the system, or for other reasons, to know how long the Windows operating system has been running, without the need for special tool software to view it, The operating system itself can do, the following to see the s
1:CPU architecture and how it works 2: Operating Systems and processes
3: Metrics to measure CPU busy
4:CPU resources as a symptom of system performance bottlenecks
5: Which processes are the big players that consume CPU resources?
6: Using the SAR tool to analyze CPU utilization
7: Analyze the running process queue length with the SAR tool
8: Analyzing system calls with SAR tools
9: Test the execution efficiency of a command and program with the time command
10: Use the top command to view the
]
2015-05-08T09: 06: 42.270 + 0800 I CONTROL [initandlisten] ** WARNING:/sys/kernel/mm/transparent_hugepage/defrag is 'alway '.
T09: 06: 42.270 + 0800 I CONTROL [initandlisten] ** We suggest setting it to 'never'
T09: 06: 42.270 + 0800 I CONTROL [initandlisten]
# Use the admin Database
> Use admin;
Switched to db admin
# Define replica set configuration variables and initialize them. The _ id: "replSet" here must be the same as the preceding command parameter "-- replSet repl ".
> Db. runComm
When a Linux system encounters a problem, we not only need to view the system log information, but also need to use a large number of performance monitoring tools to determine which part (memory, CPU, hard disk ......) An error occurred. In Linux, all running parameters are stored in the virtual directory/proc. In other words, the data value obtained by the performance monitoring tool is actually derived from this directory, when system overestimates are involved, we can modify the relevant para
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.