CN112463072A - Client feedback method and system based on samba software read-write file operation - Google Patents
Client feedback method and system based on samba software read-write file operation Download PDFInfo
- Publication number
- CN112463072A CN112463072A CN202011462020.2A CN202011462020A CN112463072A CN 112463072 A CN112463072 A CN 112463072A CN 202011462020 A CN202011462020 A CN 202011462020A CN 112463072 A CN112463072 A CN 112463072A
- Authority
- CN
- China
- Prior art keywords
- read
- write
- thread
- sub
- client
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Withdrawn
Links
- 238000000034 method Methods 0.000 title claims abstract description 19
- 238000012544 monitoring process Methods 0.000 claims abstract description 15
- 238000010586 diagram Methods 0.000 description 5
- 230000007547 defect Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0604—Improving or facilitating administration, e.g. storage management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0614—Improving the reliability of storage systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/062—Securing storage systems
- G06F3/0622—Securing storage systems in relation to access
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/067—Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention relates to the technical field of distributed storage, and provides a client feedback method and a system based on the read-write file operation of samba software, wherein the method comprises the following steps: when the samba software server receives a read-write request sent by a client, monitoring the action of data read-write; when the fact that data reading and writing actions start to be executed is monitored, a first sub-thread is created; when the data reading and writing are finished, the created first sub-thread is used for executing feedback action to the client, so that the feedback of the client is transmitted through the first sub-thread, the main thread pressure of the samba software server is reduced, and the product performance is improved.
Description
Technical Field
The invention belongs to the technical field of distributed storage, and particularly relates to a client feedback method and a client feedback system based on reading and writing file operation of samba software.
Background
In the distributed storage, after the client mounts the service node through the samba software, it is an indispensable operation to store (write) data to the server and copy (read) data from the server to the client.
The operations require a packet of data to be transmitted between the client and the server, and after each packet of data is successfully operated, the samba software server needs to feed back the packet of data to the client. At present, the read-write feedback operation is performed through the main thread of the samba software server, so that the pressure of the main thread of the samba software server is too high, and the performance of the samba software is reduced.
Disclosure of Invention
Aiming at the defects in the prior art, the invention provides a client feedback method based on the read-write file operation of samba software, and aims to solve the problems that the read-write feedback operation is carried out through the main thread of a samba software server in the prior art, so that the pressure of the main thread of the samba software server is overlarge, and the performance of the samba software is reduced.
The technical scheme provided by the invention is as follows: a client feedback method based on samba software read-write file operation comprises the following steps:
when the samba software server receives a read-write request sent by a client, monitoring the action of data read-write;
when the fact that data reading and writing actions start to be executed is monitored, a first sub-thread is created;
and when the data reading and writing are finished, executing a feedback action to the client by using the created first sub-thread.
As an improved scheme, when the samba software server receives a read-write request sent by a client, the step of monitoring the data read-write action is performed; when the execution of the data reading and writing actions is monitored, the method also comprises the following steps before the first sub-thread is created:
at the samba software server, analyzing the received read-write request sent by the client to obtain specific information of the read-write request, wherein the specific information of the read-write request comprises a file descriptor of a read-write file;
when the specific information of the read-write request is acquired, a second sub-thread is created;
and performing read-write operation on the acquired specific information of the read-write request by using the second sub thread.
As an improved scheme, when the samba software server receives a read-write request sent by a client, the step of monitoring the data read-write action is performed; when the execution of the data reading and writing actions is monitored, the method also comprises the following steps before the first sub-thread is created:
at the samba software server, analyzing the received read-write request sent by the client to obtain specific information of the read-write request, wherein the specific information of the read-write request comprises a file descriptor of a read-write file;
and performing read-write operation on the acquired specific information of the read-write request by using the first sub thread.
As an improved scheme, the step of creating the first sub-thread when it is monitored that the data read-write action starts to be executed specifically includes the following steps:
creating an EPOLL component in the created first sub-thread;
adding a file descriptor of the read-write file to the created EPOLL assembly;
and calling an EPOLL _ wait function of the EPOLL assembly, and controlling the EPOLL assembly to enter a waiting feedback state.
Another object of the present invention is to provide a client feedback system based on the reading and writing file operation of samba software, wherein the system comprises:
the reading and writing action monitoring module is used for monitoring the action of data reading and writing when the samba software server receives a reading and writing request sent by the client;
the first sub-thread creating module is used for creating a first sub-thread when the fact that the data reading and writing action starts to be executed is monitored;
and the feedback action execution module is used for executing a feedback action to the client by utilizing the created first sub thread when the data reading and writing are finished.
As an improvement, the system further comprises:
the first read-write request analysis module is used for analyzing the received read-write request sent by the client at the samba software server to obtain the specific information of the read-write request, wherein the specific information of the read-write request comprises a file descriptor of a read-write file;
the second sub-thread creating module is used for creating a second sub-thread when the specific information of the read-write request is acquired;
and the first read-write action execution module is used for applying the second sub-thread to perform read-write operation on the specific information of the acquired read-write request.
As an improvement, the system further comprises:
the second read-write request analysis module is used for analyzing the received read-write request sent by the client at the samba software server to obtain specific information of the read-write request, wherein the specific information of the read-write request comprises a file descriptor of a read-write file;
and the second read-write action execution module is used for applying the first sub-thread to perform read-write operation on the specific information of the acquired read-write request.
As an improved scheme, the first sub-thread creating module specifically includes:
an EPOLL component creating module, configured to create an EPOLL component in the created first sub-thread;
a file descriptor adding module, configured to add a file descriptor of the read-write file to the created EPOLL component;
and the Wait function calling module is used for calling an EPOLL _ Wait function of the EPOL assembly and controlling the EPOL assembly to enter a waiting feedback state.
In the embodiment of the invention, when the samba software server receives a read-write request sent by a client, the data read-write action is monitored; when the fact that data reading and writing actions start to be executed is monitored, a first sub-thread is created; when the data reading and writing are finished, the created first sub-thread is used for executing feedback action to the client, so that the feedback of the client is transmitted through the first sub-thread, the main thread pressure of the samba software server is reduced, and the product performance is improved.
Drawings
In order to more clearly illustrate the detailed description of the invention or the technical solutions in the prior art, the drawings that are needed in the detailed description of the invention or the prior art will be briefly described below. Throughout the drawings, like elements or portions are generally identified by like reference numerals. In the drawings, elements or portions are not necessarily drawn to scale.
Fig. 1 is a flowchart illustrating an implementation of a client feedback method based on reading and writing file operations of samba software according to the present invention;
FIG. 2 is a flow chart of an implementation of creating a first sub-thread when it is monitored that a data read/write operation begins to be performed according to the present invention;
fig. 3 is a block diagram of a structure of a client feedback system based on reading and writing file operations of samba software according to an embodiment of the present invention;
fig. 4 is a block diagram of a structure of a client feedback system based on the reading and writing file operation of samba software according to a second embodiment of the present invention;
fig. 5 is a block diagram of a structure of a client feedback system based on reading and writing file operations of samba software according to a third embodiment of the present invention.
Detailed Description
Embodiments of the present invention will be described in detail below with reference to the accompanying drawings. The following examples are merely for illustrating the technical solutions of the present invention more clearly, and therefore are only examples, and the protection scope of the present invention is not limited thereby.
Fig. 1 is a flowchart illustrating an implementation of a client feedback method based on a samba software read-write file operation, which specifically includes the following steps:
in step S101, when the samba software service end receives a read-write request sent by the client, the data read-write action is monitored;
in step S102, when it is monitored that a data read/write action starts to be executed, a first sub-thread is created;
in step S103, when data read/write is completed, a feedback action to the client is performed by using the created first child thread.
In the embodiment, the client feedback action which is originally completed through the samba software server is transferred to the created first sub-thread to be realized, so that the working pressure of the main thread is reduced, and the product performance is improved.
As an embodiment of the present invention, after the step of monitoring the data read-write action when the samba software server receives the read-write request sent by the client; when the execution of the data reading and writing actions is monitored, the method also comprises the following steps before the first sub-thread is created:
(1) at the samba software server, analyzing the received read-write request sent by the client to obtain specific information of the read-write request, wherein the specific information of the read-write request comprises a file descriptor of a read-write file;
(2) when the specific information of the read-write request is acquired, a second sub-thread is created;
(3) performing read-write operation on the obtained specific information of the read-write request by using the second sub thread;
the above is a flow of implementing data read/write operations, and is not intended to limit the present invention.
As another embodiment of the present invention, after the step of monitoring the data read-write action when the samba software server receives the read-write request sent by the client; when the execution of the data reading and writing actions is monitored, the method also comprises the following steps before the first sub-thread is created:
(1) at the samba software server, analyzing the received read-write request sent by the client to obtain specific information of the read-write request, wherein the specific information of the read-write request comprises a file descriptor of a read-write file;
(2) performing read-write operation on the obtained specific information of the read-write request by using the first sub thread;
the above is another implementation flow of data read/write operations, and is not intended to limit the present invention.
In the embodiment of the present invention, as shown in fig. 2, when it is monitored that the data read-write action starts to be executed, the step of creating the first sub-thread specifically includes the following steps:
in step S201, creating an EPOLL component in the created first child thread;
in step S202, adding a file descriptor of the read-write file to the created EPOLL component;
in step S203, an EPOLL _ wait function of the EPOLL component is called, and the EPOLL component is controlled to enter a wait feedback state.
In this embodiment, EPOLL is a poll modified by the Linux kernel to handle large-volume file descriptors, and is an enhanced version of the multiplexing IO interface select/poll in Linux, which can significantly improve the system CPU utilization in the case where only a small amount of programs are active in a large number of concurrent connections. Another reason is that when an event is fetched, it does not have to traverse the entire snooped descriptor set, as long as traversing the descriptor sets that were asynchronously awakened by kernel IO events and added to the Ready queue. Besides providing Level trigger (Level trigger) of select/poll IO event, epoll also provides Edge trigger (Edge trigger), which makes it possible for user space program to buffer IO state, reduces epoll _ wait/epoll _ pwait calls, and improves application program efficiency.
Fig. 3 shows a block diagram of a client feedback system based on reading and writing file operations of samba software according to the present invention, and for convenience of description, only the parts related to the embodiment of the present invention are shown in the diagram.
The client feedback system based on the reading and writing file operation of the samba software comprises:
the read-write action monitoring module 11 is used for monitoring the action of data read-write when the samba software server receives a read-write request sent by the client;
the first sub-thread creating module 12 is configured to create a first sub-thread when it is monitored that a data read-write action starts to be executed;
and the feedback action execution module 13 is configured to execute a feedback action to the client by using the created first sub-thread when data reading and writing are completed.
In this embodiment of the present invention, the first sub-thread creating module 12 specifically includes:
an EPOLL component creation module 14, configured to create an EPOLL component in the created first child thread;
a file descriptor adding module 15, configured to add a file descriptor of the read-write file to the created EPOLL component;
a Wait function calling module 16, configured to call an EPOLL _ Wait function of the EPOLL component, and control the EPOLL component to enter a Wait feedback state.
As another embodiment of the present invention, on the basis of the embodiment shown in fig. 3, as shown in fig. 4, the system further includes:
a first read-write request parsing module 17, configured to parse, at the samba software server, the received read-write request sent by the client to obtain specific information of the read-write request, where the specific information of the read-write request includes a file descriptor of a read-write file;
a second sub-thread creating module 18, configured to create a second sub-thread when specific information of the read-write request is obtained;
and the first read-write action execution module 19 is configured to apply the second sub-thread to perform read-write operation on the obtained specific information of the read-write request.
As another embodiment of the present invention, on the basis of the embodiment shown in fig. 3, as shown in fig. 5, the system further includes:
a second read-write request parsing module 20, configured to parse, at the samba software server, the received read-write request sent by the client to obtain specific information of the read-write request, where the specific information of the read-write request includes a file descriptor of a read-write file;
and the second read/write action execution module 21 is configured to apply the first sub-thread to perform read/write operation on the obtained specific information of the read/write request.
The functions of the modules are described in the above embodiments, and are not described herein again.
In the embodiment of the invention, when the samba software server receives a read-write request sent by a client, the data read-write action is monitored; when the fact that data reading and writing actions start to be executed is monitored, a first sub-thread is created; when the data reading and writing are finished, the created first sub-thread is used for executing feedback action to the client, so that the feedback of the client is transmitted through the first sub-thread, the main thread pressure of the samba software server is reduced, and the product performance is improved.
The above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; such modifications and substitutions do not depart from the spirit and scope of the present invention, and they should be construed as being included in the following claims and description.
Claims (8)
1. A client feedback method based on samba software read-write file operation is characterized by comprising the following steps:
when the samba software server receives a read-write request sent by a client, monitoring the action of data read-write;
when the fact that data reading and writing actions start to be executed is monitored, a first sub-thread is created;
and when the data reading and writing are finished, executing a feedback action to the client by using the created first sub-thread.
2. The client feedback method based on samba software read-write file operation as claimed in claim 1, wherein said step of monitoring the data read-write action is performed when the samba software server receives the read-write request from the client; when the execution of the data reading and writing actions is monitored, the method also comprises the following steps before the first sub-thread is created:
at the samba software server, analyzing the received read-write request sent by the client to obtain specific information of the read-write request, wherein the specific information of the read-write request comprises a file descriptor of a read-write file;
when the specific information of the read-write request is acquired, a second sub-thread is created;
and performing read-write operation on the acquired specific information of the read-write request by using the second sub thread.
3. The client feedback method based on samba software read-write file operation as claimed in claim 1, wherein said step of monitoring the data read-write action is performed when the samba software server receives the read-write request from the client; when the execution of the data reading and writing actions is monitored, the method also comprises the following steps before the first sub-thread is created:
at the samba software server, analyzing the received read-write request sent by the client to obtain specific information of the read-write request, wherein the specific information of the read-write request comprises a file descriptor of a read-write file;
and performing read-write operation on the acquired specific information of the read-write request by using the first sub thread.
4. The client feedback method based on the reading and writing file operation of samba software as claimed in claim 2 or 3, wherein said step of creating the first sub-thread when it is monitored that the data reading and writing action starts to be performed specifically comprises the steps of:
creating an EPOLL component in the created first sub-thread;
adding a file descriptor of the read-write file to the created EPOLL assembly;
and calling an EPOLL _ wait function of the EPOLL assembly, and controlling the EPOLL assembly to enter a waiting feedback state.
5. A client feedback system based on the operation of reading and writing files by samba software is characterized by comprising:
the reading and writing action monitoring module is used for monitoring the action of data reading and writing when the samba software server receives a reading and writing request sent by the client;
the first sub-thread creating module is used for creating a first sub-thread when the fact that the data reading and writing action starts to be executed is monitored;
and the feedback action execution module is used for executing a feedback action to the client by utilizing the created first sub thread when the data reading and writing are finished.
6. The client feedback system based on the operation of the samba software for reading and writing the file as claimed in claim 5, wherein the system further comprises:
the first read-write request analysis module is used for analyzing the received read-write request sent by the client at the samba software server to obtain the specific information of the read-write request, wherein the specific information of the read-write request comprises a file descriptor of a read-write file;
the second sub-thread creating module is used for creating a second sub-thread when the specific information of the read-write request is acquired;
and the first read-write action execution module is used for applying the second sub-thread to perform read-write operation on the specific information of the acquired read-write request.
7. The client feedback system based on the operation of the samba software for reading and writing the file as claimed in claim 5, wherein the system further comprises:
the second read-write request analysis module is used for analyzing the received read-write request sent by the client at the samba software server to obtain specific information of the read-write request, wherein the specific information of the read-write request comprises a file descriptor of a read-write file;
and the second read-write action execution module is used for applying the first sub-thread to perform read-write operation on the specific information of the acquired read-write request.
8. The client feedback system based on the operation of reading and writing files by samba software as claimed in claim 6 or 7, wherein the first sub-thread creating module specifically comprises:
an EPOLL component creating module, configured to create an EPOLL component in the created first sub-thread;
a file descriptor adding module, configured to add a file descriptor of the read-write file to the created EPOLL component;
and the Wait function calling module is used for calling an EPOLL _ Wait function of the EPOL assembly and controlling the EPOL assembly to enter a waiting feedback state.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011462020.2A CN112463072A (en) | 2020-12-11 | 2020-12-11 | Client feedback method and system based on samba software read-write file operation |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011462020.2A CN112463072A (en) | 2020-12-11 | 2020-12-11 | Client feedback method and system based on samba software read-write file operation |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112463072A true CN112463072A (en) | 2021-03-09 |
Family
ID=74804070
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011462020.2A Withdrawn CN112463072A (en) | 2020-12-11 | 2020-12-11 | Client feedback method and system based on samba software read-write file operation |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112463072A (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110519329A (en) * | 2019-07-23 | 2019-11-29 | 苏州浪潮智能科技有限公司 | A kind of method, equipment and the readable medium of concurrent processing samba agreement request |
CN111770054A (en) * | 2020-05-28 | 2020-10-13 | 苏州浪潮智能科技有限公司 | Interaction acceleration method and system for SMB protocol read request |
-
2020
- 2020-12-11 CN CN202011462020.2A patent/CN112463072A/en not_active Withdrawn
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110519329A (en) * | 2019-07-23 | 2019-11-29 | 苏州浪潮智能科技有限公司 | A kind of method, equipment and the readable medium of concurrent processing samba agreement request |
CN111770054A (en) * | 2020-05-28 | 2020-10-13 | 苏州浪潮智能科技有限公司 | Interaction acceleration method and system for SMB protocol read request |
Non-Patent Citations (1)
Title |
---|
荒野之萍: "基于线程池、消息队列和epoll模型实现并发服务器架构", 《HTTPS://WWW.CNBLOGS.COM/ICOTY23/P/10989445.HTML》 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11340803B2 (en) | Method for configuring resources, electronic device and computer program product | |
JP6961844B2 (en) | Storage volume creation method and device, server, and storage medium | |
CN107105009B (en) | Job scheduling method and device for butting workflow engine based on Kubernetes system | |
CN113918101B (en) | Method, system, equipment and storage medium for writing data cache | |
US11243808B2 (en) | Information processing apparatus and storage medium storing execution control program | |
JP7039631B2 (en) | Methods, devices, devices, and storage media for managing access requests | |
KR20210040850A (en) | Method, apparatus, device, and storage medium for parsing document | |
US9836516B2 (en) | Parallel scanners for log based replication | |
CN110851276A (en) | Service request processing method, device, server and storage medium | |
CN115080128A (en) | Method, system, device and storage medium for managing starting sequence of hard disk | |
CN114218135A (en) | Source end flow control method and system based on Redis cache | |
US20220342579A1 (en) | Memory migration method, apparatus, and computing device | |
CN112463072A (en) | Client feedback method and system based on samba software read-write file operation | |
US12019909B2 (en) | IO request pipeline processing device, method and system, and storage medium | |
KR102418991B1 (en) | Adaptive i/o completion method and computer program for performing the same | |
CN114327404A (en) | File processing method and device, electronic equipment and computer readable medium | |
KR102456017B1 (en) | Apparatus and method for file sharing between applications | |
JP6656485B1 (en) | Interrupt processing method, computer system and program | |
CN113032118A (en) | Asynchronous operation processing method for computer application program and corresponding system | |
CN113609101A (en) | Real-time data task issuing method and device, electronic equipment and storage medium | |
WO2018230444A1 (en) | Accelerator control device, accelerator control method, and recording medium with accelerator control program stored therein | |
CN111611307A (en) | Report exporting method and device | |
US20210382752A1 (en) | Server, apparatus, and method for accelerating file input-output offload for unikernel | |
CN113806011B (en) | Cluster resource control method and device, cluster and computer readable storage medium | |
JP5390947B2 (en) | Job management system, job management apparatus and program thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20210309 |
|
WW01 | Invention patent application withdrawn after publication |