CN111367627B - Method and device for processing read-write disk task - Google Patents

Method and device for processing read-write disk task Download PDF

Info

Publication number
CN111367627B
CN111367627B CN201811602446.6A CN201811602446A CN111367627B CN 111367627 B CN111367627 B CN 111367627B CN 201811602446 A CN201811602446 A CN 201811602446A CN 111367627 B CN111367627 B CN 111367627B
Authority
CN
China
Prior art keywords
task
disk
read
processing
upper limit
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.)
Active
Application number
CN201811602446.6A
Other languages
Chinese (zh)
Other versions
CN111367627A (en
Inventor
温源
黄莹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
3600 Technology Group Co ltd
Original Assignee
3600 Technology Group Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 3600 Technology Group Co ltd filed Critical 3600 Technology Group Co ltd
Priority to CN201811602446.6A priority Critical patent/CN111367627B/en
Publication of CN111367627A publication Critical patent/CN111367627A/en
Application granted granted Critical
Publication of CN111367627B publication Critical patent/CN111367627B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/466Transaction processing

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a method and a device for processing a read-write disk task, electronic equipment and a computer readable storage medium. The method comprises the following steps: determining a task processing upper limit value of a read-write disk task; creating a task queue according to the determined upper limit value of task processing; transmitting the read-write disk task in the access request to a corresponding task queue; and performing corresponding processing according to the read-write disk tasks in the task queue. The created task queue is determined according to the upper limit value of task processing, namely the number of tasks which can be accommodated by the task queue is consistent with the upper limit value of task processing, and then the tasks are processed according to the read-write disk tasks in the task queue, so that the processing of the read-write disk tasks can be realized under the condition that the performance of the disk is allowed, the response efficiency of the request is ensured, the disk can be protected, the integral operation of the system is ensured, and the use experience of a user is enhanced.

Description

Method and device for processing read-write disk task
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for processing a read-write disk task, an electronic device, and a computer readable storage medium.
Background
The access request comprises a network task and a read-write disk task, when the server receives the access request, synchronous processing is generally carried out, and for the read-write disk task in the access request, read-write operation is carried out on the corresponding disk according to the read-write disk task. However, the read-write operation on the disk is generally affected by factors such as performance of the disk, and if the disk is overloaded, the read-write operation task is forcedly processed, which is rather appropriate, and even affects the overall operation of the system.
Disclosure of Invention
The present invention has been made in view of the above-mentioned problems, and it is an object of the present invention to provide a method, an apparatus, an electronic device, and a computer-readable storage medium for processing a read-write disk task that overcomes or at least partially solves the above-mentioned problems.
According to one aspect of the present invention, there is provided a method for processing a read-write disk task, wherein the method includes:
determining a task processing upper limit value of a read-write disk task;
creating a task queue according to the determined upper limit value of task processing;
transmitting the read-write disk task in the access request to a corresponding task queue;
and performing corresponding processing according to the read-write disk tasks in the task queue.
Optionally, the method further comprises:
when the task number of the task queue reaches the upper limit value of task processing, corresponding data are acquired from the read-write disk task in the access request to the appointed database.
Optionally, the determining the task processing upper limit value of the read-write disk task includes:
and determining the upper limit value of task processing according to the size, the disk performance, the number of disks and the number of task threads.
Optionally, the task processing upper limit value includes a write disk task number upper limit value and a read disk task number upper limit value;
the ratio of the upper limit value of the task number of the writing magnetic disk to the upper limit value of the task number of the reading magnetic disk is determined according to the hit rate of the magnetic disk.
Optionally, the hit rate is 1:m, and determining the task processing upper limit value according to the size of the task, the disk performance, the number of disks and the number of task threads includes:
determining the upper limit value of the task number of the writing disk according to a formula (V/S) Dn/Tn;
the method comprises the steps of,
determining the upper limit value of the task number of the magnetic disk according to a formula m (V/S) Dn/Tn;
wherein V represents disk performance; s represents the size of the task; dn represents the number of disks; tn represents the number of task threads.
Optionally, the method further comprises:
starting one or more task threads for processing the read-write disk tasks;
The corresponding processing according to the read-write disk task in the task queue comprises the following steps:
performing corresponding processing according to the read-write disk task in the task queue by utilizing the task thread; and receiving a notification sent by the task thread when the read-write disk task is processed.
Optionally, the method further comprises:
judging whether the number of the access requests reaches a preset access amount, and if so, executing the step of starting one or more task threads for processing the read-write disk task.
Optionally, the starting one or more task threads for processing the read-write disk task includes:
starting a task thread for processing the read-write disk task;
and when the number of the read-write disk tasks in the received access request is greater than or equal to the preset task number, starting one or more task threads for processing the read-write disk tasks.
Optionally, the method further comprises:
and when the number of the read-write disk tasks in the received access request is smaller than the preset task amount, closing the task thread which is opened later.
Optionally, the method further comprises:
establishing a corresponding relation with one or more opened task threads;
The corresponding processing by the task thread according to the read-write disk task in the task queue comprises the following steps:
and performing corresponding processing according to the read-write disk task in the task queue by using the task thread with the corresponding relation.
Optionally, the method further comprises:
establishing corresponding relations between one or more started task threads and each disk respectively;
the corresponding processing by the task thread according to the read-write disk task in the task queue comprises the following steps:
judging a disk to be read and written corresponding to the disk reading and writing task in the task queue;
determining a task thread corresponding to the disk to be read and written;
and carrying out corresponding processing according to the corresponding disk reading and writing task in the task queue by utilizing the task thread corresponding to the disk to be read and written.
According to another aspect of the present invention, there is provided a processing apparatus for reading and writing a disk task, wherein the apparatus includes:
the determining unit is suitable for determining a task processing upper limit value of a read-write disk task;
a creating unit adapted to create a task queue according to the determined task processing upper limit value;
the sending unit is suitable for sending the read-write disk task in the access request to the corresponding task queue;
And the processing unit is suitable for carrying out corresponding processing according to the read-write disk tasks in the task queue.
Optionally, the apparatus further comprises:
and the processing unit is suitable for acquiring corresponding data according to the read-write disk task in the access request to the appointed database when the task number of the task queue reaches the task processing upper limit value.
Alternatively, the process may be carried out in a single-stage,
the determining unit is suitable for determining the upper limit value of task processing according to the size of the task, the disk performance, the number of disks and the number of task threads.
Optionally, the task processing upper limit value includes a write disk task number upper limit value and a read disk task number upper limit value;
the ratio of the upper limit value of the task number of the writing magnetic disk to the upper limit value of the task number of the reading magnetic disk is determined according to the hit rate of the magnetic disk.
Optionally, the hit rate is 1:m, and the determining unit is adapted to determine the upper limit value of the number of tasks to write to the disk according to formula (V/S) ×dn/Tn; and determining an upper limit value of the task number of the magnetic disk according to a formula m (V/S) Dn/Tn;
wherein V represents disk performance; s represents the size of the task; dn represents the number of disks; tn represents the number of task threads.
Optionally, the apparatus further comprises:
the starting unit is suitable for starting one or more task threads for processing the read-write disk tasks;
The processing unit is suitable for carrying out corresponding processing according to the read-write disk task in the task queue by utilizing the task thread; and receiving a notification sent by the task thread when the read-write disk task is processed.
Optionally, the apparatus further comprises:
and the judging unit is suitable for judging whether the number of the access requests reaches the preset access amount, and if so, the starting unit further executes the step of starting one or more task threads for processing the read-write disk task.
Optionally, the starting unit is suitable for starting a task thread for processing the task of reading and writing the magnetic disk; and when the number of the read-write disk tasks in the received access request is greater than or equal to the preset task number, starting one or more task threads for processing the read-write disk tasks.
Optionally, the apparatus further comprises:
and the closing unit is suitable for closing the task thread which is opened later when the number of the read-write disk tasks in the received access request is smaller than the preset task number.
Optionally, the apparatus further comprises:
the building unit is suitable for building a corresponding relation with one or more opened task threads;
the processing unit is suitable for carrying out corresponding processing according to the read-write disk task in the task queue by utilizing the task thread with the corresponding relation.
Optionally, the apparatus further comprises:
the establishing unit is suitable for establishing corresponding relations between one or more started task threads and each magnetic disk respectively;
the processing unit is suitable for judging a disk to be read and written corresponding to the disk read and write task in the task queue; determining a task thread corresponding to the disk to be read and written; and carrying out corresponding processing according to the corresponding disk reading and writing task in the task queue by utilizing the task thread corresponding to the disk to be read and written.
According to still another aspect of the present invention, there is provided an electronic apparatus, wherein the electronic apparatus includes:
a processor; the method comprises the steps of,
a memory arranged to store computer executable instructions which, when executed, cause the processor to perform a method according to the foregoing.
According to yet another aspect of the present invention, there is provided a computer readable storage medium storing one or more programs which, when executed by a processor, implement the aforementioned method.
According to the technical scheme of the invention, the upper limit value of the task processing of the read-write disk task is determined; creating a task queue according to the determined upper limit value of task processing; transmitting the read-write disk task in the access request to a corresponding task queue; and performing corresponding processing according to the read-write disk tasks in the task queue. The created task queue is determined according to the upper limit value of task processing, namely the number of tasks which can be accommodated by the task queue is consistent with the upper limit value of task processing, and then the tasks are processed according to the read-write disk tasks in the task queue, so that the processing of the read-write disk tasks can be realized under the condition that the performance of the disk is allowed, the response efficiency of the request is ensured, the disk can be protected, the integral operation of the system is ensured, and the use experience of a user is enhanced.
The foregoing description is only an overview of the present invention, and is intended to be implemented in accordance with the teachings of the present invention in order that the same may be more clearly understood and to make the same and other objects, features and advantages of the present invention more readily apparent.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to designate like parts throughout the figures. In the drawings:
FIG. 1 is a flow chart of a method for processing a read/write disk task according to one embodiment of the invention;
FIG. 2 illustrates a schematic diagram of a processing device for reading and writing disk tasks according to one embodiment of the invention;
FIG. 3 shows a schematic diagram of an electronic device according to one embodiment of the invention;
fig. 4 illustrates a schematic structure of a computer-readable storage medium according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
FIG. 1 is a flow chart illustrating a method of processing a read/write disk task according to one embodiment of the invention. As shown in fig. 1, the method includes:
step S110, determining the upper limit value of task processing of the read-write disk task.
In view of the fact that the read-write operation of the disk in the prior art may be affected by factors such as performance of the disk, in this embodiment, first, a task processing upper limit value of a write-fast disk task is determined, so as to ensure that processing of the write-read disk task is within a processable range.
Step S120, a task queue is created according to the determined upper limit value of task processing.
The number of tasks that the created task queue can accommodate is consistent with the determined task processing upper limit.
Step S130, the read-write disk task in the access request is sent to the corresponding task queue.
Step S140, corresponding processing is carried out according to the read-write disk task in the task queue.
Because the task queue is created according to the determined upper limit value of task processing, namely the number of tasks which can be accommodated by the task queue is consistent with the upper limit value of task processing, the processing of the read-write disk task can be ensured under the condition that the disk performance is allowed as long as the processing is performed according to the read-write disk task in the task queue, the response efficiency of the request is ensured, the protection effect on the disk is also realized, the overall operation of the system is ensured, and the use experience of a user is enhanced.
In one embodiment of the present invention, the method shown in fig. 1 further comprises: when the task number of the task queue reaches the upper limit value of task processing, corresponding data are acquired from the specified database according to the read-write disk task in the access request.
Because the task number which can be accommodated in the task queue is consistent with the task processing upper limit value, when the task number in the task queue reaches the task processing upper limit value, the operation of the read-write disk is indicated to reach the upper limit, if the processing is continued, overload can be caused, and then the read-write disk task in the access request cannot be sent to the task queue any more. But should also handle the read-write disk tasks in the access request. In this embodiment, the read-write disk task is directly processed in a source-returning manner, that is, corresponding data is obtained from a specified database (for example, a source database) in response to the read-write disk task, and the obtained corresponding data is directly returned to the user without locally performing the read-write disk.
For example, when the local server is used as a storage server and processes the task of reading and writing a disk, the local disk needs to be read and written, and if the source needs to be returned, the corresponding data acquired from the source database is written into the local disk and then returned to the user. In this embodiment, when the number of tasks in the task queue reaches the upper limit of task processing, the rough server directly returns the data obtained from the source database to the user without writing in the local disk.
In one embodiment of the present invention, determining the task processing upper limit value of the read/write disk task in step S110 of the method shown in fig. 1 includes: and determining the upper limit value of task processing according to the size, the disk performance, the number of disks and the number of task threads.
The size of the task, the disk performance and the number of disks directly affect the task processing situation, so that factors of the size of the task, the disk performance (such as the read-write speed of the disks) and the number of disks need to be considered when determining the upper limit value of task processing.
In this embodiment, the task threads performing task processing may be one or more, and the number of task threads needs to be considered when determining the task processing upper limit value.
Specifically, the task processing upper limit value includes a write disk task number upper limit value and a read disk task number upper limit value; the ratio of the upper limit value of the task number of the writing magnetic disk to the upper limit value of the task number of the reading magnetic disk is determined according to the hit rate of the magnetic disk.
When an end user accesses an acceleration node, the node is called a hit if it has cached data to be accessed, and if not, a fetch back to the origin server is required, or a miss. Hit rate = number of hits/(number of hits + number of hits no). If hit, the disk needs to be read, if not hit, the source needs to be returned, and the acquired data is written into the disk. For example, the hit rate is 80%, then it is stated that of 100 requests, 80 requests are hit and 20 requests are miss. In this embodiment, the upper limit value of the number of tasks to write to the disk and the upper limit value of the number of tasks to read to the disk are determined according to the hit rate.
Further, if the hit rate is 1:m, determining the task processing upper limit value according to the task size, the disk performance, the number of disks, and the number of task threads described above includes: determining the upper limit value of the task number of the writing disk according to a formula (V/S) Dn/Tn; and determining the upper limit value of the task number of the magnetic disk reading according to the formula m (V/S) Dn/Tn.
Wherein V represents disk performance; s represents the size of the task; dn represents the number of disks; tn represents the number of task threads.
For example, if the hit rate is 1:5, the upper limit value of the number of disk reading tasks= (V/S) ×dn/Tn; upper limit of the number of disk reading tasks=5× (V/S) ×dn/Tn.
In one embodiment of the present invention, the method shown in fig. 1 further comprises: starting one or more task threads for processing the read-write disk tasks;
the corresponding processing in step S140 according to the read/write disk task in the task queue includes: performing corresponding processing according to the read-write disk tasks in the task queue by utilizing the task thread; and receiving a notification sent by the task thread when the read-write disk task is processed.
The access request includes a network task and a read-write disk task, and when the server receives the access request, the access request is generally processed in the same step. However, when the access request amount is increased suddenly, a large amount of network tasks and read-write disk tasks are brought, synchronous processing in the prior art is adopted, particularly the read-write disk tasks consume a relatively large amount of time, the processing efficiency is reduced, the request response is not timely, and the user experience is affected; if the processing resources are limited, service paralysis can be caused, and the overall operation of the server is affected.
In the prior art, a task thread (worker) is usually started to synchronously process a network task in an access request and a task of reading and writing a disk. In this embodiment, one or more task threads (io-worker) are started to process the read-write disk task. When the worker receives the access request, if the access request comprises a read-write disk task, the read-write disk task is sent to the opened io-worker, and the worker only processes the network task in the access request. When the io-worker finishes processing the read-write disk task, the worker can call back the message processed by the io-worker so as to perform the next processing.
Therefore, in the technical scheme, the read-write disk task in the access request is processed by starting the task thread, when the task thread processes the completed information of the callback task, the asynchronous processing of the read-write disk task is realized, even if the access request quantity is suddenly increased, the untimely request response caused by low processing efficiency is avoided, the user experience is enhanced, and the integral operation of the server is ensured.
Further, on the basis of the above embodiment, the method shown in fig. 1 further includes:
judging whether the number of the access requests reaches a preset access amount, and if so, executing the step of starting one or more task threads for processing the read-write disk task.
In a specific embodiment of the present invention, when the number of access requests reaches a preset access amount, if the worker synchronously processes, the processing efficiency is affected, and then one or more task threads for processing the read-write disk task are started to implement asynchronous processing of the read-write disk task.
Further, the starting one or more task threads for processing the read-write disk task includes: starting a task thread for processing the read-write disk task; and when the number of the read-write disk tasks in the received access request is greater than or equal to the preset task number, starting one or more task threads for processing the read-write disk tasks.
In this embodiment, in order to make reasonable use of resources, only the number of task threads that can be used effectively is started, that is, if only one task thread is needed to process a read-write disk task, if 3 task threads are started at a time, the other 2 threads are not used effectively. Therefore, a task thread for processing the read-write disk task is started first; and when the number of the read-write disk tasks in the received access request is greater than or equal to the preset task number, starting one or more task threads for processing the read-write disk tasks. For example, a task thread 1 is started first, and when a read-write disk task breaks down a preset task amount, a task thread 2 and a task thread 3 are started.
Preferably, when the task thread is started, the number of read-write disk tasks to be processed is guaranteed to be matched with the number of processes allowed by the disk hardware performance.
Further, on the basis of the above embodiment, the method shown in fig. 1 further includes: and when the number of the read-write disk tasks in the received access request is smaller than the preset task amount, closing the task thread which is opened later.
In the above embodiment, the task thread that is opened again is because the task amount of the read-write disk is larger, if the task amount of the read-write disk is reduced, the task thread that is opened again cannot be better utilized, and then the task thread that is opened later can be closed at this time. For example, a task thread 1 is started first, and when a read-write disk task breaks down a preset task amount, a task thread 2 and a task thread 3 are started; and when the number of the read-write disk tasks in the access request is smaller than the preset task amount, closing the task thread 2 and the task thread 3.
In the technical scheme, one or more task threads are opened in a thread pool, the corresponding relation of the task threads in the thread pool is different, and the processing modes are also different.
Further, on the basis of the above embodiment, the method shown in fig. 1 further includes: and establishing a corresponding relation with the opened one or more task threads.
The processing of the task thread according to the read-write disk task in the task queue comprises the following steps: and carrying out corresponding processing according to the read-write disk tasks in the task queue by utilizing the task threads with the corresponding relations.
In this embodiment, the worker and the io-worker have a corresponding relationship, and when the worker sends the read-write disk task in the access request to the task queue, the io-worker having a corresponding relationship with the read-write disk task in the task queue processes the read-write disk task sent by the worker in the task queue.
In practical application, after the worker creates the task queue, the task queue has a corresponding relation with the worker, in this embodiment, when the worker establishes a specific implementation of the corresponding relation with the opened one or more task threads, the worker may establish a corresponding relation between the opened one or more task threads and the task queue, so that the worker sends the read-write disk task to the corresponding task queue, and the task thread having a corresponding relation with the task queue may process the read-write disk task in the task queue.
Further, on the basis of the above embodiment, the method shown in fig. 1 further includes: and establishing corresponding relations between the opened one or more task threads and each disk respectively.
The processing corresponding to the read-write disk task in the task queue by using the task thread comprises the following steps: judging a disk to be read and written corresponding to the disk reading and writing task in the task queue; determining a task thread corresponding to a disk to be read and written; and carrying out corresponding processing according to the corresponding disk reading and writing task in the task queue by utilizing the task thread corresponding to the disk to be read and written.
In this embodiment, the io-worker has a corresponding relationship with the disk, that is, the io-worker is only responsible for the read-write operation of the corresponding disk, and when the worker sends the read-write disk task in the access request, the corresponding io-worker is used for processing according to the read-write disk task. For example, disc 1 corresponds to io-worker1, disc 2 corresponds to io-worker2, for one read-write disc task in the task queue, the worker determines that the disc to be read-written corresponding to the read-write disc task is disc 1, and then the io-worker1 corresponding to disc 1 is used to process the read-write disc task.
FIG. 2 illustrates a schematic diagram of a processing device for reading and writing disk tasks according to one embodiment of the invention. As shown in fig. 2, the processing device 200 for reading and writing a disk task includes:
the determining unit 210 is adapted to determine a task processing upper limit value of the read-write disk task.
In view of the fact that the read-write operation of the disk in the prior art may be affected by factors such as performance of the disk, in this embodiment, first, a task processing upper limit value of a write-fast disk task is determined, so as to ensure that processing of the write-read disk task is within a processable range.
The creating unit 220 is adapted to create a task queue based on the determined upper limit value of task processing.
The number of tasks that the created task queue can accommodate is consistent with the determined task processing upper limit.
The sending unit 230 is adapted to send the read-write disk task in the access request to the corresponding task queue.
The processing unit 240 is adapted to perform corresponding processing according to the read-write disk task in the task queue.
Because the task queue is created according to the determined upper limit value of task processing, namely the number of tasks which can be accommodated by the task queue is consistent with the upper limit value of task processing, the processing of the read-write disk task can be ensured under the condition that the disk performance is allowed as long as the processing is performed according to the read-write disk task in the task queue, the response efficiency of the request is ensured, the protection effect on the disk is also realized, the overall operation of the system is ensured, and the use experience of a user is enhanced.
In one embodiment of the present invention, the processing unit 240 shown in fig. 2 is adapted to obtain corresponding data according to the read/write disk task in the access request to the specified database when the task number of the task queue reaches the task processing upper limit value.
Because the task number which can be accommodated in the task queue is consistent with the task processing upper limit value, when the task number in the task queue reaches the task processing upper limit value, the operation of the read-write disk is indicated to reach the upper limit, if the processing is continued, overload can be caused, and then the read-write disk task in the access request cannot be sent to the task queue any more. But should also handle the read-write disk tasks in the access request. In this embodiment, the read-write disk task is directly processed in a source-returning manner, that is, corresponding data is obtained from a specified database (for example, a source database) in response to the read-write disk task, and the obtained corresponding data is directly returned to the user without locally performing the read-write disk.
For example, when the local server is used as a storage server and processes the task of reading and writing a disk, the local disk needs to be read and written, and if the source needs to be returned, the corresponding data acquired from the source database is written into the local disk and then returned to the user. In this embodiment, when the number of tasks in the task queue reaches the upper limit of task processing, the rough server directly returns the data obtained from the source database to the user without writing in the local disk.
In an embodiment of the invention, the determining unit 210 shown in fig. 2 is adapted to determine the task processing upper limit value according to the size of the task, the disk performance, the number of disks and the number of task threads.
The size of the task, the disk performance and the number of disks directly affect the task processing situation, so that factors of the size of the task, the disk performance (such as the read-write speed of the disks) and the number of disks need to be considered when determining the upper limit value of task processing.
In this embodiment, the task threads performing task processing may be one or more, and the number of task threads needs to be considered when determining the task processing upper limit value.
Specifically, the task processing upper limit value includes a write disk task number upper limit value and a read disk task number upper limit value.
The ratio of the upper limit value of the task number of the writing magnetic disk to the upper limit value of the task number of the reading magnetic disk is determined according to the hit rate of the magnetic disk.
When an end user accesses an acceleration node, the node is called a hit if it has cached data to be accessed, and if not, a fetch back to the origin server is required, or a miss. Hit rate = number of hits/(number of hits + number of hits no). If hit, the disk needs to be read, if not hit, the source needs to be returned, and the acquired data is written into the disk. For example, the hit rate is 80%, then it is stated that of 100 requests, 80 requests are hit and 20 requests are miss. In this embodiment, the upper limit value of the number of tasks to write to the disk and the upper limit value of the number of tasks to read to the disk are determined according to the hit rate.
Further, if the hit rate is 1:m, the determining unit 210 is adapted to determine an upper limit value of the number of tasks to write to the disk according to the formula (V/S) ×dn/Tn; and determining the upper limit value of the task number of the magnetic disk reading according to the formula m (V/S) Dn/Tn.
Wherein V represents disk performance; s represents the size of the task; dn represents the number of disks; tn represents the number of task threads.
For example, if the hit rate is 1:5, the upper limit value of the number of disk reading tasks= (V/S) ×dn/Tn; upper limit of the number of disk reading tasks=5× (V/S) ×dn/Tn.
In one embodiment of the present invention, the apparatus shown in fig. 2 further comprises:
the starting unit is suitable for starting one or more task threads for processing the read-write disk tasks.
The processing unit 240 is adapted to perform corresponding processing according to the read-write disk task in the task queue by using the task thread; and receiving a notification sent by the task thread when the read-write disk task is processed.
The access request includes a network task and a read-write disk task, and when the server receives the access request, the access request is generally processed in the same step. However, when the access request amount is increased suddenly, a large amount of network tasks and read-write disk tasks are brought, synchronous processing in the prior art is adopted, particularly the read-write disk tasks consume a relatively large amount of time, the processing efficiency is reduced, the request response is not timely, and the user experience is affected; if the processing resources are limited, service paralysis can be caused, and the overall operation of the server is affected.
In the prior art, a task thread (worker) is usually started to synchronously process a network task in an access request and a task of reading and writing a disk. In this embodiment, one or more task threads (io-worker) are started to process the read-write disk task. When the worker receives the access request, if the access request comprises a read-write disk task, the read-write disk task is sent to the opened io-worker, and the worker only processes the network task in the access request. When the io-worker finishes processing the read-write disk task, the worker can call back the message processed by the io-worker so as to perform the next processing.
Therefore, in the technical scheme, the read-write disk task in the access request is processed by starting the task thread, when the task thread processes the completed information of the callback task, the asynchronous processing of the read-write disk task is realized, even if the access request quantity is suddenly increased, the untimely request response caused by low processing efficiency is avoided, the user experience is enhanced, and the integral operation of the server is ensured.
Further, on the basis of the above embodiment, the apparatus shown in fig. 2 further includes:
the judging unit is suitable for judging whether the number of the access requests reaches the preset access amount, and if so, the starting unit further executes the step of starting one or more task threads for processing the read-write disk task.
In a specific embodiment of the present invention, when the number of access requests reaches a preset access amount, if the worker synchronously processes, the processing efficiency is affected, and then one or more task threads for processing the read-write disk task are started to implement asynchronous processing of the read-write disk task.
Further, the starting unit is suitable for starting a task thread for processing the read-write disk task; and when the number of the read-write disk tasks in the received access request is greater than or equal to the preset task number, starting one or more task threads for processing the read-write disk tasks.
In this embodiment, in order to make reasonable use of resources, only the number of task threads that can be used effectively is started, that is, if only one task thread is needed to process a read-write disk task, if 3 task threads are started at a time, the other 2 threads are not used effectively. Therefore, a task thread for processing the read-write disk task is started first; and when the number of the read-write disk tasks in the received access request is greater than or equal to the preset task number, starting one or more task threads for processing the read-write disk tasks. For example, a task thread 1 is started first, and when a read-write disk task breaks down a preset task amount, a task thread 2 and a task thread 3 are started.
Preferably, when the task thread is started, the number of read-write disk tasks to be processed is guaranteed to be matched with the number of processes allowed by the disk hardware performance.
Further, on the basis of the above embodiment, the apparatus shown in fig. 2 further includes:
and the closing unit is suitable for closing the task thread which is opened later when the number of the read-write disk tasks in the received access request is smaller than the preset task number.
In the above embodiment, the task thread that is opened again is because the task amount of the read-write disk is larger, if the task amount of the read-write disk is reduced, the task thread that is opened again cannot be better utilized, and then the task thread that is opened later can be closed at this time. For example, a task thread 1 is started first, and when a read-write disk task breaks down a preset task amount, a task thread 2 and a task thread 3 are started; and when the number of the read-write disk tasks in the access request is smaller than the preset task amount, closing the task thread 2 and the task thread 3.
In the technical scheme, one or more task threads are opened in a thread pool, the corresponding relation of the task threads in the thread pool is different, and the processing modes are also different.
Further, on the basis of the above embodiment, the apparatus shown in fig. 2 further includes:
The establishing unit is suitable for establishing a corresponding relation with one or more opened task threads.
The processing unit 240 is adapted to perform corresponding processing according to the read-write disk task in the task queue by using the task thread with the corresponding relationship.
In this embodiment, the worker and the io-worker have a corresponding relationship, and when the worker sends the read-write disk task in the access request to the task queue, the io-worker having a corresponding relationship with the read-write disk task in the task queue processes the read-write disk task sent by the worker in the task queue.
In practical application, after the worker creates the task queue, the task queue has a corresponding relation with the worker, in this embodiment, when the worker establishes a specific implementation of the corresponding relation with the opened one or more task threads, the worker may establish a corresponding relation between the opened one or more task threads and the task queue, so that the worker sends the read-write disk task to the corresponding task queue, and the task thread having a corresponding relation with the task queue may process the read-write disk task in the task queue.
Further, on the basis of the above embodiment, the apparatus shown in fig. 2 further includes:
the establishing unit is suitable for establishing corresponding relation between one or more started task threads and each magnetic disk respectively.
The processing unit 240 is adapted to determine a disk to be read and written corresponding to the disk read and write task in the task queue; determining a task thread corresponding to a disk to be read and written; and carrying out corresponding processing according to the corresponding disk reading and writing task in the task queue by utilizing the task thread corresponding to the disk to be read and written.
In this embodiment, the io-worker has a corresponding relationship with the disk, that is, the io-worker is only responsible for the read-write operation of the corresponding disk, and when the worker sends the read-write disk task in the access request, the corresponding io-worker is used for processing according to the read-write disk task. For example, disc 1 corresponds to io-worker1, disc 2 corresponds to io-worker2, for one read-write disc task in the task queue, the worker determines that the disc to be read-written corresponding to the read-write disc task is disc 1, and then the io-worker1 corresponding to disc 1 is used to process the read-write disc task.
In summary, according to the technical scheme of the invention, the upper limit value of task processing of the read-write disk task is determined; creating a task queue according to the determined upper limit value of task processing; transmitting the read-write disk task in the access request to a corresponding task queue; and performing corresponding processing according to the read-write disk tasks in the task queue. The created task queue is determined according to the upper limit value of task processing, namely the number of tasks which can be accommodated by the task queue is consistent with the upper limit value of task processing, and then the tasks are processed according to the read-write disk tasks in the task queue, so that the processing of the read-write disk tasks can be realized under the condition that the performance of the disk is allowed, the response efficiency of the request is ensured, the disk can be protected, the integral operation of the system is ensured, and the use experience of a user is enhanced.
It should be noted that:
the algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose devices may also be used with the teachings herein. The required structure for the construction of such devices is apparent from the description above. In addition, the present invention is not directed to any particular programming language. It will be appreciated that the teachings of the present invention described herein may be implemented in a variety of programming languages, and the above description of specific languages is provided for disclosure of enablement and best mode of the present invention.
In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be construed as reflecting the intention that: i.e., the claimed invention requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the apparatus of the embodiments may be adaptively changed and disposed in one or more apparatuses different from the embodiments. The modules or units or components of the embodiments may be combined into one module or unit or component and, furthermore, they may be divided into a plurality of sub-modules or sub-units or sub-components. Any combination of all features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or units of any method or apparatus so disclosed, may be used in combination, except insofar as at least some of such features and/or processes or units are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings), may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features but not others included in other embodiments, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments can be used in any combination.
Various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that the processing means for reading from and writing to disk tasks, the electronic device, and some or all of the functions of some or all of the components in the computer readable storage medium according to embodiments of the invention may be implemented in practice using a microprocessor or Digital Signal Processor (DSP). The present invention may also be implemented as a part of or as a complete device or apparatus program (e.g., a computer program and a computer program product) for performing the methods described herein. Such a program embodying the present invention may be stored on a computer readable medium, or may have the form of one or more signals. Such signals may be downloaded from an internet website, provided on a carrier signal, or provided in any other form.
For example, fig. 3 shows a schematic structural diagram of an electronic device according to an embodiment of the present invention. The electronic device 300 conventionally comprises a processor 310 and a memory 320 arranged to store computer executable instructions (program code). The memory 320 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read only memory), an EPROM, a hard disk, or a ROM. Memory 320 has storage 330 storing program code 340 for performing any of the method steps shown in fig. 1 and in various embodiments. For example, the memory space 330 for program code may include individual program code 340 for implementing the various steps in the above methods, respectively. The program code can be read from or written to one or more computer program products. These computer program products comprise a program code carrier such as a hard disk, a Compact Disc (CD), a memory card or a floppy disk. Such a computer program product is typically a computer readable storage medium 400 such as described in fig. 4. The computer readable storage medium 400 may have memory segments, memory spaces, etc. arranged similarly to the memory 320 in the electronic device of fig. 3. The program code may be compressed, for example, in a suitable form. Typically, the memory unit stores program code 410 for performing the method steps according to the invention, i.e. program code readable by a processor such as 310, which when run by an electronic device causes the electronic device to perform the steps in the method described above.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The use of the words first, second, third, etc. do not denote any order. These words may be interpreted as names.
The invention discloses a method for processing a read-write disk task, which comprises the following steps:
determining a task processing upper limit value of a read-write disk task;
creating a task queue according to the determined upper limit value of task processing;
Transmitting the read-write disk task in the access request to a corresponding task queue;
and performing corresponding processing according to the read-write disk tasks in the task queue.
A2, the method of A1, wherein the method further comprises:
when the task number of the task queue reaches the upper limit value of task processing, corresponding data are acquired from the read-write disk task in the access request to the appointed database.
A3, the method of A1, wherein the determining the task processing upper limit value of the read-write disk task comprises:
and determining the upper limit value of task processing according to the size, the disk performance, the number of disks and the number of task threads.
A4, the method of A3, wherein the task processing upper limit value comprises a writing disk task number upper limit value and a reading disk task number upper limit value;
the ratio of the upper limit value of the task number of the writing magnetic disk to the upper limit value of the task number of the reading magnetic disk is determined according to the hit rate of the magnetic disk.
A5, the method of A4, wherein the hit rate is 1:m, and the determining the task processing upper limit value according to the size, the disk performance, the number of disks and the number of task threads comprises:
determining the upper limit value of the task number of the writing disk according to a formula (V/S) Dn/Tn;
The method comprises the steps of,
determining the upper limit value of the task number of the magnetic disk according to a formula m (V/S) Dn/Tn;
wherein V represents disk performance; s represents the size of the task; dn represents the number of disks; tn represents the number of task threads.
A6, the method of A1, wherein the method further comprises:
starting one or more task threads for processing the read-write disk tasks;
the corresponding processing according to the read-write disk task in the task queue comprises the following steps:
performing corresponding processing according to the read-write disk task in the task queue by utilizing the task thread; and receiving a notification sent by the task thread when the read-write disk task is processed.
A7, the method of A6, wherein the method further comprises:
judging whether the number of the access requests reaches a preset access amount, and if so, executing the step of starting one or more task threads for processing the read-write disk task.
A8, the method as in A6, wherein the starting one or more task threads for processing the read-write disk task comprises:
starting a task thread for processing the read-write disk task;
and when the number of the read-write disk tasks in the received access request is greater than or equal to the preset task number, starting one or more task threads for processing the read-write disk tasks.
A9, the method of A8, wherein the method further comprises:
and when the number of the read-write disk tasks in the received access request is smaller than the preset task amount, closing the task thread which is opened later.
A10, the method of A6, wherein the method further comprises:
establishing a corresponding relation with one or more opened task threads;
the corresponding processing by the task thread according to the read-write disk task in the task queue comprises the following steps:
and performing corresponding processing according to the read-write disk task in the task queue by using the task thread with the corresponding relation.
A11, the method of A6, wherein the method further comprises:
establishing corresponding relations between one or more started task threads and each disk respectively;
the corresponding processing by the task thread according to the read-write disk task in the task queue comprises the following steps:
judging a disk to be read and written corresponding to the disk reading and writing task in the task queue;
determining a task thread corresponding to the disk to be read and written;
and carrying out corresponding processing according to the corresponding disk reading and writing task in the task queue by utilizing the task thread corresponding to the disk to be read and written.
The invention also discloses a B12 and a processing device for the read-write disk task, wherein the device comprises:
the determining unit is suitable for determining a task processing upper limit value of a read-write disk task;
a creating unit adapted to create a task queue according to the determined task processing upper limit value;
the sending unit is suitable for sending the read-write disk task in the access request to the corresponding task queue;
and the processing unit is suitable for carrying out corresponding processing according to the read-write disk tasks in the task queue.
B13, the device of B12, wherein,
and the processing unit is suitable for acquiring corresponding data according to the read-write disk task in the access request to the appointed database when the task number of the task queue reaches the task processing upper limit value.
The apparatus of B12, wherein,
the determining unit is suitable for determining the upper limit value of task processing according to the size of the task, the disk performance, the number of disks and the number of task threads.
B15, the device of B14, wherein the task processing upper limit value comprises a writing disk task number upper limit value and a reading disk task number upper limit value;
the ratio of the upper limit value of the task number of the writing magnetic disk to the upper limit value of the task number of the reading magnetic disk is determined according to the hit rate of the magnetic disk.
B16, the apparatus of B15, wherein the hit rate is 1:m, and the determining unit is adapted to determine an upper limit value of the number of tasks to write to the disk according to a formula (V/S) ×dn/Tn; and determining an upper limit value of the task number of the magnetic disk according to a formula m (V/S) Dn/Tn;
wherein V represents disk performance; s represents the size of the task; dn represents the number of disks; tn represents the number of task threads.
B17, the apparatus of B12, wherein the apparatus further comprises:
the starting unit is suitable for starting one or more task threads for processing the read-write disk tasks;
the processing unit is suitable for carrying out corresponding processing according to the read-write disk task in the task queue by utilizing the task thread; and receiving a notification sent by the task thread when the read-write disk task is processed.
B18, the apparatus of B17, wherein the apparatus further comprises:
and the judging unit is suitable for judging whether the number of the access requests reaches the preset access amount, and if so, the starting unit further executes the step of starting one or more task threads for processing the read-write disk task.
B19, the device as in B17, wherein, the said opening unit, is suitable for opening a task thread used for processing the task of reading and writing the magnetic disk; and when the number of the read-write disk tasks in the received access request is greater than or equal to the preset task number, starting one or more task threads for processing the read-write disk tasks.
B20, the apparatus of B19, wherein the apparatus further comprises:
and the closing unit is suitable for closing the task thread which is opened later when the number of the read-write disk tasks in the received access request is smaller than the preset task number.
B21, the apparatus of B17, wherein the apparatus further comprises:
the building unit is suitable for building a corresponding relation with one or more opened task threads;
the processing unit is suitable for carrying out corresponding processing according to the read-write disk task in the task queue by utilizing the task thread with the corresponding relation.
B22, the apparatus of B17, wherein the apparatus further comprises:
the establishing unit is suitable for establishing corresponding relations between one or more started task threads and each magnetic disk respectively;
the processing unit is suitable for judging a disk to be read and written corresponding to the disk read and write task in the task queue; determining a task thread corresponding to the disk to be read and written; and carrying out corresponding processing according to the corresponding disk reading and writing task in the task queue by utilizing the task thread corresponding to the disk to be read and written.
The invention also discloses C23 and electronic equipment, wherein the electronic equipment comprises:
a processor; the method comprises the steps of,
A memory arranged to store computer executable instructions which, when executed, cause the processor to perform the method according to any one of A1 to a 11.
The invention also discloses D24, a computer readable storage medium, wherein the computer readable storage medium stores one or more programs, which when executed by a processor, implement the method of any one of A1-A11.

