WO2011147073A1 - 分布式文件***中的数据处理方法和装置 - Google Patents

分布式文件***中的数据处理方法和装置 Download PDF

Info

Publication number
WO2011147073A1
WO2011147073A1 PCT/CN2010/073161 CN2010073161W WO2011147073A1 WO 2011147073 A1 WO2011147073 A1 WO 2011147073A1 CN 2010073161 W CN2010073161 W CN 2010073161W WO 2011147073 A1 WO2011147073 A1 WO 2011147073A1
Authority
WO
WIPO (PCT)
Prior art keywords
cache
file system
distributed file
application
interface
Prior art date
Application number
PCT/CN2010/073161
Other languages
English (en)
French (fr)
Inventor
夏舰波
彭杰
张波
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Priority to PCT/CN2010/073161 priority Critical patent/WO2011147073A1/zh
Publication of WO2011147073A1 publication Critical patent/WO2011147073A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/172Caching, prefetching or hoarding of files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/182Distributed file systems

Definitions

  • the present invention relates to data processing technologies, and in particular, to a data processing method and apparatus in a distributed file system. Background technique
  • Distributed file systems are widely used in business applications such as IPTV and streaming media servers.
  • the main business is to provide users with on-demand services for media files; therefore, in such a file system, the read interface is called very frequently.
  • the caller is required to provide a buffer to store the data and copy the read data into the buffer provided by the caller.
  • a large number of memory copy operations will consume a lot of CPU resources, which will significantly improve CPU utilization. Since each module and media service program of the distributed file system requires more CPU resources to run, when the CPU utilization is high, The stability of distributed file systems can be significantly reduced. Summary of the invention
  • a primary object of the present invention is to provide a data processing method and apparatus in a distributed file system to reduce CPU utilization in a distributed file system.
  • a data processing method in a distributed file system comprising:
  • a cache is allocated to the application in the distributed file system, and the application uses the cache allocated by the distributed file system for data processing.
  • the process of allocating a cache for an application in a distributed file system includes:
  • the cache allocation interface allocates cache blocks in the cache block area available to the application process based on the call of the application process.
  • the cache allocation interface further returns the cached allocation result to the application process.
  • the application uses the cache allocated by the distributed file system, and the process of data processing includes:
  • the application process belonging to the application calls the read operation interface in the distributed file system, and the read operation interface submits the read request to the file access agent process in the distributed file system according to the call, and is received by the file access agent process according to the file access agent process.
  • the read request receives the data and is stored in the cache block allocated for the application process.
  • the method further includes:
  • the read operation interface determines whether the application uses the allocated address of the cache block, and if so, the read operation interface directly submits the read request and carries the allocated cache block address in the read request; The read operation interface actively allocates a new cache block to the application process in the distributed file system, and then submits the read request and carries the allocated cache block address in the read request.
  • the method further includes:
  • the application process invokes a cache release interface preset in the distributed file system to release the corresponding cache block in the distributed file system.
  • a data processing device in a distributed file system comprising a cache allocation interface, a read operation interface, and a file access agent process;
  • the cache allocation interface is configured to implement cache allocation for an application in a distributed file system
  • the read operation interface is configured to trigger the file access proxy process according to control of an application;
  • the file accessing agent process is configured to perform data processing by using the cache allocated by the application in the distributed file system according to the triggering of the read operation interface.
  • the cache allocation interface is preset in a dynamic link library of the distributed file system, and the cache block implemented after the cache allocation is set in the shared memory of the distributed file system.
  • the apparatus further includes a cache release interface for releasing a corresponding cache block in the distributed file system that performs data processing in accordance with the call by the application.
  • the file access proxy process includes a read request processing module and a data receiving module.
  • the read request processing module is configured to receive a read request generated by triggering of the read operation interface, and send the read request to the data receiving module. ;
  • the data receiving module is configured to perform data processing by using a cache allocated for an application in a distributed file system according to the received read request.
  • the data processing technology in the distributed file system of the invention can reduce the memory copying process of the read operation interface, thereby effectively reducing the CPU utilization during the large data volume reading operation, and ensuring the stability of the distributed file system. . DRAWINGS
  • FIG. 1 is a diagram of a data processing apparatus in a distributed file system according to an embodiment of the present invention
  • FIG. 2 is a flowchart of data processing in a distributed file system according to an embodiment of the present invention
  • Data processing flow chart. DETAILED DESCRIPTION
  • a cache allocation interface can be added to a distributed file system for an application. Before the application calls the read operation interface, the cache allocation interface is called to allocate a cache for the application in the distributed file system; and the cached address allocated for the application is brought into the distributed file system when the read operation interface is called.
  • the cache can be allocated for the application in the distributed file system, and the data in the distributed file system does not need to be copied into the memory of the application, thereby reducing memory to the application once.
  • the process of copying For the services that require a large amount of data reading, the above operation mode can effectively reduce the CPU utilization.
  • FIG. 1 is a diagram of a data processing apparatus in a distributed file system according to an embodiment of the present invention.
  • an application process belonging to an application can control the logical interface in the distributed file system for corresponding data processing.
  • the data processing is usually performed on shared memory in a distributed file system, and the execution subject is usually a distributed file.
  • File access agent process in the system is usually performed on shared memory in a distributed file system.
  • caching is a very important part, which can effectively improve the speed and efficiency of reading and writing.
  • the cache hit rate is not too high, so a portion of the cache can be sacrificed for the application to read the data.
  • the file system's cache consists of a number of cache blocks, which are usually fixed in size.
  • a cache block is the basic unit of data read and write. Whether you are reading data from a local disk or from a network, you need to pre-allocate the cache block to hold the data.
  • the corresponding allocation interface and cache release interface can be added to the file system interface; and the cache block is allocated for the allocated cache block. Marked, another distributed file system does not use these cache blocks for data caching, but is used entirely by the application.
  • the application To use a read operation interface that reduces the number of memory copies, the application must first call the cache allocation interface in the distributed file system to allocate the cache.
  • the specific calling method is the same as that of POSIX.
  • the cache block can be released and managed by the distributed file system.
  • the distributed file system needs to use a shared memory cache so that the same memory address can be used between the application and the distributed file system.
  • shared memory is in a distributed file It is allocated when the system is initialized and loaded when the application calls the file system interface.
  • the distributed file system can provide an interface to the application process in the form of a dynamic link library, and exchange requests and data in a shared memory manner between the dynamic link library and the file access agent process, the distributed file system
  • the cache is also allocated in shared memory.
  • a set of interfaces for allocating and releasing distributed file system cache blocks can be added to the dynamic link library.
  • the application process can allocate a cache of data to be stored through the cache allocation interface, and bring the cached address into the read request interface.
  • the file access agent process can then copy the data into the cache block above so that the application process can use the data in the cache block.
  • the application process can call the cache allocation interface in the dynamic link library to implement the cache block allocation request, and the cache allocation interface allocates in the cache block area applicable to the application process according to the application process call. Cache the block and return the result of the success or failure to the application process.
  • the application process can then make a call to the read operation interface in the dynamic link library to commit the read request. It should be noted that if the foregoing operation of allocating a cache for an application process in a distributed file system has succeeded, the allocated cache block address can be brought in when the read operation interface is called.
  • the read operation interface can determine the call of the application process to determine whether the application uses the allocated cache block address. If used, the read operation interface can directly submit the read request to the read request queue in the shared memory. Enter the allocated cache block address; otherwise, the read operation interface can actively allocate new cache blocks to the application process in the distributed file system, and then commit the read request to the read request queue in the shared memory and bring in the allocated cache. Block address.
  • the read request processing module in the file access proxy process extracts the read request from the read request queue, and sends the read request to the data receiving module, and the data receiving module according to the file name and offset included in the received read request. Receive data and store the received data for the application The cache block allocated by the sequence process.
  • the data receiving module determines that the read request processing is completed, and sends a notification to the read operation interface; when the read operation interface receives the notification from the data receiving module, notifies the application process that the read operation has been completed.
  • the application process can call the cache release interface to release the cache block that completes the read operation; the cache release interface releases the corresponding cache block in the shared memory according to the call of the application process, and notifies the release result such as success or failure. Give the application process.
  • FIG. 2 is a flowchart of data processing in a distributed file system according to an embodiment of the present invention.
  • the process includes the following steps: Step 201: An application process invokes a cache allocation interface in a dynamic link library to implement The initiation of a cache block allocation request.
  • Step 202 The cache allocation interface in the dynamic link library allocates a cache block in a cache block area available for the application process according to the call of the application process.
  • Step 203 The cache allocation interface in the dynamic link library returns the successful or failed allocation result to the application process.
  • Step 204 The application process invokes a read operation interface in the dynamic link library to implement the commit of the read request.
  • the allocated cache block address can be brought in when the read operation interface is called.
  • Step 205 The read operation interface in the dynamic link library determines the call of the application process to determine whether the application uses the allocated cache block address, and if so, proceeds to step 207; otherwise, proceeds to step 206.
  • Step 206 The read operation interface in the dynamic link library actively allocates a new cache block to the application process in the distributed file system.
  • Step 207 The read operation interface in the dynamic link library submits the read request to the read request queue in the shared memory, and brings in the allocated cache block address.
  • Step 209 The data receiving module in the file accessing agent process receives data according to information such as a file name and an offset included in the received read request, and stores the received data in the cache block allocated for the application process. in.
  • Step 210 The data receiving module in the file accessing agent process determines that the read request processing is completed, and sends a notification to the read operation interface.
  • Step 211 When the read operation interface in the dynamic link library receives the notification from the data receiving module, it notifies the application process that the read operation has been completed.
  • Step 212 When it is no longer necessary to retain data in the cache block that completes the read operation, the application process calls the cache release interface in the dynamic link library to release the cache block that completed the read operation.
  • Step 213 The cache release interface in the dynamic link library releases the corresponding cache block in the shared memory according to the call of the application process, and notifies the application process of the release result such as success or failure.
  • the address of the stored data that is brought in is the pre-allocated cache block address; when the distributed file system performs the actual data read operation, The cache block address is used for data processing.
  • the cache block allocated for the application in the distributed file system is not cached by the distributed file system, but is directly used by the application to ensure that the application can be directly used after completing the read interface call.
  • the data in the cache block address is not cached by the distributed file system, but is directly used by the application to ensure that the application can be directly used after completing the read interface call.
  • FIG. 3 is a flowchart of a data processing flow in a distributed file system according to the present invention, and the process includes the following steps:
  • Step 310 Allocate a cache for the application in the distributed file system.
  • Step 320 The application uses the cache allocated by the distributed file system for data processing.
  • the method and the device are in the distributed file system of the present invention.
  • the data processing technology can reduce the memory copying process of the read operation interface, thereby effectively reducing the CPU utilization during the large data volume reading operation, and ensuring the stability of the distributed file system.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Description

