Linux servers have various uses, such as Web server or branch office internal servers, CMS or CRS servers, file servers (for Windows and /or Linux user services), VoIP phone servers, mail or domain name servers, database servers, clouds Calculate infrastructure nodes, etc. in the configuration.
Linux is rich, powerful, and flexible, and you can use it to accomplish a variety of tasks. In this article, we'll discuss some tips for improving the performance of Linux servers.
1, adjust the Linux kernel elevator algorithm for disk I /O
After selecting the file system, there are some kernel and mount options may affect its performance, one of the kernel settings It is an elevator algorithm that adjusts the elevator algorithm so that the system can balance low latency requirements and collect enough data to efficiently organize read and write requests to the disk.
2, disable unnecessary daemons, save memory and CPU resources
Each server runs many daemons or services, and ironically, there are many that are usually not Required, these services are not working, but they consume valuable memory and CPU time. In addition, they may put the server in a dangerous situation. Running one more service is equivalent to opening a long-opening door to the hacker. Therefore, you should remove them from the server. The biggest advantage of disabling them is to speed up the startup time and release. RAM. In addition, you can reduce the number of processes that the CPU needs to process. Another benefit of disabling them is to enhance server security, because fewer daemons mean fewer vulnerabilities that can be exploited and exploited.
The following are some Linux daemons that should be disabled. By default, they all run automatically:
No. Daemon Description 1 Apmd Advanced Power Management Daemon 2Nfslock for NFS file locking 3Isdn ISDN Moderm supports 4Autofs to automatically mount the file system in the background (such as auto-mount CD-ROM) 5Sendmail mail transfer agent 6Xfs X Window font server
3, turn off the GUI
Generally speaking, the Linux server is Without the GUI, all administrative tasks can be done from the command line, so it is best to turn off the GUI, redirect the X display or display it through a web browser interface. In order to disable the GUI, "init level" should be set to 3 (command line login) instead of 5 (graphic login), if you need a GUI, you can run startx to enter the graphical user interface at any time.
4. Clean up unwanted modules or functions
There are too many functions or modules that are started in the server package that are not actually needed (such as many functional modules in Apache) Check the Apache configuration file carefully to see if FrontPage support or other additional modules are really needed. If you don't need it, you should not hesitate to disable it from the server. This will help increase system memory availability and free up more. Resources give software that really needs them to run faster.
5. Disable Control Panel
In Linux, there are many popular control panels, such as Cpanel, Plesk, Webmin and phpMyAdmin. I believe that every Linux novice user likes these control panels. However, disabling these packages can free up about 120MB of memory, so I highly recommend disabling these control panels unless they really need to be used, they can be passed through a PHP script (although somewhat unsafe), or command line commands. Enabled, after doing so, memory usage can be reduced by approximately 30-40%.
6, improve Linux Exim server performance
There are many ways to improve the server's Exim performance, one of which is to use the DNS cache daemon, which can reduce the bandwidth and CPU required to resolve DNS records Time, DNS caching improves network performance by eliminating the need to look up DNS records from the root node every time. Djbdns is a very powerful DNS server with DNS caching. Djbdns is more secure and better than BIND DNS server. It can be downloaded directly from http://cr.yp.to/or from a package provided by Red Hat.
7, using AES256 to enhance gpg file encryption security
In order to improve the security of backup files or sensitive information, many Linux system administrators will use gpg for encryption, when using gpg, it is best to specify Gpg uses the AES256 encryption algorithm. AES256 uses a 256-bit key. It is an open encryption algorithm that is used by the National Security Agency (NSA) to protect top secret information. Nothing is safer than it.
8. Remote Backup Service Security
Security is the most important factor in choosing a remote backup service. Most system administrators are afraid of two things: (hacker) can delete backup files, not from Backup recovery system.
In order to ensure 100% security of the backup file, the backup service company provides a remote backup server, using spp script or RSYNC to transfer data through SSH, so that no one can directly access and access the remote system, so no one Data can be deleted from the backup service. When choosing a remote backup service provider, it's best to understand its service robustness in several ways, and if you can, you can test it yourself.
9, update the default kernel parameter settings
In order to successfully and successfully run enterprise applications, such as database servers, you may need to update some default kernel parameter settings, for example, 2.4.x series kernel messages The queue parameter msgmni has a default value (for example, shared memory, or shmmax has only 33535432 bytes by default on Red Hat systems), it only allows limited database concurrent connections. The following provides some recommended values for the database server to run better ( From the IBM DB2 support site):
kernel.shmmax=268435456 (32-bit) kernel.shmmax=1073741824 (64-bit) kernel.msgmni=1024fs.file-max=8192kernel.sem=”250 32000 32 1024 "10, Optimized TCP
Optimizing the TCP protocol helps to improve network throughput. The bandwidth used for communication across the WAN is larger. The longer the delay, the larger the TCP Linux size is recommended. To increase the data transfer rate, the TCP Linux size determines how much data the sending host can send to the receiving host when it does not receive a data transmission acknowledgement.
One Cancel Anonymous Access Function By default, the FTP server of Wi
This article aims to teach the first contact with VPS novice, if you are a veteran. Can leave, there
server hardware - the hard drive. If the motherboard is compared to the brain and the CPU is the hea
Six, website ID For the IIS server, the only one that identifies a website is not the name of the w
Actually repair disk array Raid-d volume
Security tips teach you how to use SSL to give IIS a lock
Apache URL Redirection Avoids URL Ending Slash Issues
How to improve RAID 5 data recovery success rate
Three series Choose servers from Intel mainstream processors
Server leases five major fraud methods and top ten identification skills
About how to identify standalone servers and VPS
Emergency measures for sudden power outage of network servers
Win7 system installation vs and xampp cause 80 port conflicts how to do
Masters do not want to slow down: XP quickly start the latest skills [Photos]
Win7 internal and external networks can ping but can not access the Internet how to do?
Win7 system update failure error 80070003 countermeasures
Setting up the Windows 7 system boot entry method
Three strokes and two styles of the original shape "Perspective" forum hidden posts
Easily improve the speed of Win 2003
How to close win10 system online search
Windows10 system printer can not print how to solve
Five strokes to solve the problem of delay after Windows XP startup (a)