Claims (24)

1. A processing method of read-write disk task, wherein, the method includes:
determining a task processing upper limit value of a read-write disk task;
creating a task queue according to the determined upper limit value of task processing; the task number which can be accommodated by the task queue is consistent with the task processing upper limit value;
transmitting the read-write disk task in the access request to a corresponding task queue;
and performing corresponding processing according to the read-write disk tasks in the task queue.
2. The method of claim 1, wherein the method further comprises:
when the task number of the task queue reaches the upper limit value of task processing, corresponding data are acquired from the read-write disk task in the access request to the appointed database.
3. The method of claim 1, wherein the determining a task processing upper limit for the read-write disk task comprises:
and determining the upper limit value of task processing according to the size, the disk performance, the number of disks and the number of task threads.
4. The method of claim 3, wherein the task processing upper limit includes a write disk task number upper limit and a read disk task number upper limit;
the ratio of the upper limit value of the task number of the writing magnetic disk to the upper limit value of the task number of the reading magnetic disk is determined according to the hit rate of the magnetic disk.
5. The method of claim 4, wherein the hit rate is 1:m, and wherein determining the task processing upper limit based on the size of the task, the disk performance, the number of disks, and the number of task threads comprises:
determining the upper limit value of the task number of the writing disk according to a formula (V/S) Dn/Tn;
the method comprises the steps of,
determining the upper limit value of the task number of the magnetic disk according to a formula m (V/S) Dn/Tn;
wherein V represents disk performance; s represents the size of the task; dn represents the number of disks; tn represents the number of task threads.
6. The method of claim 1, wherein the method further comprises:
starting one or more task threads for processing the read-write disk tasks;
The corresponding processing according to the read-write disk task in the task queue comprises the following steps:
performing corresponding processing according to the read-write disk task in the task queue by utilizing the task thread; and receiving a notification sent by the task thread when the read-write disk task is processed.
7. The method of claim 6, wherein the method further comprises:
judging whether the number of the access requests reaches a preset access amount, and if so, executing the step of starting one or more task threads for processing the read-write disk task.
8. The method of claim 6, wherein the opening one or more task threads for processing read-write disk tasks comprises:
starting a task thread for processing the read-write disk task;
and when the number of the read-write disk tasks in the received access request is greater than or equal to the preset task number, starting one or more task threads for processing the read-write disk tasks.
9. The method of claim 8, wherein the method further comprises:
and when the number of the read-write disk tasks in the received access request is smaller than the preset task amount, closing the task thread which is opened later.
10. The method of claim 6, wherein the method further comprises:
establishing a corresponding relation between a task thread for processing a network task in an access request and one or more opened task threads;
the corresponding processing by the task thread according to the read-write disk task in the task queue comprises the following steps:
and performing corresponding processing according to the read-write disk task in the task queue by using the task thread with the corresponding relation.
11. The method of claim 6, wherein the method further comprises:
establishing corresponding relations between one or more started task threads and each disk respectively;
the corresponding processing by the task thread according to the read-write disk task in the task queue comprises the following steps:
judging a disk to be read and written corresponding to the disk reading and writing task in the task queue;
determining a task thread corresponding to the disk to be read and written;
and carrying out corresponding processing according to the corresponding disk reading and writing task in the task queue by utilizing the task thread corresponding to the disk to be read and written.
12. A processing apparatus for reading and writing disk tasks, wherein the apparatus comprises:
the determining unit is suitable for determining a task processing upper limit value of a read-write disk task;
A creating unit adapted to create a task queue according to the determined task processing upper limit value; the task number which can be accommodated by the task queue is consistent with the task processing upper limit value;
the sending unit is suitable for sending the read-write disk task in the access request to the corresponding task queue;
and the processing unit is suitable for carrying out corresponding processing according to the read-write disk tasks in the task queue.
13. The apparatus of claim 12, wherein,
and the processing unit is suitable for acquiring corresponding data according to the read-write disk task in the access request to the appointed database when the task number of the task queue reaches the task processing upper limit value.
14. The apparatus of claim 12, wherein,
the determining unit is suitable for determining the upper limit value of task processing according to the size of the task, the disk performance, the number of disks and the number of task threads.
15. The apparatus of claim 14, wherein the task processing upper limit includes a write disk task number upper limit and a read disk task number upper limit;
the ratio of the upper limit value of the task number of the writing magnetic disk to the upper limit value of the task number of the reading magnetic disk is determined according to the hit rate of the magnetic disk.
16. The apparatus of claim 15, wherein the hit rate is 1:m, and the determining unit is adapted to determine an upper limit value of the number of tasks to write to the disk according to formula (V/S) ×dn/Tn; and determining an upper limit value of the task number of the magnetic disk according to a formula m (V/S) Dn/Tn;
Wherein V represents disk performance; s represents the size of the task; dn represents the number of disks; tn represents the number of task threads.
17. The apparatus of claim 12, wherein the apparatus further comprises:
the starting unit is suitable for starting one or more task threads for processing the read-write disk tasks;
the processing unit is suitable for carrying out corresponding processing according to the read-write disk task in the task queue by utilizing the task thread; and receiving a notification sent by the task thread when the read-write disk task is processed.
18. The apparatus of claim 17, wherein the apparatus further comprises:
and the judging unit is suitable for judging whether the number of the access requests reaches the preset access amount, and if so, the starting unit further executes the step of starting one or more task threads for processing the read-write disk task.
19. The apparatus of claim 17, wherein the opening unit is adapted to open a task thread for processing a read-write disk task; and when the number of the read-write disk tasks in the received access request is greater than or equal to the preset task number, starting one or more task threads for processing the read-write disk tasks.
20. The apparatus of claim 19, wherein the apparatus further comprises:
and the closing unit is suitable for closing the task thread which is opened later when the number of the read-write disk tasks in the received access request is smaller than the preset task number.
21. The apparatus of claim 17, wherein the apparatus further comprises:
the establishing unit is suitable for establishing a corresponding relation between a task thread for processing the network task in the access request and one or more opened task threads;
the processing unit is suitable for carrying out corresponding processing according to the read-write disk task in the task queue by utilizing the task thread with the corresponding relation.
22. The apparatus of claim 17, wherein the apparatus further comprises:
the establishing unit is suitable for establishing corresponding relations between one or more started task threads and each magnetic disk respectively;
the processing unit is suitable for judging a disk to be read and written corresponding to the disk read and write task in the task queue; determining a task thread corresponding to the disk to be read and written; and carrying out corresponding processing according to the corresponding disk reading and writing task in the task queue by utilizing the task thread corresponding to the disk to be read and written.
23. An electronic device, wherein the electronic device comprises:
a processor; the method comprises the steps of,
a memory arranged to store computer executable instructions which, when executed, cause the processor to perform the method according to any one of claims 1 to 11.
24. A computer readable storage medium, wherein the computer readable storage medium stores one or more programs which, when executed by a processor, implement the method of any of claims 1-11.
CN201811602446.6A 2018-12-26 2018-12-26 Method and device for processing read-write disk task Active CN111367627B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811602446.6A CN111367627B (en) 2018-12-26 2018-12-26 Method and device for processing read-write disk task

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811602446.6A CN111367627B (en) 2018-12-26 2018-12-26 Method and device for processing read-write disk task