分布式文件***中的数据处理方法和装置 技术领域
本发明涉及数据处理技术, 具体涉及一种分布式文件***中的数据处 理方法和装置。 背景技术
分布式文件***广泛应用于 IPTV、 流媒体服务器等业务场合。 主要业 务是提供用户对媒体文件的点播服务; 因此在这样的文件***中, 读接口 的调用会非常频繁。 在调用读接口进行读操作时, 需要调用者提供存储数 据的緩冲区, 并将读取的数据拷贝到调用者提供的緩冲区中。 而大量的内 存拷贝操作会占用很多 CPU资源,进而显著提高 CPU利用率; 由于分布式 文件***的各个模块和媒体服务程序都需要较多的 CPU资源才能运行, 因 此当 CPU利用率较高时, 分布式文件***的稳定性会明显降低。 发明内容
本发明的主要目的在于提供一种分布式文件***中的数据处理方法和 装置, 以降低分布式文件***中的 CPU利用率。
为了达到上述的目的, 本发明的技术方案是这样实现的:
一种分布式文件***中的数据处理方法, 该方法包括:
在分布式文件***中为应用程序分配緩存, 所述应用程序使用分布式 文件***所分配的緩存, 进行数据处理。
为应用程序在分布式文件***中设置緩存分配接口;
所述在分布式文件***中为应用程序分配緩存的过程包括:
属于应用程序的应用程序进程对分布式文件***中的緩存分配接口进 行调用;
緩存分配接口根据应用程序进程的调用, 在可用于应用程序进程的緩 存块区域分配緩存块。
所述緩存分配接口进一步将緩存的分配结果返回给应用程序进程。 所述应用程序使用分布式文件***所分配的緩存, 进行数据处理的过 程包括:
属于应用程序的应用程序进程对分布式文件***中的读操作接口进行 调用, 读操作接口根据所述调用提交读请求到分布式文件***中的文件访 问代理进程, 由文件访问代理进程根据收到的读请求接收数据, 并存储于 为应用程序进程所分配的所述緩存块中。
提交所述读请求之前, 该方法进一步包括:
所述读操作接口判断应用程序是否使用了所分配的所述緩存块的地 址, 如果使用, 则读操作接口直接提交所述读请求, 并在该读请求中携带 所分配的緩存块地址; 否则, 读操作接口在分布式文件***中主动为所述 应用程序进程分配新的緩存块, 之后再提交所述读请求并在该读请求中携 带所分配的緩存块地址。
该方法进一步包括:
针对完成读操作的緩存块, 所述应用程序进程调用分布式文件***中 预设的緩存释放接口, 释放分布式文件***中的相应緩存块。
一种分布式文件***中的数据处理装置, 该装置包括緩存分配接口、 读操作接口、 文件访问代理进程; 其中,
所述緩存分配接口, 用于实现在分布式文件***中为应用程序进行的 緩存分配;
所述读操作接口, 用于根据应用程序的控制触发所述文件访问代理进 程; 所述文件访问代理进程, 用于根据所述读操作接口的触发, 使用分布 式文件***中为应用程序所分配的所述緩存进行数据处理。
所述緩存分配接口预先设置于分布式文件***的动态链接库中, 进行緩存分配后所实现的緩存块设置于分布式文件***的共享内存 中。
该装置进一步包括緩存释放接口, 用于根据所述应用程序的调用, 释 放分布式文件***中完成数据处理的相应緩存块。
所述文件访问代理进程包括读请求处理模块、 数据接收模块; 其中, 所述读请求处理模块, 用于接收因所述读操作接口的触发而产生的读 请求, 并发送给所述数据接收模块;
所述数据接收模块, 用于根据收到的读请求, 使用分布式文件***中 为应用程序所分配的緩存进行数据处理。
本发明的分布式文件***中的数据处理技术, 能够使读操作接口减少 一次内存拷贝过程, 从而在进行大数据量读取操作时有效降低 CPU的利用 率, 能够保证分布式文件***的稳定性。 附图说明
图 1为本发明一实施例的分布式文件***中的数据处理装置图; 图 2为本发明一实施例的分布式文件***中的数据处理流程图; 图 3为本发明分布式文件***中的数据处理流程筒图。 具体实施方式 为了达到降低 CPU利用率的目的, 可以专门为应用程序在分布式文件 ***中增加緩存分配接口。 应用程序调用读操作接口之前, 先调用该緩存 分配接口以便在分布式文件***中为应用程序分配緩存; 并在调用读操作 接口时将为应用程序分配的緩存的地址带入分布式文件***, 使后续的数 据读取等数据处理能够针对分布式文件***中为应用程序分配的所述緩存 进行, 而无须再将分布式文件***中的数据拷贝到应用程序的内存中, 因 此减少一次向应用程序进行内存拷贝的过程。 针对需要进行大量数据读取 的业务, 上述操作方式能够有效降低 CPU利用率。
参见图 1 ,图 1为本发明一实施例的分布式文件***中的数据处理装置 图。 图 1 中, 属于应用程序的应用程序进程能够控制分布式文件***中的 逻辑接口进行相应的数据处理, 该数据处理通常针对分布式文件***中的 共享内存执行, 执行主体则通常是分布式文件***中的文件访问代理进程。
总体而言, 在文件***中, 緩存是非常重要的部分, 可有效提高读写 的速度和效率。 但对于数据量较大的读操作来说, 其緩存命中率并不是太 高, 因此可以牺牲一部分緩存用于应用程序对数据的读取。
文件***的緩存由一定数量的緩存块组成, 緩存块的大小通常是固定 的。 在分布式文件***中, 緩存块是数据读写的基本单位。 无论从本地磁 盘还是从网络上读取数据, 都需要预先分配緩存块以存放数据。
为了保证应用程序不再将数据读入自身的内存而是直接使用分布式文 件***中的緩存块, 可以在文件***接口中增加相应的分配接口和緩存释 放接口; 并为被分配的緩存块做标记, 另分布式文件***不使用这些緩存 块进行数据緩存, 而完全由应用程序使用。 应用程序如需使用能够减少一 次内存拷贝的读操作接口, 则必须先调用分布式文件***中的緩存分配接 口以分配緩存, 具体的调用方式与 POSIX的调用方式一致。
再有, 当应用程序不再需要緩存块里的数据时, 即可将该緩存块释放, 并交由分布式文件***进行管理。
另外, 由于应用程序和分布式文件***的接口模块并不在一个进程中, 因此分布式文件***需采用共享内存方式的緩存, 这样才能在应用程序和 分布式文件***之间使用相同的内存地址。 通常, 共享内存在分布式文件 ***初始化时分配, 并在应用程序调用文件***接口时进行加载。
由图 1 可见, 分布式文件***可以以动态链接库的方式提供接口给应 用程序进程, 并在动态链接库和文件访问代理进程之间以共享内存的方式 交互请求和数据, 分布式文件***的緩存也在共享内存中分配。 并且, 为 实现能够减少一次内存拷贝的读操作, 可以在动态链接库中增加一组对分 布式文件***緩存块进行分配和释放的接口。 这样, 应用程序进程就可以 通过緩存分配接口分配得到存放数据的緩存, 并将该緩存的地址带入读请 求接口。 之后, 文件访问代理进程可以将数据拷贝到上述緩存块中, 使得 应用程序进程可以使用该緩存块中的数据。
具体而言, 应用程序进程可以对动态链接库中的緩存分配接口进行调 用, 以实现緩存块分配请求的发起, 緩存分配接口则根据应用程序进程的 调用在可用于应用程序进程的緩存块区域分配緩存块, 并将成功或失败的 分配结果返回给应用程序进程。
之后, 应用程序进程可以对动态链接库中的读操作接口进行调用, 以 实现读请求的提交。 需要说明的是, 如果前述的在分布式文件***中为应 用程序进程分配緩存的操作已成功, 则可以在调用读操作接口时带入所分 配的緩存块地址。 读操作接口能够对应用程序进程的调用进行判断, 以确 定应用程序是否使用了所分配的緩存块地址, 如果使用了, 读操作接口可 以直接提交读请求到共享内存中的读请求队列, 并带入所分配的緩存块地 址; 否则, 读操作接口可以在分布式文件***中主动为应用程序进程分配 新的緩存块, 之后再提交读请求到共享内存中的读请求队列, 并带入所分 配的緩存块地址。
文件访问代理进程中的读请求处理模块从读请求队列中取出读请求, 并将该读请求发送给数据接收模块, 由数据接收模块根据收到的读请求中 所包含的文件名和偏移等信息接收数据, 并将收到的数据存储于为应用程 序进程所分配的所述緩存块中。 当完成上述操作后, 数据接收模块确定完 成了读请求处理, 并向读操作接口发送通知; 读操作接口收到来自数据接 收模块的通知时, 通知应用程序进程读操作已完成。
接下来, 应用程序进程可以调用緩存释放接口, 以释放完成读操作的 緩存块; 緩存释放接口则根据应用程序进程的调用, 释放共享内存中的相 应緩存块, 并将成功或失败等释放结果通知给应用程序进程。
图 1所示装置可以完成如图 2所示的操作。 参见图 2, 图 2为本发明一 实施例的分布式文件***中的数据处理流程图, 该流程包括以下步骤: 步骤 201 : 应用程序进程对动态链接库中的緩存分配接口进行调用, 以 实现緩存块分配请求的发起。
步骤 202: 动态链接库中的緩存分配接口根据应用程序进程的调用, 在 可用于应用程序进程的緩存块区域分配緩存块。
步骤 203:动态链接库中的緩存分配接口将成功或失败的分配结果返回 给应用程序进程。
步骤 204: 应用程序进程对动态链接库中的读操作接口进行调用, 以实 现读请求的提交。
需要说明的是, 如果前述的在分布式文件***中为应用程序进程分配 緩存的操作已成功, 则可以在调用读操作接口时带入所分配的緩存块地址。
步骤 205: 动态链接库中的读操作接口对应用程序进程的调用进行判 断, 以确定应用程序是否使用了所分配的緩存块地址, 如果使用了, 进入 步骤 207; 否则, 进入步骤 206。
步骤 206:动态链接库中的读操作接口在分布式文件***中主动为应用 程序进程分配新的緩存块。
步骤 207:动态链接库中的读操作接口提交读请求到共享内存中的读请 求队列, 并带入所分配的緩存块地址。 步骤 208:文件访问代理进程中的读请求处理模块从读请求队列中取出 读请求, 并将该读请求发送给文件访问代理进程中的数据接收模块。
步骤 209:文件访问代理进程中的数据接收模块根据收到的读请求中所 包含的文件名和偏移等信息接收数据, 并将收到的数据存储于为应用程序 进程所分配的所述緩存块中。
步骤 210: 文件访问代理进程中的数据接收模块确定完成了读请求处 理, 并向读操作接口发送通知。
步骤 211 : 动态链接库中的读操作接口收到来自数据接收模块的通知 时, 通知应用程序进程读操作已完成。
步骤 212: 当不再需要保留完成读操作的緩存块中的数据时,应用程序 进程调用动态链接库中的緩存释放接口, 以释放完成读操作的緩存块。
步骤 213: 动态链接库中的緩存释放接口根据应用程序进程的调用,释 放共享内存中的相应緩存块, 并将成功或失败等释放结果通知给应用程序 进程。
由以上所述可见, 当应用程序调用分布式文件***的读操作接口时, 所带入的存放数据的地址为预先分配的緩存块地址; 分布式文件***在进 行实际数据读操作时, 可以直接使用该緩存块地址进行数据处理。
需要说明的是, 在分布式文件***中为应用程序所分配的緩存块, 不 由分布式文件***进行緩存管理, 而是直接交给应用程序使用, 以保证应 用程序完成读接口调用之后能够直接使用緩存块地址中的数据。
图 1、 图 2所示的操作思路可以表示如图 3所示。 参见图 3 , 图 3为本 发明分布式文件***中的数据处理流程筒图, 该流程包括以下步骤:
步骤 310: 在分布式文件***中为应用程序分配緩存。
步骤 320:应用程序使用分布式文件***所分配的緩存,进行数据处理。 综上所述可见, 无论是方法还是装置, 本发明的分布式文件***中的 数据处理技术, 能够使读操作接口减少一次内存拷贝过程, 从而在进行大 数据量读取操作时有效降低 CPU的利用率, 能够保证分布式文件***的稳 定性。

