In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "how to improve the performance of nfs storage". In daily operation, I believe many people have doubts about how to improve the performance of nfs storage. The editor consulted all kinds of data and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts of "how to improve the performance of nfs storage"! Next, please follow the editor to study!
Mount nfs parameters:
The parameters of mount have a great impact on the performance of storage. Here are some basic mount parameters that you can refer to. Some parameters are set for fault repair and will not improve performance. HARD mount and SOFT MOUNT: HARD: NFS CLIENT will keep trying to connect to SERVER (in the background, no hints will be given, and some versions under LINUX will still give some hints), until MOUNT. SOFT: will try to connect with SERVER in the foreground, which is the default connection method. When an error message is received, the mount attempt is terminated and relevant information is given. For example: mount-F nfs-o hard 192.168.0.10:/nfs / nfs for the question of whether to use hard or soft, it mainly depends on what information you access. For example, if you want to run X PROGRAM through NFS, you will never want to output a large number of error messages due to some unexpected circumstances (such as the network speed suddenly becomes very slow, plugging the network card plug, etc.). If you are using HARD mode at this time, the system will wait until it is able to re-establish a connection with NFS SERVER to transmit information. In addition, if it is non-critical data, you can also use SOFT, such as FTP data, so that your session will not be suspended when the remote machine is temporarily unable to connect or shut down.
Rsize and wsize: file transfer size setting: V3 does not limit the transfer size, V2 can only be set to 8k at most, which can be set using-rsize and-wsize. The setting of these two parameters has a great influence on the performance of NFS.
Bg: if the mount fails to run mount, the system will transfer the operation of mount to the background and continue to try mount until mount is successful. (usually bg should be used when setting up / etc/fstab files to avoid possible mount misses and affect startup speed)
Fg: contrary to bg, it is the default parameter
Nfsvers=n: set the NFS version to be used. The default is 2. The setting of this option depends on whether the server supports NFS VER 3.
Mountport: sets the port of mount
Port: according to the port setting of server export, for example, if server uses port 5555 to output NFS, then the client needs to use this parameter to make the same setting.
Timeo=n: set the timeout. When there is a problem with data transmission, a retransmission will be attempted based on this parameter. The default value is 7 + 10 (0.7 seconds). Increase this number if the network connection is unstable, and it is recommended to use HARD MOUNT, preferably with the INTR parameter, so that you can terminate any pending file access. More information about timeo
Intr allows notification to interrupt a NFS call. It is useful when the server does not answer and needs to give up.
Udp: use udp as the transport protocol for nfs (NFS V2 only supports UDP)
Tcp: using tcp as the transport protocol for nfs
Namlen=n: sets the longest file name allowed by the remote server. The default for this value is 255
Acregmin=n: sets the minimum cache time before the file is updated. The default is 3.
Acregmax=n: sets the maximum cache time before the file is updated. The default is 60.
Acdirmin=n: set the minimum cache time before the directory update. The default is 30.
Acdirmax=n: sets the maximum cache time before the directory update. The default is 60.
Actimeo=n: set acregmin, acregmax, acdirmin, and acdirmax to the same value, which is not enabled by default. This parameter also has a great impact on performance. Don't open it if you don't have to. You can read this post to learn more about the impact of actimeo on storage performance
Retry=n: sets how long to try to reconnect and then not to try again when the network transmission fails. The default value is 10000 minutes
Noac: turns off the cache mechanism. The method of using multiple parameters at the same time: mount-t nfs-o timeo=3,udp,hard 192.168.0.30:/tmp / nfs Please note that the options for the NFS client and server are not necessarily the same, and sometimes there are conflicts. For example, the server is exported as read-only, but the client is mount in a writable way. Although it can succeed on mount, an error occurs when you try to write. In general, when the configuration of the server and the client conflicts, the configuration of the server will prevail.
At this point, the study on "how to improve the performance of nfs storage" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.