Talking about linux Performance Tuning eight: Remove unnecessary overhead talking about linux Performance Tuning seven: Cropping System Service http://www.bkjia.com/ OS /201307/228390.html in "talking about linux Performance Tuning seven: "Cropping System Service" I mentioned the knowledge of shutting down some system services, but there are still some resource waste that is not easily discovered by the Administrator. In this section I will say a few: 1. when we use ssh to log on to the server, we will find that the wait time is long, up to 2 minutes. The reason is that the ssh server will automatically resolve the client host name by default, but it is useless to resolve the host name to the client, it is a waste of time for the client and unnecessary resources for the server. Solution: vim/etc/ssh/sshd_config UseDNS no/etc/init. d/sshd restart is similar to: apache (HostnameLookups Off) Option 2. update the file database/etc/cron by Using linux to schedule tasks. daily/makewhatis. cron makewhatis. cron is used to create a whatis database to serve whatis. Search for specific command name whatis-search for specific command abstract whatis keyWord in the whatis resource library... description: The whatis resource library contains a brief description of all system directives, while the whatis command will search for the matching keyword orders in this resource library, the result is displayed in standard output. The whatis resource library is used to consume resources created by makewhatis. /Etc/cron. daily/mlocate. cron mlocate. cron is used to update the mlocate database. It is used to serve the locate and consumes resources and can be stopped. 3. disable unnecessary logs: logs should be the most resource-consuming for major services! In/etc/rsyslog. conf configuration, or make the logs concentrated on the log server for analysis 4. close useless tty (huh, this online saw, did not notice before) the default system will enable 6 TTY, is ctrl + alt + F1--F6 Modify/etc/inittab, find # Run gettys in standard runlevels 1: 2345: respawn:/sbin/mingetty tty1 2: 2345: respawn:/sbin/mingetty tty2 3: 2345: respawn: /sbin/mingetty tty3 4: 2345: respawn:/sbin/mingetty tty4 5: 2345: respawn:/sbin/mingetty tty5 6: 2345: respawn: /sbin/mingetty tty6 add # comments to the front of the desired tty, and then use init q Effective immediately 5. disable disk I/O writing. A Linux file has three default times: atime: Access time to this file ctime: inode time of this file mtime: the modification time of this file does not need to record the file access time for disks with many images and static webpages, reducing unnecessary system resources. By using two parameters, noatime can be implemented, nodiratime edit/etc/fstab/dev/sdb1/mnt ext3 noatime, nodiratime 0 0 6. resource-consuming operations: in the system: find/-name dstfilename in the database: select * from tablename; of course, this is a special case, but be sure to pay attention to it! 7. close the image (close the image to close a series of additional Operations) go to running level 3 #################################### ################################## PID USER PR NI VIRT RES SHR S % CPU % mem time + COMMAND 2161 root 20 0 171 m 64 m 9892 S 1.0 3.3. 69 Xorg ###################################### ###############################