Claims

权利要求书
1、一种分布式文件***中的数据处理方法,其特征在于,该方法包括: 在分布式文件***中为应用程序分配緩存, 所述应用程序使用分布式 文件***所分配的緩存, 进行数据处理。
2、 根据权利要求 1所述的方法, 其特征在于, 为应用程序在分布式文 件***中设置緩存分配接口;
所述在分布式文件***中为应用程序分配緩存的过程包括:
属于应用程序的应用程序进程对分布式文件***中的緩存分配接口进 行调用;
緩存分配接口根据应用程序进程的调用, 在可用于应用程序进程的緩 存块区域分配緩存块。
3、 根据权利要求 2所述的方法, 其特征在于, 所述緩存分配接口进一 步将緩存的分配结果返回给应用程序进程。
4、 根据权利要求 2或 3所述的方法, 其特征在于, 所述应用程序使用 分布式文件***所分配的緩存, 进行数据处理的过程包括:
属于应用程序的应用程序进程对分布式文件***中的读操作接口进行 调用, 读操作接口根据所述调用提交读请求到分布式文件***中的文件访 问代理进程, 由文件访问代理进程根据收到的读请求接收数据, 并存储于 为应用程序进程所分配的所述緩存块中。
5、 根据权利要求 4所述的方法, 其特征在于, 提交所述读请求之前, 该方法进一步包括:
所述读操作接口判断应用程序是否使用了所分配的所述緩存块的地 址, 如果使用, 则读操作接口直接提交所述读请求, 并在该读请求中携带 所分配的緩存块地址; 否则, 读操作接口在分布式文件***中主动为所述 应用程序进程分配新的緩存块, 之后再提交所述读请求并在该读请求中携 带所分配的緩存块地址。
6、 根据权利要求 4所述的方法, 其特征在于, 该方法进一步包括: 针对完成读操作的緩存块, 所述应用程序进程调用分布式文件***中 预设的緩存释放接口, 释放分布式文件***中的相应緩存块。
7、 一种分布式文件***中的数据处理装置, 其特征在于, 该装置包括 緩存分配接口、 读操作接口、 文件访问代理进程; 其中,
所述緩存分配接口, 用于实现在分布式文件***中为应用程序进行的 緩存分配;
所述读操作接口, 用于根据应用程序的控制触发所述文件访问代理进 程;
所述文件访问代理进程, 用于根据所述读操作接口的触发, 使用分布 式文件***中为应用程序所分配的所述緩存进行数据处理。
8、 根据权利要求 7所述的装置, 其特征在于:
所述緩存分配接口预先设置于分布式文件***的动态链接库中, 进行緩存分配后所实现的緩存块设置于分布式文件***的共享内存 中。
9、 根据权利要求 7或 8所述的装置, 其特征在于, 该装置进一步包括 緩存释放接口, 用于根据所述应用程序的调用, 释放分布式文件***中完 成数据处理的相应緩存块。
10、 根据权利要求 7或 8所述的装置, 其特征在于, 所述文件访问代 理进程包括读请求处理模块、 数据接收模块; 其中,
所述读请求处理模块, 用于接收因所述读操作接口的触发而产生的读 请求, 并发送给所述数据接收模块;
所述数据接收模块, 用于根据收到的读请求, 使用分布式文件***中 为应用程序所分配的緩存进行数据处理。
PCT/CN2010/073161 2010-05-24 2010-05-24 分布式文件***中的数据处理方法和装置 WO2011147073A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2010/073161 WO2011147073A1 (zh) 2010-05-24 2010-05-24 分布式文件***中的数据处理方法和装置

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2010/073161 WO2011147073A1 (zh) 2010-05-24 2010-05-24 分布式文件***中的数据处理方法和装置

