Compare the overhead of hardware and operating systems.
We will combine 1 and 2 for comparison:
Select the following basic hardware platforms:
Typical laptop, p4m platform, M Nic, M memory
Typical desktop, P4 platform, 512 M Nic, memory
Typical server, Xeon platform, Gigabit Nic, 1 GB memory
Typical amd64-bit server, Gigabit Nic, 1 GB memory
Software systems include:
Windows:
Windows2000 transfer sion
Windows2000 advance Server
Free UNIX systems:
Linux 2.4 kernel
Linux 2.6 kernel
Freebsd5.1 Kernel
Major performance evaluations include:
Basic Call evaluation of operating systems that affect server performance
L allocate/release memory overhead
L overhead for creating/suspending threads/processes
L overhead of mutex lock (overhead of context switch)
L memory image file creation/read/write overhead
Basic Evaluation of operating system network performance
L socket creation/release overhead
L socket binding overhead
L network connection overhead
L throughput for sending/receiving data
L The latency and overhead of a standard HTTP Request/response.
Preliminary results show that, in terms of hardware, the Xeon system apparently exceeded the average laptop and desktop, AMD's 64-bit system has excellent performance at a low frequency (we still use 32-bit software for testing ). In terms of operating systems, all UNIX-like systems fully surpass the Windows platform, while the linux2.6 kernel is the best in all platforms.
Network I/OModel Design and Evaluation:
The basic concept is how the operating system notifies the application software to obtain or send data from a socket.
The simplest way is to use the polling mechanism to check the socket status cyclically. In many cases, this method is the most efficient.
The specific application scope of the round robin method:
Secondly, the method of connecting one thread is used. The feasibility of this method is determined
Number of threads available for the operating system
Overhead of operating system thread creation and switching between threads. (Preliminary tests show that the Linux 5000 kernel can create more than threads per second)
There are two basic message triggering methods:
Conditional trigger and edge trigger
A common SELECT statement is conditional trigger.
Window platform:
Including common select models
Event select model
The IO completed port model is actually an edge-triggered mechanism.
Linux platform
The biggest problem with the basic select model is to find the socket event (the essence of the socket is the file handle, so the number is huge)
Edge trigger:
2.4 kernel-recommended Real-Time Signal Model
2.6 kernel-recommended epoll Model
FreeBSD
Basic select model
Edge-triggered kqueue Model
Performance evaluation:
Basic tests show that the Linux 2.6 kernel is the winner in the number of concurrent connections at the same time, the latency and throughput of each connection, and its performance significantly exceeds the 2.4 kernel and FreeBSD. All UNIX-like systems leave windows far behind. In comparison with various Io models, epoll of the linux2.6 kernel also becomes the winner, while the IO completion port is still the last one. Obviously, the requirement on ease of use and graphic performance makes windows not suitable as a server-side operating system.
From: http://www.cnblogs.com/fangzi/archive/2006/07/16/452106.html