A network file system testing method, device, equipment and medium
By mounting a shared directory of NFS services for multiple clients, running multiple threads in parallel and monitoring the status, concurrent testing of network file systems is realized, solving the problem of insufficient concurrent testing in the existing technology, and providing more accurate performance evaluation.
Patent Information
- Application Number
- CN202311117506.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-31
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2043-08-31
AI Technical Summary
The existing network file system has shortcomings in concurrent testing, and it is difficult to effectively measure its multi-concurrency capabilities. Especially in the large-scale distributed file storage scenarios of big data, it cannot meet the needs of real-time data updates and multi-faceted interactions.
By mounting a shared directory of NFS services for multiple clients, running multiple threads in parallel with the same read and write block size, selecting the target client to build a communication bus, monitoring the thread status and splitting the test tasks, realizing concurrent testing of multiple clients and multiple threads.
It realizes accurate concurrent testing of network file systems, provides data support to measure its concurrent scenario processing capabilities, improves the flexibility and accuracy of testing methods, and reduces testing costs.
Smart Images

Figure CN117171120B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a network file system testing method, device, equipment and medium. Background Art
[0002] NFS (Network File System) is one of the current mainstream heterogeneous platform shared file systems. It is mainly used in the UNIX environment and can support file sharing between different types of systems through the network. NFS allows a system to share directories and files with others on the network. By using NFS, users and programs can access files on remote systems as if they were accessing local files, allowing each computer node to use network shared directories as easily as using local resources. NFS-Ganesha is a user-mode network file system. Compared with kernel-mode NFS, user-mode NFS-Ganesha is easier to manage and maintain, and is widely used in big data and massive distributed file storage scenarios.
[0003] After the NFS service shared directory is shared to the network via NFS-Ganesha, the client can mount the shared directory to achieve data transmission between the client and the server. With the development of science and technology and the digital economy, people are constantly generating data and interacting with it in real time through mobile devices. This puts a severe test on the multi-concurrency capabilities of data storage systems, making concurrency testing of network file systems particularly important. Summary of the Invention
[0004] In view of this, it is necessary to provide a network file system testing method, device, equipment and medium to address the above technical problems.
[0005] According to a first aspect of the present invention, a network file system testing method is provided, the method comprising:
[0006] Mount the shared directory of NFS service for multiple clients;
[0007] Each client is configured to run multiple threads in parallel to perform read and write operations, where each thread performs read and write operations with the same read and write block size;
[0008] Selecting a client from the plurality of clients as a target client and establishing a communication bus between the target client and each of the remaining clients;
[0009] Monitoring the execution status of each thread of the target client and monitoring the execution status of each thread on the remaining clients via the communication bus;
[0010] Splitting the task to be tested into sub-test tasks on the target client using the read / write block size as a unit, wherein the task to be tested is used to perform a read or write operation on a file in the shared directory;
[0011] Subtest tasks are distributed on the target client according to the execution status of each thread until all subtest tasks are completed.
[0012] In some embodiments, the step of mounting a shared directory of the NFS service for multiple clients includes:
[0013] Share the shared directory of the NFS service to the network through NFS-Ganesha;
[0014] Obtain the number of clients set by the user, wherein the number of clients is greater than or equal to two;
[0015] The number of clients equal to the number of the clients is mounted to the shared directory through the network.
[0016] In some embodiments, the step of configuring each client to run multiple threads in parallel to perform read and write operations includes:
[0017] Get the number of threads for each client set by the user, as well as the read and write block size of a single thread's read and write operations. The number of threads corresponding to each client is greater than or equal to two.
[0018] Configure the number of threads for each client according to the corresponding number of threads set by the user;
[0019] The read and write block sizes of all threads are configured according to the read and write block sizes set by the user.
[0020] In some embodiments, the number of threads running in parallel on each client is the same.
[0021] In some embodiments, the step of distributing subtest tasks on the target client according to the execution status of each thread until all subtest tasks are executed, includes:
[0022] Creating an idle thread queue, wherein all threads are initially placed in the idle thread queue;
[0023] Starting from the head of the idle thread queue, threads are taken in sequence and a sub-test task is assigned to each taken thread;
[0024] In response to the completion of a sub-test task of the thread that has been taken out, the thread that has been taken out is put back into the tail of the current idle thread queue;
[0025] Determine whether there are any remaining sub-test tasks;
[0026] If there are still remaining sub-test tasks, return to the step of sequentially taking threads from the head of the idle thread queue and assigning a sub-test task to each taken thread;
[0027] If there are no remaining sub-test tasks, the task distribution ends.
[0028] In some embodiments, the method further comprises:
[0029] Obtaining, on the target client, the start time of the first sub-test task and the completion time of the last sub-test task;
[0030] Compare the time difference between the execution completion time and the start time with a preset duration;
[0031] In response to the time difference not exceeding the preset time length, confirming that the network file system concurrency performance passes the test;
[0032] In response to the time difference exceeding the preset duration, it is determined that the network file system concurrency performance fails the test.
[0033] In some embodiments, the method further comprises:
[0034] Performing tests on the task to be tested multiple times to obtain a time difference corresponding to each test;
[0035] Calculate the mean of all time differences;
[0036] In response to an absolute value of a difference between a time difference corresponding to any test and the mean value exceeding a preset value, it is determined that the concurrent performance of the network file system is unstable;
[0037] In response to the absolute value of the difference between the time difference corresponding to the multiple tests and the average value not exceeding the preset value, it is confirmed that the concurrency performance of the network file system is stable.
[0038] According to a second aspect of the present invention, a network file system testing device is provided, the device comprising:
[0039] A mounting module configured to mount a shared directory of an NFS service for multiple clients;
[0040] A thread setting module, configured to set each client to run multiple threads in parallel to perform read and write operations, wherein the read and write block sizes of each thread performing the read and write operations are the same;
[0041] a selection module configured to select one client from a plurality of clients as a target client and to establish a communication bus between the target client and each of the remaining clients;
[0042] a thread monitoring module, the thread monitoring module being configured to monitor the execution status of each thread of the target client and monitor the execution status of each thread on the remaining clients via the communication bus;
[0043] A task splitting module, configured to split the task to be tested into sub-test tasks on the target client using the read-write block size as a unit, wherein the task to be tested is used to perform a read or write operation on a file in the shared directory;
[0044] A task distribution module is configured to distribute sub-test tasks on the target client according to the execution status of each thread until all sub-test tasks are completed.
[0045] According to a third aspect of the present invention, there is further provided an electronic device, comprising:
[0046] at least one processor; and
[0047] The memory stores a computer program that can be run on the processor, and the processor executes the aforementioned network file system testing method when executing the program.
[0048] According to a fourth aspect of the present invention, a computer-readable storage medium is further provided. The computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the aforementioned network file system testing method is executed.
[0049] The above-mentioned network file system testing method mounts the shared directory of the NFS service through multiple clients, sets multiple clients to use the same read and write block size to perform read and write operations, and then selects a target client from multiple clients, and implements status monitoring, test task splitting and test task distribution for all threads on the target client, thereby utilizing multiple clients and multiple threads to complete the accurate reading or writing of a file, realizing concurrent testing of the network file system, providing data support and basis for measuring the concurrent scenario processing capability of the network file system, and enriching the testing method of the network file system.
[0050] In addition, the present invention also provides a network file system testing device, an electronic device and a computer-readable storage medium, which can also achieve the above technical effects and will not be described in detail here. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other embodiments can be obtained based on these drawings without paying any creative work.
[0052] Figure 1 A flowchart of a network file system testing method provided by one embodiment of the present invention;
[0053] Figure 2 A flowchart of another network file system testing method provided by another embodiment of the present invention;
[0054] Figure 3 A schematic structural diagram of a network file system testing device provided by another embodiment of the present invention;
[0055] Figure 4 is a diagram showing the internal structure of an electronic device according to another embodiment of the present invention;
[0056] Figure 5 This is a structural diagram of a computer-readable storage medium in another embodiment of the present invention. DETAILED DESCRIPTION
[0057] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the embodiments of the present invention are further described in detail below in conjunction with specific embodiments and with reference to the accompanying drawings.
[0058] It should be noted that all expressions using "first" and "second" in the embodiments of the present invention are for distinguishing two non-identical entities with the same name or non-identical parameters. It can be seen that "first" and "second" are only for the convenience of expression and should not be understood as limitations on the embodiments of the present invention. Subsequent embodiments will not explain this one by one.
[0059] In one embodiment, please refer to Figure 1 As shown, the present invention provides a network file system testing method 100. Specifically, the method includes the following steps:
[0060] Step 101, mounting a shared directory of the NFS service for multiple clients;
[0061] Step 102: Each client is configured to run multiple threads in parallel to perform read and write operations, wherein the read and write block sizes of each thread performing the read and write operations are the same;
[0062] Step 103: selecting a client from the plurality of clients as a target client, and establishing a communication bus between the target client and each of the remaining clients;
[0063] Step 104: monitoring the execution status of each thread of the target client and monitoring the execution status of each thread on the remaining clients via the communication bus;
[0064] Step 105: splitting the task to be tested into sub-test tasks on the target client using the read / write block size as a unit, wherein the task to be tested is used to perform a read or write operation on a file in the shared directory;
[0065] Step 106 : Distribute the sub-test tasks on the target client according to the execution status of each thread until all sub-test tasks are completed.
[0066] The above-mentioned network file system testing method mounts the shared directory of the NFS service through multiple clients, sets multiple clients to use the same read and write block size to perform read and write operations, and then selects a target client from multiple clients, and implements status monitoring, test task splitting and test task distribution for all threads on the target client, thereby utilizing multiple clients and multiple threads to complete the accurate reading or writing of a file, realizing concurrent testing of the network file system, providing data support and basis for measuring the concurrent scenario processing capability of the network file system, and enriching the testing method of the network file system.
[0067] In some embodiments, the aforementioned step 101, mounting a shared directory of an NFS service for multiple clients, includes:
[0068] Share the shared directory of the NFS service to the network through NFS-Ganesha;
[0069] Obtain the number of clients set by the user, wherein the number of clients is greater than or equal to two;
[0070] The number of clients equal to the number of the clients is mounted to the shared directory through the network.
[0071] In some embodiments, the aforementioned step 102, configuring each client to run multiple threads in parallel to perform read and write operations, includes:
[0072] Get the number of threads for each client set by the user, as well as the read and write block size of a single thread's read and write operations. The number of threads corresponding to each client is greater than or equal to two.
[0073] Configure the number of threads for each client according to the corresponding number of threads set by the user;
[0074] The read and write block sizes of all threads are configured according to the read and write block sizes set by the user.
[0075] The network file system testing method of this embodiment allows the user to set the number of threads on each client side and the read / write block size of a single thread, thereby controlling the maximum number of concurrent threads. The setting method is flexible and has good versatility.
[0076] In some embodiments, the number of threads running in parallel on each client is the same.
[0077] In some embodiments, the aforementioned step 106, distributing sub-test tasks on the target client according to the execution status of each thread until all sub-test tasks are completed, includes:
[0078] Creating an idle thread queue, wherein all threads are initially placed in the idle thread queue;
[0079] Starting from the head of the idle thread queue, threads are taken in sequence and a sub-test task is assigned to each taken thread;
[0080] In response to the completion of a sub-test task of the thread that has been taken out, the thread that has been taken out is put back into the tail of the current idle thread queue;
[0081] Determine whether there are any remaining sub-test tasks;
[0082] If there are still remaining sub-test tasks, return to the step of sequentially taking threads from the head of the idle thread queue and assigning a sub-test task to each taken thread;
[0083] If there are no remaining sub-test tasks, the task distribution ends.
[0084] The network file system testing method of this embodiment manages the threads of all clients by setting up an idle thread queue, thereby realizing the flow distribution of tasks on multiple threads of multiple clients, and reallocating new sub-test tasks in the order in which each thread is executed, thereby achieving the maximum task concurrency and significantly improving thread utilization efficiency.
[0085] In some embodiments, the method further comprises:
[0086] Obtaining, on the target client, the start time of the first sub-test task and the completion time of the last sub-test task;
[0087] Compare the time difference between the execution completion time and the start time with a preset duration;
[0088] In response to the time difference not exceeding the preset time length, confirming that the network file system concurrency performance passes the test;
[0089] In response to the time difference exceeding the preset duration, it is determined that the network file system concurrency performance fails the test.
[0090] The network file system testing method of this embodiment obtains the actual test time of the test task by counting the difference between the start time of the first sub-test task and the completion time of the last sub-test task, and compares the actual test time with the preset duration to measure whether the concurrency performance of the network file system is qualified. The entire process does not require human intervention, the testing cost is low, and it has high accuracy.
[0091] In some embodiments, the method further comprises:
[0092] Performing tests on the task to be tested multiple times to obtain a time difference corresponding to each test;
[0093] Calculate the mean of all time differences;
[0094] In response to an absolute value of a difference between a time difference corresponding to any test and the mean value exceeding a preset value, it is determined that the concurrent performance of the network file system is unstable;
[0095] In response to the absolute value of the difference between the time difference corresponding to the multiple tests and the average value not exceeding the preset value, it is confirmed that the concurrency performance of the network file system is stable.
[0096] The network file system testing method of this embodiment performs multiple tests on the same file to be tested in the same manner, thereby obtaining multiple actual test times for multiple operations on the file to be tested. The average of all actual test times is then taken, and each actual test time is compared with the average to measure whether the concurrency performance of the network file system is stable. This enriches the evaluation method of concurrency performance and has a high degree of credibility.
[0097] In another embodiment, in order to facilitate understanding of the solution of the present invention, the following will be described by taking writing a file to a network file system as an example. This embodiment provides another network file system testing method. Figure 2 As shown, it specifically includes three parts: building concurrent management, building a communication bus, and data transmission. The working principles of the three parts are as follows:
[0098] In the concurrent management, the concurrent scheduling and management of multiple client threads in the test process is realized, and the data transmission tasks are assigned to each thread of different clients. The communication bus is used to realize the communication between multiple clients, and the task transmission status of different threads on each client is synchronized by the communication bus. The thread status is reported to the concurrent management to assist in the completion of concurrent scheduling. The actual operation of the thread task is completed in the data transmission, and the data is read or written.
[0099] The following will explain the above three parts in detail:
[0100] (1) Building concurrency management
[0101] Concurrent management is built on a client participating in the test to complete the overall scheduling of the current test tasks. First, the parameter settings such as the size of the file to be tested, the number of clients, the number of threads on a single client, and the read and write block size that each thread is responsible for are clarified. According to the parameter settings, the task distribution is clarified. For example, if the test file to be written is 10G, the number of clients is 5, the number of threads on a single client is 10, and the block size that each thread is responsible for is 4M, then a total of (10*1024) / 4=2560 task distributions are required. Concurrent management coordinates the task scheduling of the current 50 threads. After any thread completes the 4M write, it will receive a new 4M write task from the concurrent management according to the current offset. The 50 threads do not distinguish between clients, and the order of task distribution is determined only by the order in which the tasks are completed, until the 10G file is completely written.
[0102] (2) Building a communication bus
[0103] A communication bus is built between each client. Each client monitors the task thread status on the client through thread communication and other methods. When the task thread completes the data transmission task, it reports the thread task completion to the concurrency management through the established communication bus and receives a new transmission task. The task contains information such as the read and write offset, block size, etc. of the thread
[0104] (3) Building data transmission
[0105] Realize interaction with the underlying layer and complete the reading or writing of data in the specified file through interaction with the data disk.
[0106] The network file system testing method of this embodiment uses multiple clients and multiple threads to accurately read or write a file, providing an analytical basis for measuring the ability of a file system to cope with concurrent scenarios.
[0107] In some embodiments, please refer to Figure 3 As shown, the present invention also provides a network file system testing device 200, the device comprising:
[0108] The mounting module 201 is configured to mount a shared directory of the NFS service for multiple clients;
[0109] A thread setting module 202 configured to set each client to run multiple threads in parallel to perform read and write operations, wherein the read and write block sizes of each thread performing the read and write operations are the same;
[0110] A selection module 203 configured to select a client from a plurality of clients as a target client and to establish a communication bus between the target client and each of the remaining clients;
[0111] A thread monitoring module 204 configured to monitor the execution status of each thread of the target client and monitor the execution status of each thread on the remaining clients via the communication bus;
[0112] A task splitting module 205 is configured to split the task to be tested into sub-test tasks on the target client using the read / write block size as a unit, wherein the task to be tested is used to perform a read or write operation on a file in the shared directory;
[0113] The task distribution module 206 is configured to distribute sub-test tasks according to the execution status of each thread on the target client until all sub-test tasks are completed.
[0114] The above-mentioned network file system testing device mounts the shared directory of the NFS service through multiple clients, sets the multiple clients to use the same read and write block size to perform read and write operations, and then selects a target client from the multiple clients to implement status monitoring, test task splitting and test task distribution for all threads on the target client, thereby utilizing multiple clients and multiple threads to complete the accurate reading or writing of a file, realizing concurrent testing of the network file system, providing data support and basis for measuring the concurrent scenario processing capability of the network file system, and enriching the testing method of the network file system.
[0115] It should be noted that the specific limitations of the network file system testing device can be found in the limitations of the network file system testing method described above and will not be further elaborated here. Each module in the aforementioned network file system testing device can be implemented in whole or in part through software, hardware, or a combination thereof. Each of these modules can be embedded in or independent of a processor within an electronic device in hardware form, or stored in memory within the electronic device in software form, allowing the processor to call and execute operations corresponding to each of these modules.
[0116] According to another aspect of the present invention, an electronic device is provided. The electronic device may be a server. Figure 4As shown. The electronic device includes a processor, a memory, a network interface and a database connected via a system bus. The processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the electronic device is used to store data. The network interface of the electronic device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, the network file system testing method described above is implemented. Specifically, the method includes the following steps:
[0117] Mount the shared directory of NFS service for multiple clients;
[0118] Each client is configured to run multiple threads in parallel to perform read and write operations, where each thread performs read and write operations with the same read and write block size;
[0119] Selecting a client from the plurality of clients as a target client and establishing a communication bus between the target client and each of the remaining clients;
[0120] Monitoring the execution status of each thread of the target client and monitoring the execution status of each thread on the remaining clients via the communication bus;
[0121] Splitting the task to be tested into sub-test tasks on the target client using the read / write block size as a unit, wherein the task to be tested is used to perform a read or write operation on a file in the shared directory;
[0122] Subtest tasks are distributed on the target client according to the execution status of each thread until all subtest tasks are completed.
[0123] According to another aspect of the present invention, a computer readable storage medium is provided. Figure 5 As shown, a computer program is stored thereon, and when the computer program is executed by the processor, the network file system testing method described above is implemented, specifically, including executing the following steps:
[0124] Mount the shared directory of NFS service for multiple clients;
[0125] Each client is configured to run multiple threads in parallel to perform read and write operations, where each thread performs read and write operations with the same read and write block size;
[0126] Selecting a client from the plurality of clients as a target client and establishing a communication bus between the target client and each of the remaining clients;
[0127] Monitoring the execution status of each thread of the target client and monitoring the execution status of each thread on the remaining clients via the communication bus;
[0128] Splitting the task to be tested into sub-test tasks on the target client using the read / write block size as a unit, wherein the task to be tested is used to perform a read or write operation on a file in the shared directory;
[0129] Subtest tasks are distributed on the target client according to the execution status of each thread until all subtest tasks are completed.
[0130] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0131] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0132] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art could make various modifications and improvements without departing from the spirit of the present application, all of which fall within the scope of protection of the present application. Therefore, the scope of protection of the present patent application shall be determined by the appended claims.
Claims
1. A network file system testing method, characterized in that: The method comprises: Mount the shared directory of NFS service for multiple clients; Each client is configured to run multiple threads in parallel to perform read and write operations, where each thread performs read and write operations with the same read and write block size; Selecting a client from the plurality of clients as a target client and establishing a communication bus between the target client and each of the remaining clients; Monitoring the execution status of each thread of the target client and monitoring the execution status of each thread on the remaining clients via the communication bus; Splitting the task to be tested into sub-test tasks on the target client using the read / write block size as a unit, wherein the task to be tested is used to perform a read or write operation on a file in the shared directory; Subtest tasks are distributed on the target client according to the execution status of each thread until all subtest tasks are completed.
2. The network file system testing method according to claim 1, wherein: The steps of mounting the shared directory of the NFS service for multiple clients include: Share the shared directory of the NFS service to the network through NFS-Ganesha; Obtain the number of clients set by the user, wherein the number of clients is greater than or equal to two; The number of clients equal to the number of the clients is mounted to the shared directory through the network.
3. The network file system testing method according to claim 1, wherein: The step of setting each client to run multiple threads in parallel to perform read and write operations includes: Get the number of threads for each client set by the user, as well as the read and write block size of a single thread's read and write operations. The number of threads corresponding to each client is greater than or equal to two. Configure the number of threads for each client according to the corresponding number of threads set by the user; The read and write block sizes of all threads are configured according to the read and write block sizes set by the user.
4. The network file system testing method according to claim 3, wherein: The same number of threads runs in parallel on each client.
5. The network file system testing method according to claim 1, wherein: The step of distributing sub-test tasks on the target client according to the execution status of each thread until all sub-test tasks are completed includes: Creating an idle thread queue, wherein all threads are initially placed in the idle thread queue; Starting from the head of the idle thread queue, threads are taken in sequence and a sub-test task is assigned to each taken thread; In response to the completion of a sub-test task of the thread that has been taken out, the thread that has been taken out is put back into the tail of the current idle thread queue; Determine whether there are any remaining sub-test tasks; If there are still remaining sub-test tasks, return to the step of sequentially taking threads from the head of the idle thread queue and assigning a sub-test task to each taken thread; If there are no remaining sub-test tasks, the task distribution ends.
6. The network file system testing method according to claim 1, wherein: The method further comprises: Obtaining, on the target client, the start time of the first sub-test task and the completion time of the last sub-test task; Compare the time difference between the execution completion time and the start time with a preset duration; In response to the time difference not exceeding the preset time length, confirming that the network file system concurrency performance passes the test; In response to the time difference exceeding the preset duration, it is determined that the network file system concurrency performance fails the test.
7. The network file system testing method according to claim 6, characterized in that: The method further comprises: Performing tests on the task to be tested multiple times to obtain a time difference corresponding to each test; Calculate the mean of all time differences; In response to an absolute value of a difference between a time difference corresponding to any test and the mean value exceeding a preset value, it is determined that the concurrent performance of the network file system is unstable; In response to the absolute value of the difference between the time difference corresponding to the multiple tests and the average value not exceeding the preset value, it is confirmed that the concurrency performance of the network file system is stable.
8. A network file system testing device, characterized in that: The device comprises: A mounting module configured to mount a shared directory of an NFS service for multiple clients; A thread setting module, configured to set each client to run multiple threads in parallel to perform read and write operations, wherein the read and write block sizes of each thread performing the read and write operations are the same; a selection module configured to select one client from a plurality of clients as a target client and to establish a communication bus between the target client and each of the remaining clients; a thread monitoring module, the thread monitoring module being configured to monitor the execution status of each thread of the target client and monitor the execution status of each thread on the remaining clients via the communication bus; A task splitting module, configured to split the task to be tested into sub-test tasks on the target client using the read-write block size as a unit, wherein the task to be tested is used to perform a read or write operation on a file in the shared directory; A task distribution module is configured to distribute sub-test tasks on the target client according to the execution status of each thread until all sub-test tasks are completed.
9. An electronic device, characterized in that: include: at least one processor; as well as A memory storing a computer program executable in the processor, wherein the processor executes the method according to any one of claims 1 to 7 when executing the program.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is performed.
Citation Information
Patent Citations
Parallel test device and method of multiple network protocols
CN103973504A
Method and device for writing data based on common Internet file system
CN109309631A