Publications (1)

Publication Number Publication Date
WO2011147073A1 true WO2011147073A1 (zh) 2011-12-01

Family

ID=45003195

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2010/073161 WO2011147073A1 (zh) 2010-05-24 2010-05-24 分布式文件***中的数据处理方法和装置

Country Status (1)

Country Link
WO (1) WO2011147073A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101404649A (zh) * 2008-11-11 2009-04-08 阿里巴巴集团控股有限公司 一种基于cache的数据处理***及其方法
CN100505762C (zh) * 2006-04-19 2009-06-24 华中科技大学 适用于对象网络存储的分布式多级缓存***
CN100517335C (zh) * 2007-10-25 2009-07-22 中国科学院计算技术研究所 一种分布式文件***的文件写入***和方法
CN101576912A (zh) * 2009-06-03 2009-11-11 中兴通讯股份有限公司 实现分布式文件***异步输入输出接口的***及读写方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100505762C (zh) * 2006-04-19 2009-06-24 华中科技大学 适用于对象网络存储的分布式多级缓存***
CN100517335C (zh) * 2007-10-25 2009-07-22 中国科学院计算技术研究所 一种分布式文件***的文件写入***和方法
CN101404649A (zh) * 2008-11-11 2009-04-08 阿里巴巴集团控股有限公司 一种基于cache的数据处理***及其方法
CN101576912A (zh) * 2009-06-03 2009-11-11 中兴通讯股份有限公司 实现分布式文件***异步输入输出接口的***及读写方法

