analysis of high performance IO model
Server-side programming often requires the construction of high-performance IO models, with four common IO models:
(1) Synchronous blocking IO (Blocking io): The traditional IO model.
(2) Sync
here's a new piece. It's kind of a mend.
AnywayWhat is the difference between synchronous (synchronous) IO and asynchronous (asynchronous) Io, blocking (blocking) IO and non-blocking (non-blocking) IO respectively. The problem is that different people may give different answers, such as wikis, that asynchronous
here's a new piece. It's kind of a mend.
AnywayWhat is the difference between synchronous (synchronous) IO and asynchronous (asynchronous) Io, blocking (blocking) IO and non-blocking (non-blocking) IO respectively. The problem is that different people may give different answers, such as wikis, that asynchronous
These two articles analyze 5 kinds of IO models under Linux
http://blog.csdn.net/historyasamirror/article/details/5778378
http://blog.csdn.net/hguisu/article/details/7453390
Many people do not understand the concept of blocking/non-blocking, synchronous/asynchronous, do not know the difference between non-blocking and asynchronous Io, and generally think that non-blocking
First you need to knowWhat is Io:io is the input/output interfaceRead this article to take the following questions1. Cluster bottlenecks why IO?2. How much do you know about IO?This is only a personal point of view:When we are confronted with a cluster of operations, what we want is to be read. But in the face of big data, reading data needs to go through IO, whe
Reprint: http://blog.csdn.net/jay900323/article/details/18141217performance analysis of Linux five IO modelsDirectory (?) [-]
Conceptual understanding
Five types of IO models under Linux
Blocking IO Model
Non-blocking IO model
IO multiplexing
I. Conceptual understandingThere are four types of IO in Linux: synchronous (Sync) and asynchronous (async), blocking (block) and non-blocking (unblock)Sync: When a function call is made, it waits until the result is returned without getting the results.Async: When an asynchronous procedure call is made, the caller cannot get the result immediately. Notifies the caller by notification mechanism or callback function after completionBlocking: The curren
Add another theoretical analysis with high handwriting to facilitate a deeper understanding.
From: http://blog.csdn.net/historyasamirror/article/details/5778378
========================================================== ==================================
What are the differences between synchronous I/O and asynchronous I/O, blocking I/O, and non-blocking I/O? Different people may give different answers to this question. For example, wiki considers asynchronous
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
1. Questions:Recently in the real-time synchronization of the log, before the online is done a single part of the online log stress test, Message Queuing and client, the machine is no problem, but did not think of the second log, the problem came:A machine in the cluster top see the load high, the cluster of machine hardware configuration, the deployment of software are the same, but only this one load problem, the initial speculation that there may be hardware problems.At the same time, we also
Tags: Optimize modify understand table store reference response a traditionalI. IO introductionThere are four types of IO: continuous read, random read, random write and continuous write, the IO size of continuous reading and writing is usually larger (128KB-1MB), the main measure of throughput, and random read and write IO
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
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
The input/output of C + + is provided by the standard library. The standard library defines a set of types that support read-write (IO) for devices such as files and control Windows. Other types have also been defined so that the string object can operate like a file, allowing us to convert between data and characters without the need for IO. In general, class designers can also easily use the
1. Page CacheLinux OS writes are write-cached by default, and direct IO is used to bypass the operating system's write cache. When you write a string of data, the system will open up a memory area to cache the data, which is what we often call the page cache (the caching of the operating system's pages). View system memory commonly used commands are: Vmstat, free, top and so on. You can use Cat/proc/meminfo to view detailed memory usage where the cach
Basic concept blocking and non-blocking 阻塞是进行读写时, 如果当时没有东西可读,或者暂时不可写, 程序就进入等待, 直到有东西可读或者可写为止 Synchronous and asynchronous 同步是指的是用户操作后等待或者轮询的去查看操作是否就绪 异步是指用户某动作操作后便开始做其他动作,而当这个动作操作完成的时候用户会得到这个动作完成的通知IO model Synchronous blocking IO (JAVA BIO):In this way, the user process must wait for the IO operation to complete after initiating an
IO modelLinux system IO is divided into two phases: The kernel prepares the data and copies the data from the kernel to the user space.This diagram outlines the process of moving data from an external disk to the memory of a running program.User space, kernel spaceNow the operating system is using virtual memory, then for the 32-bit operating system, its address space (virtual storage space) is 4G (2 of 32)
1. Questions:Recently in the real-time synchronization of the log, before the online is done a single part of the online log stress test, Message Queuing and client, the machine is no problem, but did not think of the second log, the problem came:A machine in the cluster top see the load high, the cluster of machine hardware configuration, the deployment of software are the same, but only this one load problem, the initial speculation that there may be hardware problems.At the same time, we also
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.