The idea of Linux system optimization

Source: Internet
Author: User
Tags memory usage php and

Linux operating system is an open source product, but also an open source software practice and application platform, in this platform there are countless open source software support, our common Apache, tomcat, MySQL, PHP and so on, the biggest idea of open source software is free, open, So Linux as an open source platform, ultimately to achieve through these open source software support, at the lowest cost, to achieve the best application performance. Therefore, when it comes to performance issues, the main implementation is the best combination of Linux operating systems and applications.

The performance of the system refers to the effectiveness, stability and response speed of the operating system accomplishing the task. Linux system administrators may often encounter problems such as system instability, slow response, such as a Web service on Linux, frequent web pages can not open, slow to open, and so on, some people will complain about the Linux system is not good, in fact, these are surface phenomena. When the operating system completes a task, it is closely related to the system itself setup, network topology structure, routing device, routing strategy, Access device, physical circuit and so on, and any problem will affect the performance of the whole system. Therefore, when the Linux application problems, should be from the application, operating system, server hardware, network environment, such as comprehensive troubleshooting, positioning problems in which part, and then focus on solving.

In the application, operating system, server hardware, network environment and so on, the impact of the most performance is the application and operating system two aspects, because these two aspects of the problem is not easy to detect, concealment is very strong. and hardware, network, as long as there are problems, generally can be positioned immediately. This chapter is mainly about operating system performance tuning ideas, applications need specific problems specific treatment.

General ideas for solving system performance problems

The following is a general idea and method to optimize Linux from three aspects, which affect operating system performance, performance optimization tool and system capability evaluation standard.

Factors that affect Linux performance

1. Cpu

CPU is the operating system stable operation of the fundamental, CPU speed and performance of a large part of the system to determine the overall performance, therefore, the number of CPUs, the higher the frequency, server performance is relatively better. But that's not exactly the case.

Most CPUs currently run only one thread at a time, hyper-threading processors can run multiple threads at the same time, so you can use the processor's Hyper-threading feature to improve system performance, under Linux, only the SMP kernel is running to support hyper-threading, but the more CPUs are installed, The fewer performance gains you get from Hyper-threading. In addition, the Linux kernel identifies multi-core processors as separate CPUs, such as two 4-core CPUs, with 8 CPUs under the Linux system. But from the performance point of view, the two 4-core CPU and 8 single core CPU is not exactly equivalent, according to the authority of the test concluded that the overall performance of the former is lower than the latter 25%-30%.

There may be CPU bottlenecks in the application of the mail server, Dynamic Web server, etc., for such applications to the CPU configuration and performance in the main position.

2. Memory

The size of the memory is also an important factor affecting Linux performance, memory is too small, the system process will be blocked, the application will become slow, or even loss of response, memory is too large, resulting in waste of resources. The Linux system uses the concepts of physical memory and virtual memory, although virtual memory can alleviate the lack of physical memory, but the use of excessive virtual memory, application performance will be significantly reduced to ensure that the application of high-performance operation, the physical memory must be large enough, but too much physical memory, can cause memory waste , such as on a 32-bit processor's Linux operating system, more than 8G of physical memory will be wasted. Therefore, to use a larger memory, it is recommended to install a 64-bit operating system, while opening the Linux large memory kernel support.

Due to the limitation of processor addressing scope, the application can only use 2G of memory on a 32-bit Linux operating system, so that even if the system has more memory, the application can not "enjoy", the solution is to use 64 for the processor, install 64-bit operating system, Under 64-bit operating systems, there is almost no limit to the memory usage requirements of all applications [G1].

Memory performance bottlenecks may occur with print servers, database servers, static Web servers, and so on, for such applications to place the memory size in the main position.

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.