Toe-based nfs-ganesha service acceleration method and server terminal system
By introducing the TOE network module into the NFS server to offload the network protocol stack processing, the CPU utilization problem of the NFS server in high-speed transmission scenarios is solved, resulting in faster service response and improved network performance.
Patent Information
- Application Number
- CN202310925364.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-26
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2043-07-26
AI Technical Summary
The CPU usage of the NFS server increases significantly in high-speed transmission scenarios, causing a sharp decline in service performance, especially slowing down the response speed when receiving concurrent client requests.
The TOE network module is used to handle network transmission between NFS clients and servers. By offloading the network protocol stack processing work through the TOE network card device and network driver, and by redirecting the Socket API, the CPU load is reduced and the network transmission performance is improved.
It relieved processor pressure, improved the response speed and service quality of NFS services, and increased network bandwidth and access speed for large files.
Smart Images

Figure CN116743859B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of network, and particularly relates to a TOE-based NFS-Ganesha service acceleration method and a server terminal system. BACKGROUND
[0002] NFS (Network File System) is a distributed file system protocol, and through the NFS protocol, a client can open, edit and save shared resources in a remote server like accessing local files.
[0003] NFS-Ganesha is a user-mode file server supporting the NFS protocol. Compared with the kernel version of NFSv4, Ganesha runs in the user space, has better flexibility, is more convenient to debug and manage, and has advantages such as easy monitoring and control of resource consumption. In addition, Ganesha abstracts the backend storage into a unified API for application layer calling through an FSAL (File System Abstraction Layer) module to support multiple file systems. Therefore, Ganesha is being used by more and more enterprises as an NFS server.
[0004] The NFSv4 protocol performs network communication based on TCP / IP, and with the rapid growth of network transmission bandwidth, the CPU resources consumed by the NFS server in processing network transmission are constantly increasing, which greatly affects the service performance thereof, and makes the response processing speed of the NFS server to the client greatly reduced. This is particularly evident in the scenario of concurrent requests from the client.
[0005] At present, there is no effective optimization scheme for the problem that the CPU occupancy of the NFS server is greatly increased in the high-speed transmission scenario, resulting in a sharp decline in the service performance thereof. Therefore, in order to optimize the service quality of the NFS server in the high-speed transmission scenario and accelerate the service response, it is necessary to further study the acceleration method for the NFS service. SUMMARY
[0006] The application provides a TOE-based NFS-Ganesha service acceleration method and a server terminal system to solve the above-mentioned technical problems, and specifically adopts the following technical scheme:
[0007] A TOE-based NFS-Ganesha service acceleration method, which is applied to an NFS server, wherein the NFS server is provided with a TOE network module, and the TOE-based NFS-Ganesha service acceleration method comprises the following steps:
[0008] The TOE network module processes network transmission between the NFS client and the NFS server.
[0009] Further, the TOE network module comprises a TOE network card device, a TOE network driver and a redirected Socket API.
[0010] The TOE network card device is used to complete TCP / IP protocol processing, wrap a response into a TCP packet and send it to the network, or receive a client request and put the parsed data into a receiving buffer.
[0011] The NFS-Ganesha service calls the redirected Socket API to receive a client request or send a server response.
[0012] The redirected Socket API enters the network driver to complete corresponding logical processing.
[0013] The specific method for processing network transmission between the NFS client and the NFS server through the TOE network module is as follows:
[0014] The TOE network module offloads network protocol stack processing work of the NFS server from a CPU to the TOE network card device.
[0015] Further, the specific method for processing network transmission between the NFS client and the NFS server through the TOE network module comprises:
[0016] The TOE network card device receives a request sent by the NFS client and puts data into a corresponding receiving buffer.
[0017] The TOE network driver notifies the NFS-Ganesha service that a current TCP connection has received data through epoll.
[0018] The NFS-Ganesha service calls the redirected Socket API to receive a client request.
[0019] The redirected Socket API enters the TOE network driver to read data in the receiving buffer.
[0020] The NFS-Ganesha service performs subsequent data parsing and processing.
[0021] Further, the specific method for the NFS-Ganesha service to perform subsequent data parsing and processing is as follows:
[0022] The NFS-Ganehsa service resolves the data of the specific request and inserts into the request queue, selects the idle work thread to process the request, completes the specific operation corresponding to the request through the FSAL interface, inserts the reply into the cache hash table to establish a mapping relationship with the request, and finally sends the reply to the NFS client.
[0023] Further, when the work thread processes the request, firstly, whether there is a same request processed in the cache hash table is inquired, if there is, the corresponding reply is directly found and sent to the NFS client.
[0024] Further, the specific method for the NFS-Ganehsa service to send the reply to the NFS client is:
[0025] The NFS-Ganesha service sends the reply content to the NFS client as a server response after processing the request in the work thread, and calls the redirection SocketAPI;
[0026] The redirection SocketAPI processes the specific sending logic in the TOE network driver, and puts the reply content data into the corresponding sending buffer;
[0027] The reply is packaged into a TCP message in the TOE network card device and transmitted to the network, and finally reaches the NFS client.
[0028] A TOE-based NFS-Ganesha server terminal system, comprising: a TOE network module, a processor and a storage terminal;
[0029] The TOE network module is responsible for offloading the network transmission of the NFS server, reducing the load of the processor in the network transmission process;
[0030] The processor is responsible for running the NFS-Ganehsa service process, realizing receiving the client request and sending the server response and NFS protocol processing;
[0031] The storage terminal is used to realize the file storage and access function of the NFS server.
[0032] The NFS-Ganesha service acceleration method and server terminal system based on TOE provided by the application can improve the problem that the CPU occupancy rate of the NFS server is greatly improved in the high-speed transmission scene, resulting in a sharp decline in service performance, thereby relieving the processor pressure, improving the service quality and accelerating the NFS service response. BRIEF DESCRIPTION OF DRAWINGS
[0033] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the accompanying drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced. Obviously, the accompanying drawings in the following description only constitute some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor.
[0034] Figure 1 A system schematic diagram for implementing the TOE-based NFS-Ganesha service acceleration method of the present application;
[0035] Figure 2 A step flowchart for receiving a client request provided by an embodiment of the present application;
[0036] Figure 3 A step flowchart for sending a server response provided by another embodiment of the present application;
[0037] Figure 4 A TOE-based NFS-Ganesha server terminal system schematic diagram provided by the present application. DETAILED DESCRIPTION
[0038] The embodiments of the present application will be described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar notations represent the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the accompanying drawings are exemplary and are intended to explain the present application, and cannot be understood as a limitation of the present application.
[0039] As shown in Figure 1 , the present application sets a TOE network module on the NFS server for data communication, which replaces the traditional network protocol processing path. The TOE technology is used to offload the processing work of the network protocol stack of the NFS server from the CPU to a dedicated processing unit, thereby reducing the CPU occupation and relieving the processor pressure, so as to achieve the purpose of accelerating the NFS service response and improving the service quality.
[0040] Specifically, the present application discloses a TOE-based NFS-Ganesha service acceleration method, which is applied to the above-mentioned NFS server, and the NFS server is provided with a TOE network module. The TOE-based NFS-Ganesha service acceleration method of the present application mainly processes the network transmission between the NFS client and the NFS server through the TOE network module.
[0041] In the embodiments of the present application, the TOE network module includes a TOE network card device, a TOE network driver and a redirected Socket API.
[0042] Specifically, the TOE network card device is used to complete TCP / IP protocol processing, wrap the response into a TCP message and send it to the network, or receive the client request and put the parsed data into the receive buffer. The NFS-Ganesha service calls the redirected SocketAPI to receive the client request or send the server response. The redirected SocketAPI enters the network driver to complete the corresponding logical processing.
[0043] The foregoing specific method of processing network transmission between the NFS client and the NFS server through the TOE network module is: offloading the network protocol stack processing work of the NFS server from the CPU to the TOE network card device through the TOE network module. That is, after the NFS-Ganesha service calls the redirected SocketAPI through the foregoing TOE network module, it does not enter the kernel protocol stack for processing, but directly processes the corresponding function interface logic through the network driver, and controls the network card device to complete the transmission and reception of TCP / IP messages. It should be noted that, Figure 1 The arrow direction in the figure indicates the flow direction of data, not the direction of function call, and the dashed arrow indicates the processing path after the request Cache miss.
[0044] As shown in Figure 2 As a preferred embodiment, the specific method of processing network transmission between the NFS client and the NFS server through the TOE network module comprises:
[0045] S11: The NFS client sends a request. That is, the NFS client wraps the RPC request and sends it to the NFS server based on the TCP protocol.
[0046] S12: The TOE network card device on the NFS server receives the request sent by the NFS client, that is, the related TCP message, parses it, and puts the parsed data, that is, the RPC request message, into the receive buffer of the corresponding TCP connection.
[0047] S13: The TOE network driver notifies the RPC Dispatcher thread of the NFS-Ganesha service that the current TCP connection has received data through epoll.
[0048] S14: The RPC Dispatcher thread of the NFS-Ganesha service obtains the corresponding information through epoll_wait, and calls the redirected SocketAPI to receive the client RPC request.
[0049] S15: The redirected SocketAPI enters the TOE network driver to read the corresponding length of data in the receive buffer.
[0050] S16: The NFS-Ganehsa service performs subsequent data analysis and processing.
[0051] In step S16, the NFS-Ganehsa service parses the data to obtain a specific request in the RPC Dispatcher thread, and inserts the request into a request queue for processing in the thread. The NFS-Ganehsa service selects the most idle worker thread to process the request, completes the specific operation corresponding to the request through the FSAL interface, inserts the reply into the cache hash table to establish a mapping relationship with the request, and finally sends the reply to the NFS client.
[0052] Specifically, when the worker thread processes the request, it first queries whether there is a processed same request in the cache hash table, if there is, it directly finds the corresponding reply and sends the reply to the NFS client.
[0053] As shown in Figure 3 As a preferred embodiment, the specific method of the NFS-Ganehsa service for sending the reply to the NFS client is as follows:
[0054] S21: After the NFS-Ganesha service processes the request in the worker thread, the reply content is taken as a server response, and a redirect Socket API is called to send to the NFS client.
[0055] S22: The redirect Socket API processes the specific sending logic in the TOE network driver, including placing the reply content data into the sending buffer corresponding to the TCP connection, and writing the data address and length to be sent into the corresponding sending queue of the TOE network card device.
[0056] S23: The TOE network card device completes the TCP protocol processing, executes the command in the sending queue, packages the reply in the sending buffer into a TCP packet, and sends it to the network for transmission, and finally reaches the NFS client.
[0057] S24: The NFS client receives the NFS server response data, and completes a RPC request call.
[0058] As shown in Figure 4 The application further discloses an NFS-Ganesha server terminal system based on TOE, which comprises a TOE network module, a processor and a storage terminal, and is used to realize the NFS-Ganesha service acceleration method based on TOE.
[0059] Specifically, the TOE network module is responsible for offloading the network transmission of the NFS server, reducing the load of the processor in the network transmission process. The processor is responsible for running the NFS-Ganesha service process, realizing receiving client requests and sending server responses, and NFS protocol processing. Specifically, it performs relevant operations according to the method disclosed in Figure 2 and Figure 3 The storage terminal cooperates with the file system to realize the file storage and access function of the NFS server.
[0060] The basic principles, main features and advantages of the present application are shown and described above. Those skilled in the art should understand that the above examples do not limit the present application in any form, and any technical solutions obtained by equivalent replacement or equivalent transformation fall within the protection scope of the present application.
Claims
1. A method for accelerating NFS-Ganesha service based on TOE, characterized in that, The TOE-based NFS-Ganesha service acceleration method is applied to an NFS service end, the NFS service end is provided with a TOE network module, and the TOE-based NFS-Ganesha service acceleration method comprises the following steps: A network transmission between an NFS client and the NFS service end is processed through the TOE network module; The TOE network module comprises a TOE network card device, a TOE network driver and a redirected Socket API; The TOE network card device is used for completing TCP / IP protocol processing, packaging a reply into a TCP message and sending the TCP message to a network, or receiving a client request and putting parsed data into a receiving buffer; The NFS-Ganesha service calls the redirected Socket API to receive a client request or send a service end reply; The redirected Socket API enters the network driver to complete corresponding logical processing; The specific method for processing the network transmission between the NFS client and the NFS service end through the TOE network module comprises the following steps: The network protocol stack processing work of the NFS service end is offloaded from a CPU to the TOE network card device through the TOE network module; The specific method for processing the network transmission between the NFS client and the NFS service end through the TOE network module comprises the following steps: The TOE network card device receives a request sent by the NFS client and puts data into a corresponding receiving buffer; The TOE network driver notifies the NFS-Ganesha service that a current TCP connection has received data through an epoll; The NFS-Ganesha service calls the redirected Socket API to receive a client request; The redirected Socket API enters the TOE network driver to read data in the receiving buffer; The NFS-Ganesha service performs subsequent data parsing and processing; The specific method for sending a reply to the NFS client by the NFS-Ganesha service comprises the following steps: After processing a request in a work thread, the NFS-Ganesha service calls the redirected Socket API to send the reply content as a service end reply to the NFS client; The redirected Socket API processes specific sending logic in the TOE network driver, and puts the reply content data into a corresponding sending buffer; The reply is packaged into a TCP message in the TOE network card device and is transmitted to a network, and finally reaches the NFS client.
2. A TOE based NFS-Ganesha server terminal system, characterized by, The TOE network module, a processor and a storage terminal are comprised; The TOE network module is responsible for offloading network transmission of the NFS service end and reducing the load of the processor in the network transmission process; The processor is responsible for running an NFS-Ganesha service process, realizing receiving a client request and sending a service end reply, and NFS protocol processing; The storage terminal is used to realize file storage and access functions of the NFS service end; The TOE network module comprises a TOE network card device, a TOE network driver and a redirected Socket API; The TOE network card device is used to complete TCP / IP protocol processing, wrap a response into a TCP message and send the TCP message to a network, or receive a client request and put parsed data into a receiving buffer; The NFS-Ganesha service calls the redirected Socket API to receive a client request or send a server response; The redirected Socket API enters the network driver to complete corresponding logical processing; The specific method for processing network transmission between an NFS client and the NFS server through the TOE network module is as follows: The network protocol stack processing work of the NFS server is offloaded from a CPU to the TOE network card device through the TOE network module; The specific method for processing network transmission between an NFS client and the NFS server through the TOE network module comprises: The TOE network card device receives a request sent by the NFS client and puts data into a corresponding receiving buffer; The TOE network driver notifies the NFS-Ganesha service that a current TCP connection has received data through epoll; The NFS-Ganesha service calls the redirected Socket API to receive a client request; The redirected Socket API enters the TOE network driver to read data in the receiving buffer; The NFS-Ganesha service performs subsequent data parsing and processing; The specific method for sending a reply to the NFS client by the NFS-Ganesha service is as follows: After processing a request in a worker thread, the NFS-Ganesha service calls the redirected Socket API to send a server response to the NFS client; The redirected Socket API processes specific sending logic in the TOE network driver and puts reply content data into a corresponding sending buffer; The response is wrapped into a TCP message in the TOE network card device and is transmitted to a network, and finally reaches the NFS client.
Citation Information
Patent Citations
Pseudo-random type NFS application acceleration system
CN102147802A
InfiniBand protocol conversion method and system based on bridging
CN102833237A