Publications (2)

Publication Number Publication Date
CN111367627A CN111367627A (en) 2020-07-03
CN111367627B true CN111367627B (en) 2024-02-13

Family

ID=71208486

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811602446.6A Active CN111367627B (en) 2018-12-26 2018-12-26 Method and device for processing read-write disk task

Country Status (1)

Country Link
CN (1) CN111367627B (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101650669A (en) * 2008-08-14 2010-02-17 英业达股份有限公司 Method for executing disk read-write under multi-thread
CN102279714A (en) * 2011-08-26 2011-12-14 上海文广科技(集团)有限公司 Method and device for controlling input/output (IO) requests
JP2012048590A (en) * 2010-08-27 2012-03-08 Oki Electric Ind Co Ltd Operation concentration system
CN103605568A (en) * 2013-10-29 2014-02-26 北京奇虎科技有限公司 Multithread management method and device
CN105389135A (en) * 2015-12-11 2016-03-09 华中科技大学 Solid-state disk internal cache management method
CN105389208A (en) * 2015-11-10 2016-03-09 中国建设银行股份有限公司 Job processing method and apparatus
CN105843559A (en) * 2016-03-28 2016-08-10 乐视控股(北京)有限公司 Read-write optimization method and system of disk cache system
CN107368362A (en) * 2017-06-29 2017-11-21 上海阅文信息技术有限公司 A kind of multithreading/multi-process for disk read-write data is without lock processing method and system
CN107818012A (en) * 2016-09-12 2018-03-20 阿里巴巴集团控股有限公司 A kind of data processing method, device and electronic equipment
CN108008911A (en) * 2016-11-01 2018-05-08 阿里巴巴集团控股有限公司 Read-write requests processing method and processing device
CN108121601A (en) * 2017-11-08 2018-06-05 上海格蒂电力科技有限公司 A kind of application resource dispatching device and method based on weight
CN109086132A (en) * 2018-06-26 2018-12-25 深圳市买买提信息科技有限公司 A kind of recognition of face task balance call method, device and terminal device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7194589B2 (en) * 2003-08-22 2007-03-20 Oracle International Corporation Reducing disk IO by full-cache write-merging

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101650669A (en) * 2008-08-14 2010-02-17 英业达股份有限公司 Method for executing disk read-write under multi-thread
JP2012048590A (en) * 2010-08-27 2012-03-08 Oki Electric Ind Co Ltd Operation concentration system
CN102279714A (en) * 2011-08-26 2011-12-14 上海文广科技(集团)有限公司 Method and device for controlling input/output (IO) requests
CN103605568A (en) * 2013-10-29 2014-02-26 北京奇虎科技有限公司 Multithread management method and device
CN105389208A (en) * 2015-11-10 2016-03-09 中国建设银行股份有限公司 Job processing method and apparatus
CN105389135A (en) * 2015-12-11 2016-03-09 华中科技大学 Solid-state disk internal cache management method
CN105843559A (en) * 2016-03-28 2016-08-10 乐视控股(北京)有限公司 Read-write optimization method and system of disk cache system
CN107818012A (en) * 2016-09-12 2018-03-20 阿里巴巴集团控股有限公司 A kind of data processing method, device and electronic equipment
CN108008911A (en) * 2016-11-01 2018-05-08 阿里巴巴集团控股有限公司 Read-write requests processing method and processing device
CN107368362A (en) * 2017-06-29 2017-11-21 上海阅文信息技术有限公司 A kind of multithreading/multi-process for disk read-write data is without lock processing method and system
CN108121601A (en) * 2017-11-08 2018-06-05 上海格蒂电力科技有限公司 A kind of application resource dispatching device and method based on weight
CN109086132A (en) * 2018-06-26 2018-12-25 深圳市买买提信息科技有限公司 A kind of recognition of face task balance call method, device and terminal device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Qingsong Wei 等.A Novel Disk Queue to Reduce Disk I/O of Messaging System .《Operating systems review 》.2003,第55-60页. *
方旺盛 等.基于多线程技术的磁盘调度仿真.《兵工自动化》.2005,第98-99+101页. *

Also Published As

Publication number Publication date
CN111367627A (en) 2020-07-03

Similar Documents

Publication Publication Date Title
US7949855B1 (en) Scheduler in multi-threaded processor prioritizing instructions passing qualification rule
US11016695B2 (en) Methods and apparatus to perform memory copy operations
WO2022105435A1 (en) Game resource data processing method and device
EP2842041B1 (en) Data processing system and method for operating a data processing system
JP2008515069A5 (en)
CN110007978A (en) A kind of method, device and equipment preloading the page
US9569364B1 (en) Multiple history based micro partition prefetch optimization
CN108292162A (en) Software definition fifo buffer for multi-thread access
US10642740B2 (en) Methods for performing a memory resource retry
CN108769157B (en) Message popup display method and device, computing equipment and computer storage medium
CN111324330A (en) Electronic book playing processing method, computing device and computer storage medium
JP2008529181A5 (en)
CN111736933A (en) Popup window display method and device and readable storage medium
CN109710578B (en) Log recording method and system
US8055806B2 (en) Autonomic threading model switch based on input/output request type
US8751724B2 (en) Dynamic memory reconfiguration to delay performance overhead
EP3991097A1 (en) Managing workloads of a deep neural network processor
CN110750744A (en) Page presentation method and device
CN111367627B (en) Method and device for processing read-write disk task
CN109408265A (en) A kind of guard method, device, terminal device and storage medium that IOS is operating abnormally
TWI724034B (en) Exception handling
CN108763421B (en) Data searching method and system based on logic circuit
CN107038021B (en) For accessing the methods, devices and systems of random access memory ram
US8205064B2 (en) Latency hiding for a memory management unit page table lookup
CN109491785A (en) Internal storage access dispatching method, device and equipment

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20240118

Address after: 300450 No. 9-3-401, No. 39, Gaoxin 6th Road, Binhai Science Park, Binhai New Area, Tianjin

Applicant after: 3600 Technology Group Co.,Ltd.

Address before: 100088 room 112, block D, 28 new street, new street, Xicheng District, Beijing (Desheng Park)

Applicant before: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant