CN107908474A - A kind of Memory Allocation application method and system based on rdma protocol - Google Patents

A kind of Memory Allocation application method and system based on rdma protocol Download PDF

Info

Publication number
CN107908474A
CN107908474A CN201711024460.8A CN201711024460A CN107908474A CN 107908474 A CN107908474 A CN 107908474A CN 201711024460 A CN201711024460 A CN 201711024460A CN 107908474 A CN107908474 A CN 107908474A
Authority
CN
China
Prior art keywords
memory unit
numerical value
rdma protocol
transmission registers
transmission
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.)
Pending
Application number
CN201711024460.8A
Other languages
Chinese (zh)
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.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information Technology 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 Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201711024460.8A priority Critical patent/CN107908474A/en
Publication of CN107908474A publication Critical patent/CN107908474A/en
Pending legal-status Critical Current

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/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer And Data Communications (AREA)

Abstract

This application discloses a kind of Memory Allocation application method and system based on rdma protocol, including:The transmission registers memory unit of distribution setting numerical value after process initiation;Setting numerical value is less than the maximum for sending registers memory unit number;Process consumes allocated transmission registers memory unit when sending data;If the transmission registers memory unit of allocated transmission registers memory unit deficiency, again a numerical value of dynamically distributes setting.The application dynamically increases the distribution for sending registers memory unit with the increase for sending data pressure, so under the premise of ensureing based on the normal information receiving and transmitting function of rdma protocol, greatly reduce process initiation post-registration Memory Allocation quantity, and it is able to maintain that less memory source takes when process messaging pressure is smaller, so as to improve the starting efficiency of individual process, the higher memory consumption state that is chronically at of clustered node is avoided, improves node memory and consumes too fast situation.

Description

