Linux Performance Analysis and optimization

Source: Internet
Author: User

What are the hardware factors that affect Linux systems?

1. CPU

①CPU speed and performance to a large extent determines the overall performance of the system, the higher the number of CPUs, the higher the frequency, the service

The better the performance of the device

② utilizes hyper-threaded CPUs to run multiple threads at the same time to improve system performance

③ in Linux, only the SMP kernel is running to support hyper-threading

④linux will identify multi-core processors as multiple separate CPUs, such as 2 4-core CPUs will be identified as 8

Single core CPU, the performance of the two is not equivalent

⑤ the more CPUs you install, the less hyper-threading improves performance

⑥ mail servers, dynamic Web servers may have CPU bottlenecks

2. Memory

① memory is too small, process is easy to be blocked, memory is too large, can lead to waste of resources

② virtual memory performance is less than physical memory, consuming too much virtual memory, and the performance of the application can be significantly degraded

③ can support up to 8G of physical memory on 32-bit Linux systems

④ due to the limitation of processor addressing range, on 32-bit systems, applications can use a single process up to 2G

Save

⑤ print servers, database servers, and static Web servers are prone to memory bottlenecks

3. Disk IO Performance

Use disk RAID technology to improve disk performance by choosing the Right RAID level

4. Network bandwidth


Linux Operating system optimization direction

1. System Installation Optimization

① Disk Partitioning:

The disk can be made RAID0 with frequent read and write operations and low data security requirements

High data security requirements and no special requirements for reading and writing can be made RAID1

Read requirements and data security is high, and write requirements can be made RAID5

High requirements for both read and write requirements and data security can be made raid0+1

② Settings for virtual memory

Physical memory less than 4G, set swap to twice times of memory

Physical memory greater than 4G less than 16G, set swap size equal to physical memory

Physical memory greater than 16G, can not set swap, but set a certain size of the swap is still a certain role

2. Optimization of kernel parameters

Refer to the blog http://blog.chinaunix.net/uid-21505614-id-2181210.html

3. File system optimization

The optional file system under Linux is Ext2, ext3, Ext4, XFS, etc.

The difference between ext2 and ext3 is that ext3 adds log file functionality

XFS is an advanced log file system with excellent logging capabilities, strong scalability, and fast write performance

and other advantages

4. Optimization of application Resources


This article is from the "a" blog, please make sure to keep this source http://lzs66.blog.51cto.com/9607068/1847192

Linux Performance Analysis and optimization

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.