Data reading/writing method, system and device, and computer readable storage medium

A technology for data reading and writing and storage media, applied in the computer field, can solve the problems of unbalanced and limited resource control ability, and access to blkcg information, etc., to achieve good resource control ability, eliminate application restrictions, and reduce mutual effects.

CN108509288AActive Publication Date: 2018-09-07HANGZHOU SHIQU INFORMATION TECH CO LTD
2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Publication Date
2018-09-07

Smart Images

  • Figure 1
    Figure 1
  • Figure 2
    Figure 2
  • Figure 3
    Figure 3
Patent Text Reader

Abstract

The invention provides a data reading / writing method, system and device, and a computer readable storage medium. The method comprises the steps of pre-creating a mapping relationship between an identifier of memcg and an identifier of blkcg; in a data write-back process, obtaining the identifier of the memcg according to an index node of a dirty page; according to the identifier of the memcg, creating a write-back structure; according to the write-back structure and the mapping relationship, obtaining blkcg speed limitation information; and according to the blkcg speed limitation information,performing IO operation on data write-back. In the way, different processes have higher equity degree in IO use; mutual influence among the processes is reduced; especially for IO intensive applications and low-speed disks, a better resource control capability is achieved; realization is easy; corresponding speed limitation policies can be set without modifying an interface of any application layer; and application limitation of CGroups is eliminated, so that the IO speed limitation application of the CGroups is expanded.
Need to check novelty before this filing date? Find Prior Art

Description

technical field

[0001] The present application relates to the field of computer technology, in particular to a method, system, device and computer-readable storage medium for reading and writing data. Background technique

[0002] In computers such as Linux systems, IO operations on files, such as read operations and / or write operations, are often involved. Among them, the data is first written to the memory (Page Cache) for caching, and then written back to the disk The way to improve IO performance is buffered IO (buffered IO). Currently, buffered IO is used. Because most applications are read and write operations, when the same storage device is shared by multiple processes, there will be mutual influence, and even a large amount of IO generated by a certain process will cause other processes to block for a long time. For this kind of problem, IO speed limit operation is usually performed.

[0003] An existing IO speed limit method is to use CGroups V2 (Control Groups, ...

Examples

Embodiment Construction

[0038] The core of this application is to provide a method for reading and writing data. This application can achieve better resource control capabilities, and can set the corresponding speed limit strategy without modifying any application layer interface, eliminating the application restrictions of CGroups, thereby Expanded the IO speed limit application of CGroups. Another core of the present application is to provide a data reading and writing system, device and computer-readable storage medium, all of which have the above beneficial effects.

[0039] In order to make the purposes, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments It is a part of the embodiments of this application, not all of them. Bas...