Related noun analysisSynchronization (synchronous): When a process executes a task, another process must wait for it to finish before it can continue execution#所谓同步, that is, when a function call is made, the call does not return until the result is obtained. By this definition, the vast majority of functions are synchronous invocations. But generally speaking, we are talking about synchronous and asynchronous tasks, especially those that require other components to collaborate or need to be don
Reproduced from: http://blog.csdn.net/daijialin/article/details/231384Prior to JDK 1.4, Java IO Operations were concentrated in the Java.io package and were based on the streaming blocking (blocking) API. For most applications, such APIs are easy to use, however, some applications with high performance requirements, especially server applications, often require a more efficient way to process IO. From JDK 1
AIO (asynchronous blocking IO) asynchronous blocking IONIO is a synchronous IO, because the program requires IO when it needs to get the IO permission to do the IO operation in person before the next operation. AIO is an improvement on NIO (so Aio is also called nio.2), whic
With JavaScript or jquery, you know that JavaScript, especially jquery, has a lot of callback functions, such as Ajax, jquery animations, and so on.$.get (URL, function () {doSomething1 ();//(3)}); (1) doSomething2 (); (2)The code above is jquery Ajax, because Ajax is asynchronous, so in the process of requesting a URL does not block the program, that is, the program runs to (1) does not wait for the results of the AJAX request, continue to execute (2). The second parameter of $.get is a callba
The content of this section:
Introduction to I/O Models
Blocking I/O (blocking IO)
non-blocking I/O (non-blocking IO)
multiplexed I/O (IO Multiplexing)
Asynchronous I/O (asynchronous I/o)
IO Model comparison and analysis
Selectors module
Introduction to an
I recently learned the I/O model and suddenly thought of the I/O model of epoll. To study this problem, we must first know which I/O models are commonly used. Common Io models are as follows: Blocking IO: The program is blocked until Io is available. The simplest I/O model. The recvfrom receiving function you call usually belongs to this model. Non-blocking
is what to do. This can cause a large delay for random reads, bad for database applications, and a good performance for Web servers. This algorithm can also be easily understood to target low-speed disks, because that "guess" is actually intended to reduce the head movement time. This algorithm is therefore more suitable for sequential read and write applications. The kernel parameters that can be used for tuning are Antic_expire, Read_expire, and Write_expire.How to view and set the
Blocking io (blocking IO)In Linux, all sockets are blocking by default, and a typical read operation flow is probably this:When the user process invokes the RECVFROM system call, Kernel begins the first phase of IO: Preparing the data. For network IO, there are times when the data has not arrived at first (for example,
After the organization inspection, I suddenly found myself in the most commonly used Java also have a lot of not understand the place, real for arise a great pity, today deliberately take the time to record these bits, share with you The first batch of knowledge points to be sorted out are as follows:
Java IO Inquiry, the entire structure and development of Io, incidentally, accompanied by a compa
File descriptor: A non-negative integer that is the index of the kernel Open file table.
Each process has its own file descriptor, the kernel maintains an open file table, a different descriptor points to the kernel File open table, and points to the actual location of the file on the I-node table.
Linux System File IO functions ( details can be used in the Linux shell man-a + function name query or query on the Man-online ):
Fd=open (Pathname,flags,
Here is the MySQL Ver 14.14 distrib 5.6.19, for Linux (i686) using Editline Wrapper
A, MySQL directory files
IBDATA1: System table space contains data dictionary, rollback log/undolog, etc.
(Insert buffer segment/double write Segment/rollback segment/index segment/dictionary segment/undo segment)
Ib_logfile0/ib_logfile1: Transaction log/redolog
Mysql-relay-bin: Relay Log
Binarylog: Binary Log
General_log.log: Regular Log
Mysql_error.log: Error Log
Slow_query.log: Slow Log
. IBD: User t
Waiting for data preparation (waiting for theCopy data from the kernel into the process (Copying the data from the kernel-the process)Stevens compared five IO Model in the article:Blocking IOnonblocking IOIO multiplexingSignal Driven IOAsynchronous IOSince signal driven IO is not commonly used in practice, I only refer to the remaining four IO Model.Blocking
I reviewed the concepts related to Io, NIO and AIO in the morning and recorded some of these points.
from the programming language level
BIO | NIO | AIO in the Java perspective, understanding, Linux C also has the concept of AIO (library), these concepts do not know what reason is fired up, here only from the Java perspective.
BIO, synchronous blocking Io, simple comprehension: One connect
Classes or interfaces related to Java stream operations:Java Flow class diagram structure:concept and function of flowA stream is a set of sequences of bytes that have a starting point and an end point, a generic or abstract of the data transfer. That is, the transmission of data between the two devices is called the flow, the essence of the flow is data transmission, according to the data transmission characteristics of the stream abstracted into various classes, convenient and more intuitive d
Sometimes when we do maintenance, there will always be similar to the IO is particularly high, but can not be determined to be an IO bottleneck or improper setting of software parameters caused hot disk problems. This is usually the time to know the disk read and write speed, to make the next decision.Here are two methods of testing:(1) using the Hdparm commandThis is a command that is used to obtain the pa
Introduction Java NiO, introduced from JDK1.4, provides a completely different way of working with standard IO. The NIO package (java.nio.*) introduces four key abstract data types that work together to address some of the problems in traditional I/O classes. 1, Buffer: It is a linear table structure that contains data and is used for reading and writing. It also provides a special class for I/O operations for memory-mapped files. 2, Charset: I
Java IO Stream LearningClasses or interfaces related to Java stream operations:Java Flow class diagram structure:concept and function of flowA stream is a set of sequences of bytes that have a starting point and an end point, a generic or abstract of the data transfer. That is, the transmission of data between the two devices is called the flow, the essence of the flow is data transmission, according to the data transmission characteristics of the str
It is the well-known "Murphy's Law" to be afraid of what to do. Java Foundation covers all aspects, dare to say that the Java foundation of the people are not just graduating students, is working n years of programmers. Programmers who work n years don't even dare everyone to say that Java is a solid foundation, or even proficient, often just "without him"-skilled.Io This piece I am really afraid, it is not difficult, there are only two aspects: input/output. But you said it used a lot, I believ
Asynchronous
First, talk about asynchronous IO (Aio)
In HP-UX, when synchronous IO is used, this means that the previous IO must return the "successful write" information before the next write Io, and see a performance bottleneck in the synchronous IO mode in a system with a
One. NUMA settingsStandalone single instance, it is recommended to turn off NUMA, there are three ways to shut down:1. Hardware layer, set off in BIOS;2.OS kernel, set numa=off at startup;3. You can modify the memory allocation policy to Interleave (cross) with the Numactl commandMethod 3Modify Mysql.server 330 lines plus numactlVi/opt/mysql/bin/mysql.server
/usr/bin/numactl--interleave all $bindir/mysqld_safe--datadir= $datadir--pid-file= $server _pid_file $other _args > /dev/null 2>1
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.