A kind of Memory Allocation application method and system based on rdma protocol
Technical field
The present invention relates to technical field of memory, more particularly to a kind of Memory Allocation application method based on rdma protocol and System.
Background technology
(Remote Direct Memory Access, abbreviation PDMA) agreement is accessed using remote direct memory to disappear Message communication, transmitting terminal and receiving terminal need to distribute a certain amount of memory and these memories are passed through driving interface ibv_reg_mr IB network interface cards are registered to, could realize sending and receiving for message.The major function of ibv_reg_mr interfaces is to tell IB that network interface card can With the memory source address space and its access rights of access, such as local access limit and distal end access limit.
Fig. 1, which is shown, existing is based on rdma protocol messaging flow:Step 1, receiving terminal are distributed in enough receptions Deposit and call ibv_reg_mr interfaces to be registered to wireless broad band technology (InfiniBand, abbreviation IB) network interface card, then call driving The data that the transmitting terminal to be received such as interface ibv_post_recv is sent;Step 2: transmitting terminal distribution sends memory and calls ibv_ Reg_mr interfaces are registered to IB network interface cards, and data copy to be sent is finally then called driving interface ibv_ to sending in memory Post_send goes out data sending;Step 3: after receiving terminal receives data, driving interface ibv_poll_ can be passed through Cq obtains the datarams memory space received, and then receiving terminal can obtain these data.It should be noted that step One must complete before step 2, i.e., receiving terminal must it is registered in advance it is enough be used to receive the memory of data, if received End receives low memory or does not perform step 1, then transmitting terminal calls ibv_post_send interfaces to fail in step 2.
After existing technology transmitting terminal and receiving terminal process initiation, just need to distribute substantial amounts of reception memory and transmission first Memory is simultaneously registered to IB cards, and these memory sources are all disposably to be assigned, and follow-up two inter-process datas transmitting-receiving is all Dependent on these registers memories.And in large-scale cluster storage system, a memory node will have about 40 processes, often A process is required for distributing these registers memory resources, therefore it is too fast to not only result in memory node memory consumption, and can be tight Ghost image rings the starting efficiency of individual process.
The content of the invention
In view of this, it is an object of the invention to provide a kind of Memory Allocation application method based on rdma protocol and it is System, can improve process initiation efficiency, system memory resource consumes in the case of transmission pressure is small after reduction starts.Its concrete scheme It is as follows:
A kind of Memory Allocation application method based on rdma protocol, including:
The transmission registers memory unit of distribution setting numerical value after process initiation;The setting numerical value is less than the transmission The maximum of registers memory unit number;
Process consumes the allocated transmission registers memory unit when sending data;
If the allocated transmission registers memory unit deficiency, the again transmission of dynamically distributes setting numerical value are noted Volume internal storage location.
Preferably, in the above-mentioned Memory Allocation application method based on rdma protocol provided in an embodiment of the present invention, if The transmission registers memory unit deficiency of distribution, again the transmission registers memory unit of dynamically distributes setting numerical value it Afterwards, further include:
The number for the transmission registers memory unit that process is distributed altogether is the stopping distribution transmission note after maximum Volume internal storage location.
Preferably, it is described in the above-mentioned Memory Allocation application method based on rdma protocol provided in an embodiment of the present invention Set 1/N of a numerical value as the maximum of the transmission registers memory unit number;Wherein N>1 and N is positive integer.
Preferably, it is described in the above-mentioned Memory Allocation application method based on rdma protocol provided in an embodiment of the present invention A numerical value is set as the 1/10 of the maximum of the transmission registers memory unit number.
Preferably, in the above-mentioned Memory Allocation application method based on rdma protocol provided in an embodiment of the present invention, process After startup while the transmission registers memory unit of distribution setting numerical value, further include:
Distribute the reception registers memory unit of fixed number value.
The embodiment of the present invention additionally provides a kind of Memory Allocation based on rdma protocol and uses system, including:
Original allocation module, the transmission registers memory unit for distribution setting numerical value after process initiation;The setting A numerical value is less than the maximum of the transmission registers memory unit number;
Consumable module, consumes the allocated transmission registers memory unit when sending data for process;
Dynamically distributes module, if for the allocated transmission registers memory unit deficiency, again dynamically distributes setting The transmission registers memory unit of a numerical value.
Preferably, it is described in the above-mentioned Memory Allocation based on rdma protocol provided in an embodiment of the present invention uses system Dynamically distributes module, the transmission registers memory unit number that the process that is additionally operable to is distributed altogether are stopping distribution after maximum The transmission registers memory unit.
Preferably, it is described in the above-mentioned Memory Allocation based on rdma protocol provided in an embodiment of the present invention uses system Set 1/N of a numerical value as the maximum of the transmission registers memory unit number;Wherein N>1 and N is positive integer.
Preferably, it is described in the above-mentioned Memory Allocation based on rdma protocol provided in an embodiment of the present invention uses system A numerical value is set as the 1/10 of the maximum of the transmission registers memory unit number.
Preferably, it is described in the above-mentioned Memory Allocation based on rdma protocol provided in an embodiment of the present invention uses system Original allocation module, is additionally operable to the reception registers memory unit of distribution fixed number value.
A kind of Memory Allocation application method and system based on rdma protocol provided by the present invention, including:Process initiation The transmission registers memory unit of distribution setting numerical value afterwards;Setting numerical value is less than the maximum for sending registers memory unit number Value;Process consumes allocated transmission registers memory unit when sending data;If allocated transmission registers memory unit deficiency, Again the transmission registers memory unit of dynamically distributes setting numerical value.The present invention with send data pressure increase and dynamically Increase sends the distribution of registers memory unit, so under the premise of ensureing to be based on the normal information receiving and transmitting function of rdma protocol, greatly It is big to reduce process initiation post-registration Memory Allocation quantity, and be able to maintain that when process messaging pressure is smaller in less Resource occupation is deposited, so as to improve the starting efficiency of individual process, avoid clustered node is chronically at higher memory consumption shape State, improves node memory and consumes too fast situation.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing There is attached drawing needed in technology description to be briefly described, it should be apparent that, drawings in the following description are only this The embodiment of invention, for those of ordinary skill in the art, without creative efforts, can also basis The attached drawing of offer obtains other attached drawings.
Fig. 1 is based on rdma protocol messaging flow schematic diagram to be existing;
Fig. 2 is the Memory Allocation application method flow chart provided in an embodiment of the present invention based on rdma protocol.
Embodiment
Below in conjunction with the attached drawing in the embodiment of the present invention, the technical solution in the embodiment of the present invention is carried out clear, complete Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, those of ordinary skill in the art are obtained every other without making creative work Embodiment, belongs to the scope of protection of the invention.
The present invention provides a kind of Memory Allocation application method based on rdma protocol, as shown in Fig. 2, comprising the following steps:
The transmission registers memory unit of distribution setting numerical value after S201, process initiation;Setting numerical value, which is less than to send, to be noted The maximum of volume internal storage location number;
S202, process consume allocated transmission registers memory unit when sending data;
If the transmission registration of S203, again allocated transmission registers memory unit deficiency, dynamically distributes setting numerical value Internal storage location.
In the above-mentioned Memory Allocation application method based on rdma protocol provided in an embodiment of the present invention, process initiation first The transmission registers memory unit of distribution setting numerical value afterwards;A numerical value is set at this time is less than transmission registers memory unit number most Big value;Then allocated transmission registers memory unit is consumed when process sends data;If allocated transmission registers memory list The transmission registers memory unit of first deficiency, again dynamically distributes setting numerical value.The present invention is with the increase for sending data pressure And the distribution for sending registers memory unit is dynamically increased, so before ensureing to be based on the normal information receiving and transmitting function of rdma protocol Put, greatly reduce process initiation post-registration Memory Allocation quantity, and be able to maintain that when process messaging pressure is smaller Less memory source takes, so as to improve the starting efficiency of individual process, avoids being chronically at for clustered node higher interior Consumption state is deposited, improves node memory and consumes too fast situation.
It should be noted that, it is necessary to registered in advance substantial amounts of during existing use rdma protocol carries out data transmission Send registers memory and receive registers memory, if these memories all disposably distribute after process initiation, will largely effect on into The starting efficiency of journey, and node memory takes the higher state that can also maintain always, and these two aspects will after the present invention improves Larger improvement is obtained, not only ensure that normal information receiving and transmitting function, but also reduces initial registration Memory Allocation quantity, so as to carry High process initiation efficiency, greatly reduce send after multiple process initiations pressure it is small in the case of system memory resource consume.
Further, in the specific implementation, in the above-mentioned Memory Allocation based on rdma protocol provided in an embodiment of the present invention In application method, if performing the allocated transmission registers memory unit deficiencies of step S203, dynamically distributes set number again It is further comprising the steps of after the transmission registers memory unit of value:
The number for the transmission registers memory unit that process is distributed altogether is stopping distribution transmission registers memory list after maximum Member.
That is, in order to ensure not influence normal information receiving and transmitting function, with the increase for sending data pressure, dynamic Ground increase sends the distribution of registers memory unit, until quantity allotted should after reaching the maximum for sending registers memory unit number Do not reallocate and send registers memory unit.
In the specific implementation, in the above-mentioned Memory Allocation application method based on rdma protocol provided in an embodiment of the present invention In, in order to ensure that the number of the transmission registers memory unit of every sub-distribution is consistent, it can be to send registration to set a numerical value The 1/N of the maximum of internal storage location number;Wherein N>1 and N is positive integer.
Specifically, a numerical value is set to could be provided as sending the 1/10 of the maximum of registers memory unit number.So remove The distribution of initial registration internal storage location, dynamically at least nine times increases can send the distribution of registers memory unit.
In the specific implementation, in the above-mentioned Memory Allocation application method based on rdma protocol provided in an embodiment of the present invention In, after process initiation while the transmission registers memory unit of distribution setting numerical value, further include:
Distribute the reception registers memory unit of fixed number value.
For example, m can be distributed after process initiation receives registers memory unit and n/10 transmission registers memory unit;Its Middle n is the maximum for sending registers memory unit number.
Based on same inventive concept, the embodiment of the present invention additionally provides a kind of Memory Allocation based on rdma protocol and uses system System, since the principle that the system solves the problems, such as is similar to a kind of foregoing Memory Allocation application method based on rdma protocol, The implementation of the system may refer to the implementation of the Memory Allocation application method based on rdma protocol, and overlaps will not be repeated.
In the specific implementation, the Memory Allocation provided in an embodiment of the present invention based on rdma protocol uses system, specific bag Include:
Original allocation module, the transmission registers memory unit for distribution setting numerical value after process initiation;Set number Value is less than the maximum for sending registers memory unit number;
Consumable module, consumes allocated transmission registers memory unit when sending data for process;
Dynamically distributes module, if insufficient for allocated transmission registers memory unit, dynamically distributes set number again The transmission registers memory unit of value.
In the above-mentioned Memory Allocation based on rdma protocol provided in an embodiment of the present invention uses system, pass through above three The interaction of module, for individual process, reduces initial registration Memory Allocation quantity, so as to improve process initiation Efficiency;For whole memory node, greatly reduce send after multiple process initiations pressure it is small in the case of Installed System Memory provide Source consumes.
Further, in the specific implementation, in the above-mentioned Memory Allocation based on rdma protocol provided in an embodiment of the present invention Using in system, in order to ensure not influence normal information receiving and transmitting function, dynamically distributes module, is additionally operable to what process was distributed altogether It is stopping distribution transmission registers memory unit after maximum to send registers memory unit number.
In the specific implementation, system is used in the above-mentioned Memory Allocation based on rdma protocol provided in an embodiment of the present invention In, in order to ensure that the number of the transmission registers memory unit of every sub-distribution is consistent, it can be to send registration to set a numerical value The 1/N of the maximum of internal storage location number;Wherein N>1 and N is positive integer.
Specifically, a numerical value is set to could be provided as sending the 1/10 of the maximum of registers memory unit number.
In the specific implementation, system is used in the above-mentioned Memory Allocation based on rdma protocol provided in an embodiment of the present invention In, original allocation module, be additionally operable to distribution fixed number value reception registers memory unit.
A kind of Memory Allocation application method and system based on rdma protocol provided in an embodiment of the present invention, including:Process The transmission registers memory unit of distribution setting numerical value after startup;Setting numerical value, which is less than, sends registers memory unit number most Big value;Process consumes allocated transmission registers memory unit when sending data;If allocated transmission registers memory unit is not The transmission registers memory unit of foot, again dynamically distributes setting numerical value.The present invention is moved with the increase for sending data pressure Increase to state the distribution for sending registers memory unit, so ensureing to be based on the normal information receiving and transmitting function premise of rdma protocol Under, greatly reduce process initiation post-registration Memory Allocation quantity, and be able to maintain that when process messaging pressure is smaller compared with Few memory source takes, so as to improve the starting efficiency of individual process, avoid clustered node is chronically at higher memory Consumption state, improves node memory and consumes too fast situation.
Finally, it is to be noted that, herein, term " comprising ", "comprising" or its any other variant are intended to Cover non-exclusive inclusion, so that process, method, article or equipment including a series of elements not only include those Key element, but also including other elements that are not explicitly listed, or further include as this process, method, article or set Standby intrinsic key element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that Also there are other identical element in the process, method, article or apparatus that includes the element.
Detailed Jie has been carried out to the Memory Allocation application method provided by the present invention based on rdma protocol and system above Continue, specific case used herein is set forth the principle of the present invention and embodiment, and the explanation of above example is only It is the method and its core concept for being used to help understand the present invention;Meanwhile for those of ordinary skill in the art, according to this hair Bright thought, there will be changes in specific embodiments and applications, in conclusion this specification content should not manage Solve as limitation of the present invention.

Claims (10)

  1. A kind of 1. Memory Allocation application method based on rdma protocol, it is characterised in that including:
    The transmission registers memory unit of distribution setting numerical value after process initiation;The setting numerical value is less than described send and registers The maximum of internal storage location number;
    Process consumes the allocated transmission registers memory unit when sending data;
    If the allocated transmission registers memory unit deficiency, again in the transmission registration of dynamically distributes setting numerical value Memory cell.
  2. 2. the Memory Allocation application method according to claim 1 based on rdma protocol, it is characterised in that if allocated The transmission registers memory unit deficiency, again after the transmission registers memory unit of dynamically distributes setting numerical value, also Including:
    After maximum, to stop, distribution is described to be sent in registration the number for the transmission registers memory unit that process is distributed altogether Memory cell.
  3. 3. the Memory Allocation application method according to claim 2 based on rdma protocol, it is characterised in that the setting Numerical value is the 1/N of the maximum of the transmission registers memory unit number;Wherein N>1 and N is positive integer.
  4. 4. the Memory Allocation application method according to claim 3 based on rdma protocol, it is characterised in that the setting Numerical value is the 1/10 of the maximum of the transmission registers memory unit number.
  5. 5. the Memory Allocation application method according to claim 1 based on rdma protocol, it is characterised in that after process initiation While the transmission registers memory unit of distribution setting numerical value, further include:
    Distribute the reception registers memory unit of fixed number value.
  6. 6. a kind of Memory Allocation based on rdma protocol uses system, it is characterised in that including:
    Original allocation module, the transmission registers memory unit for distribution setting numerical value after process initiation;The setting number Value is less than the maximum of the transmission registers memory unit number;
    Consumable module, consumes the allocated transmission registers memory unit when sending data for process;
    Dynamically distributes module, if insufficient for the allocated transmission registers memory unit, dynamically distributes set number again The transmission registers memory unit of value.
  7. 7. the Memory Allocation according to claim 6 based on rdma protocol uses system, it is characterised in that the dynamic point With module, the transmission registers memory unit number that the process that is additionally operable to is distributed altogether is the stopping distribution hair after maximum Send registers memory unit.
  8. 8. the Memory Allocation according to claim 7 based on rdma protocol uses system, it is characterised in that the setting Numerical value is the 1/N of the maximum of the transmission registers memory unit number;Wherein N>1 and N is positive integer.
  9. 9. the Memory Allocation according to claim 8 based on rdma protocol uses system, it is characterised in that the setting Numerical value is the 1/10 of the maximum of the transmission registers memory unit number.
  10. 10. the Memory Allocation according to claim 6 based on rdma protocol uses system, it is characterised in that described initial Distribution module, is additionally operable to the reception registers memory unit of distribution fixed number value.
CN201711024460.8A 2017-10-27 2017-10-27 A kind of Memory Allocation application method and system based on rdma protocol Pending CN107908474A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711024460.8A CN107908474A (en) 2017-10-27 2017-10-27 A kind of Memory Allocation application method and system based on rdma protocol

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711024460.8A CN107908474A (en) 2017-10-27 2017-10-27 A kind of Memory Allocation application method and system based on rdma protocol

Publications (1)

Publication Number Publication Date
CN107908474A true CN107908474A (en) 2018-04-13

Family

ID=61841983

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711024460.8A Pending CN107908474A (en) 2017-10-27 2017-10-27 A kind of Memory Allocation application method and system based on rdma protocol

Country Status (1)

Country Link
CN (1) CN107908474A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109194721A (en) * 2018-08-15 2019-01-11 无锡江南计算技术研究所 A kind of asynchronous RDMA communication dynamic memory management method and system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050132327A1 (en) * 2003-12-15 2005-06-16 Mountain Highland M. Software development environment
CN104166597A (en) * 2013-05-17 2014-11-26 华为技术有限公司 Remote memory allocation method and device
CN106873915A (en) * 2017-02-22 2017-06-20 郑州云海信息技术有限公司 A kind of data transmission method and device based on RDMA registers memory blocks
CN107147590A (en) * 2017-07-12 2017-09-08 郑州云海信息技术有限公司 A kind of method and system based on rdma protocol message communicating

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050132327A1 (en) * 2003-12-15 2005-06-16 Mountain Highland M. Software development environment
CN104166597A (en) * 2013-05-17 2014-11-26 华为技术有限公司 Remote memory allocation method and device
CN106873915A (en) * 2017-02-22 2017-06-20 郑州云海信息技术有限公司 A kind of data transmission method and device based on RDMA registers memory blocks
CN107147590A (en) * 2017-07-12 2017-09-08 郑州云海信息技术有限公司 A kind of method and system based on rdma protocol message communicating

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109194721A (en) * 2018-08-15 2019-01-11 无锡江南计算技术研究所 A kind of asynchronous RDMA communication dynamic memory management method and system

Similar Documents

Publication Publication Date Title
CN107241281B (en) Data processing method and device
CN102413150B (en) Server and virtual desktop control method and virtual desktop control system
CN110096336B (en) Data monitoring method, device, equipment and medium
CN102571996B (en) IP (Internet Protocol) address assignment method, IP address assignment device and network system
CN102202289A (en) Method and system for remote calling software and hardware resources through mobile terminal
CN104796337A (en) Method and device for forwarding message
CN105183565A (en) Computer and service quality control method and device
CN105791254B (en) Network request processing method and device and terminal
CN102843436A (en) Method, equipment, server and system of equipment management
CN105704256B (en) A kind of IP address management methods, devices and systems
CN101883153B (en) Information presentation method, system and terminal equipment based on cloud computing
CN108829529A (en) Virutal machine memory sharing method, device, computer equipment and storage medium
CN107295610B (en) Network access method, related equipment and system
CN113361913A (en) Communication service arranging method, device, computer equipment and storage medium
CN104571930A (en) Management method and management system of security domain storage spaces as well as multi-application open platform device
CN107908474A (en) A kind of Memory Allocation application method and system based on rdma protocol
CN115686346A (en) Data storage method and device and computer readable storage medium
CN107465769A (en) A kind of IP Address in LAN management method and device
CN105656794A (en) Data distribution method and device
CN110351843B (en) Resource allocation indicating method, resource allocation obtaining method, base station and user terminal
CN116244231A (en) Data transmission method, device and system, electronic equipment and storage medium
CN102567083B (en) Object transmission method, object transmission device and object transmission system applying RPC (remote procedure call)
CN103546522A (en) Storage server determining method and distributed storage system
CN114253704A (en) Method and device for allocating resources
CN105072047A (en) Message transmitting and processing method

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20180413