System stability and what factors

What are the factors related to system stability

What are the factors related to system stability? Stability refers to "the ability of a measuring instrument to maintain its measurement characteristics constant over time. Usually stability refers to the ability of the measuring instrument's measurement characteristics do not change over time. The following shares what factors are associated with system stability.

System stability and what factors 1

Nightfall

Methods of abnormal online alarms, locate logs, null pointer abnormal, query database results are empty, locate this line of business query from the library, the database is normal, the query results are normal, initially determined to be the master-slave delay. The problem resumed in a few seconds, the impact of the number of single-digit, the next few months several times this problem, until the first day of double 11 preparation delay is more serious.

Long night slowly

Positioning the master-slave synchronization latency problem, check the slave machine situation and slow logs. The slave is performing a lot of deletions of certain table records, and the performance is very poor. In looking at its execution statement, found that there is no index, in the next look at the master library on this table has this index. Why is there high latency of master and slave in this case? Here is a brief introduction to the principle of mysql master-slave synchronization.

mysql master-slave replication requires three threads, masterbinlog dump thread, slaveI/O thread, SQL thread.

master

1, binlog dump thread: When there is a data update in the master database, then the master database will be based on the binlog format set in accordance with the type of the event of the update will be written to the master database binlog file at this time. The master will create a log dump thread to notify the slave that there is a data update, and when the I/O thread requests the contents of the log, it will pass the name of the binlog and the location of the current update to the I/O thread of the slave at the same time.

slave

2. I/O thread : This thread connects to the master, requests a copy of the specified binlog file location from the log dump thread, and saves the requested binlog back to the local relay log, relay log and binlog log is also a record of data update events, it is also in accordance with the incremental suffix name of the way to generate multiple relay log hostname-relay-bin.000001, file, the slave will use an index file hostname-relay-bin.index file. bin.index, to keep track of which relay log file is currently in use.

3. SQL thread: When this thread detects an update to the relay log, it reads it and does a redo operation locally to re-execute the events that occurred in the master database locally to keep the master and slave data synchronized. In addition, if all the events in a relay log file are executed, the SQL thread automatically deletes the relay log file.

The following is a schematic diagram of the entire replication process:

Combined with the above principles of mysql master-slave synchronization, the cause of the problem on our line has come out, in fact, slow SQL is just the appearance of our cause, the deeper reason is the sequence of events from the library SQL thread to execute the Relay log. Execution of any event with poor performance will give us a high latency in the master-slave.

Dawn of the Dawn

Indexing from the slave library reduces master-slave latency and has no perceptible impact on online business.

Our system architecture situation is as follows:

In order to reduce the pressure on the database master, each line of business has its own slave, and the current situation of our database is 1 master and 8 slaves. If the master-slave latency is very high then the most obvious impact is the read latency of each of our lines of business, and businesses that rely on reads will have problems.

Master-slave latency is one of the factors that affects the stability of our system. How can we reduce master-slave latency to minimize its impact on our system? There are many ways to reduce master-slave latency in the industry. Here is a brief description of some of them:

The service infrastructure adds a memcache or Redis cache layer between the service and mysql. Reduce the read pressure on mysql;

Use a better hardware device than the master as the slave;

sync_binlog is set to 0 on the slave side;

-logs-slave-updates from-server-from-master Updates received by the server from the master are not logged in its binary log;

-logs-slave-updates The slave's binlog is disabled.

System Stability and What Factors2

System Stability and Several Definitions of Stability

I. The System Before examining the stability of a system,

We first need to have a preliminary understanding of the concept of system. In the theory of digital signal processing, people call the entity that can process and transform digital signals a system. Since the system for processing digital signals is processing operations on signals at a specified moment or time sequence so such a system is regarded as discrete time', and it can also be described by four methods, such as time-based language, tables, formulas, waveforms, and so on. In an abstract sense, both systems and signals can be viewed as

sequences. However, systems are bodies that process signals, and this is different from signals. People study the system also need to design the system, using the system to process signals,

service to human beings, the system also needs other methods to further describe. Methods of describing systems include symbols, unit impulse responses, differential equations, and graphs. According to Chinese scholar Qian Xuesen:

A system is a combination of several components that interact and depend on each other to form an organic whole with a specific function, and this organic whole is a component of a larger system to which it is subordinate.

Second, the stability of the system

A system, if for any bounded input, its zero-state response is also bounded, then the system is said to be bounded input bounded output (Bound Input Bound Output ------ BIBO) stable system, referred to as stable. system. That is, a system is said to be stable if its zero-state response |yzs(-)|≤My (M is a finite constant) for all excitations |f-)|≤Mf.

