Linux server performance optimization process

  
 

A few days ago, there was a strange phenomenon in the client-server. A well-configured server, 64G memory, and two 12-core CPUs were connected to one storage. The system load was irregular and it was very high every time. At the time of the high, it was maintained at 40 or 50. At this time, through various commands (top, vmstat, iostat, ifstat, sar), the resources were not generally idle, and they could not be confused for a while.

System resources are no problem, only from the service, this server mainly runs nis and nfs services, nis service is only to provide network users, because this service is not likely to increase the load, first of all Think of nfs.

First introduce the environment of the server. This server shares the data on the storage to the client server through nfs. The developer works on the client server, and the development team has about 100 people. Due to the large number of developers and the number of projects, it is entirely possible that system performance will be affected by the performance bottleneck of the nfs service.

Remember to have a problem with Red Hat after sales, probably: my nfs server has to accept several client server mounts, and there are many R & D personnel, if the load is high, the nfs service will not be affected No. At that time, the answer to me after the sale was "It doesn't matter, as long as the number of nfs processes is increased, it will be fine." The calm answer made me convinced. However, this time my nfs server process has been transferred to 80 processes, is it not enough? So the number of processes was changed to 160, restarting the nfs service, observing for a while, the server load dropped, and now there is no similar high load.

Adjust nfs process method:

1.[root@server2 ~]# vim /etc/init.d/nfs2.# Number of servers to be started by default3.[ -z " ;$RPCNFSDCOUNT" ] && RPCNFSDCOUNT=8

The default is 8 processes, generally on the production server, in the case of sufficient CPU resources, can be calculated according to a CPU 8 nfs process, The 24 CPUs and 160 processes are not excessive.

Copyright © Windows knowledge All Rights Reserved