Similar Documents

Publication Publication Date Title
US10691187B2 (en) Persistent reservations for virtual disk using multiple targets
US8074041B2 (en) Apparatus, system, and method for managing storage space allocation
WO2018059222A1 (zh) 一种文件切片上传方法、装置及云存储***
US20210255987A1 (en) Programmed Input/Output Mode
US9936017B2 (en) Method for logical mirroring in a memory-based file system
WO2011131066A1 (zh) 一种物联网***及其中缓存的控制方法
CN110196681B (zh) 业务写操作的磁盘数据写入控制方法及装置、电子设备
WO2012088894A1 (zh) 一种请求独占资源的方法及装置
WO2019001521A1 (zh) 数据存储方法、存储设备、客户端及***
CN110737388A (zh) 数据预读方法、客户端、服务器以及文件***
WO2015062228A1 (zh) 一种访问共享内存的方法和装置
WO2021238260A1 (zh) 一种预读数据缓存方法、装置、设备及存储介质
CN113918101A (zh) 一种写数据高速缓存的方法、***、设备和存储介质
US10872036B1 (en) Methods for facilitating efficient storage operations using host-managed solid-state disks and devices thereof
WO2022021896A1 (zh) 一种进程间通信的方法及装置
WO2015010646A1 (zh) 混合内存的数据访问方法、模块、处理器及终端设备
CN113127139B (zh) 一种基于数据面开发套件dpdk的内存分配方法和装置
WO2014153931A1 (zh) 文件存储方法、装置、访问客户端及元数据服务器***
CN111177032A (zh) 缓存空间申请方法、***、装置及计算机可读存储介质
CN116955219A (zh) 一种数据镜像方法、装置、主机及存储介质
KR20180011255A (ko) 파일에 접근하기 위한 방법과 장치, 및 저장 시스템
WO2011147073A1 (zh) 分布式文件***中的数据处理方法和装置
US11550617B2 (en) Disaggregated rack mount storage side transaction support
CN111274176B (zh) 一种信息处理方法、电子设备、***及存储介质
CN112003860B (zh) 适用于远程直接内存访问的内存管理方法、***及介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 10851945

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 10851945

Country of ref document: EP

Kind code of ref document: A1