III. Continuous (Time)

Systems and Discrete (Time) Systems Continuous system: a system in which time and the variables of each component have a continuously varying form. The excitation and response of the system are continuous signals. Discrete system. A system is called a discrete system when the pattern of change of the physical quantities with time cannot be described by a continuous function, but gives values only at discrete moments. The excitation and response of the system are discrete signals.

Fourth, causal system

Causal system (causal system) is a system in which the output (response) occurs when and only when the input signal excites the system. That is, the (response) of a causal system does not occur at a previous moment when the input signal excites the system. That is, a system in which the response of the input cannot occur before the moment at which this input arrives; that is, a system in which the output of the system is related only to current and past inputs, but not to future inputs.

What stability means

Stability is "the ability of a measuring instrument to maintain its metrological properties constant over time. Typically, stability refers to the ability of a measuring instrument to keep its measurement characteristics constant over time. If the stability is not with respect to time, but with respect to other quantities, this should be explicitly stated. Stability can be characterized quantitatively, primarily by determining the relationship between changes in metrological characteristics over time. There are many types of automatic control systems and the functions they accomplish vary widely; some are used to control changes in temperature while others track the flight path of an airplane. But all systems have a **** the same characteristics to be able to work properly, that is, to meet the stability requirements.

Instrumental Measurement

Usually can be used in the following two ways: with the measurement of the characteristics of the change in a specified amount of time elapsed, or with the measurement of the characteristics of the time elapsed by the amount of change in the amount of quantitative representation. For example: for the standard battery, its long-term stability (potential annual change) and short-term stability (3 ~ 5 days within the potential change) are clear requirements; such as the stability of the size of the block, the maximum permitted annual change in the length of its provisions (micron years) to assess the stability of the above indicators are an important basis for the division of the accuracy level.

For measuring instruments, especially benchmarks, measurement standards or some physical gages, stability is one of the important measurement performance, the stability of the value is to ensure that the value of the basis for accurate. Measuring instruments produce a lot of unstable factors, the main reason is the aging of the components, parts of the wear and tear, as well as the use, storage, maintenance work is not careful and so on. Measuring instruments for periodic verification or calibration, is a kind of assessment of its stability. Stability is also an important basis for scientific and rational determination of the verification cycle. [1]

Example

What is meant by stability? We can understand the concept of stability through a simple example. A steel ball is placed on two different wooden blocks, figure A on the top of the block and figure B on the bottom of the block. If a force is applied to the steel ball that causes it to move away from its original position, the steel ball in figure A will slide downward and will not return to its original position. The steel ball in figure B, on the other hand, will do a rolling back and forth motion at the bottom of the wooden block due to the Earth's gravity, and when enough time passes, the ball will eventually return to its original position. We say that the situation in diagram A is unstable, while the situation in diagram B is stable.

The above gives a simple physical system through which we have a basic understanding of stability. Stability can be defined in this way: when an actual system is in a state of equilibrium is equivalent to the state of the ball placed on a wooden block, if affected by external effects equivalent to the force exerted on the ball in the above example, the system can still return to the original equilibrium state after a transition process, we say that the system is stable, otherwise called the system is not stable. A control system to be able to achieve the required control function must be stable. In a real application system, there are energy storage elements in the system, and inertia exists in each element. Thus when the input to the system is given, the output will generally oscillate between the desired output. At this point the system absorbs energy from the outside world. For a stable system the oscillations are decreasing in amplitude, while for an unstable system the oscillations are increasing oscillations. The former will equilibrate to a state, while the latter will increase until the system is damaged.

Discriminating

Since stability is important, how do we know if a system is stable? Control scientists have given us many theorems for determining whether a system is stable or not. These theorems are based on the mathematical model of the system, according to the form of the mathematical model, after a certain amount of calculation can be concluded that the stability of these theorems, these theorems are more famous: Rouse's criterion, Hurwitz's criterion, Li Yasu Spectrum Ruofe three theorems. These methods of determining stability are suitable for different mathematical models, the first two are mainly through the judgment of the eigenvalue of the system is less than zero to determine whether the system is stable, the latter is mainly through the examination of the system energy decay to determine the stability.

Of course, the stability of the system is only a basic requirement for the system, a satisfactory control system must also meet many other indicators, such as transition time, overshooting, steady state error, regulation time. A good system is often the result of a combination of these aspects.