Improve server performance and concurrency

Source: Internet
Author: User

Philosophically speaking, eliminating bottlenecks is the only way to improve server performance and concurrency capabilities.
If you can eliminate all bottlenecks, you will be able to maximize the performance of the hardware, so that the performance and concurrency of the system to reach the best.
Use multi-threaded multicore programming, using event-driven or asynchronous messaging mechanisms to minimize blocking and waiting operations (such as I/O blocking, synchronous wait, or timing/timeouts, etc.).
Principle:
1. Multithreading multi-core programming, eliminate CPU bottleneck.
2, using IOCP or Epoll, the use of State monitoring and notification methods to eliminate network I/O blocking bottlenecks.
3, the use of event-driven or asynchronous message mechanism, you can eliminate unnecessary wait operations.
4. In the case of Linux, AIO can be used to eliminate disk I/O blocking bottlenecks.
5. The timer event is handled uniformly in the event-driven framework or asynchronous message, and the synchronization is asynchronous, and countless timer events can be handled in one thread.
6, in-depth analysis of external blocking sources, eliminate it.
For example, the database query is slow, cause the server processing is slow, the number of concurrent does not go, this is the optimization of database performance.
7, if the traffic with some other server is very large, resulting in more performance degradation.

Consider putting the two servers on a single host, using shared memory to do IPC communication, which can greatly improve performance.

Improve server performance and concurrency

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.