CN108345502A - Resource regulating method, device, terminal device based on DPDK and readable storage medium storing program for executing - Google Patents

Resource regulating method, device, terminal device based on DPDK and readable storage medium storing program for executing Download PDF

Info

Publication number
CN108345502A
CN108345502A CN201810036566.8A CN201810036566A CN108345502A CN 108345502 A CN108345502 A CN 108345502A CN 201810036566 A CN201810036566 A CN 201810036566A CN 108345502 A CN108345502 A CN 108345502A
Authority
CN
China
Prior art keywords
dpdk
processor
data packets
processing data
resource
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
CN201810036566.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.)
Zhongxing Flying Mdt Infotech Ltd
Original Assignee
Zhongxing Flying Mdt Infotech 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 Zhongxing Flying Mdt Infotech Ltd filed Critical Zhongxing Flying Mdt Infotech Ltd
Priority to CN201810036566.8A priority Critical patent/CN108345502A/en
Publication of CN108345502A publication Critical patent/CN108345502A/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/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • 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/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5018Thread allocation

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The present invention relates to fields of communication technology, disclose a kind of resource regulating method, device, terminal device and readable storage medium storing program for executing based on DPDK.In the present invention, resource regulating method includes:Based on the mapping relations between processor and DPDK processing data packets threads, determines and need fixed DPDK processing data packets threads on a processor;Based on DPDK, DPDK processing data packets threads transceiving data from trawl performance model in a manner of poll is controlled;If it is determined that meeting the condition of release processor resource, control DPDK processing data packets threads stop poll trawl performance model.Resource regulating method provided by the invention effectively reduces the occupation rate of CPU, improves the service efficiency of CPU.

Description

Resource regulating method, device, terminal device based on DPDK and readable storage medium storing program for executing
Technical field
The present invention relates to field of communication technology, more particularly to a kind of resource regulating method based on DPDK, device, terminal are set Standby and readable storage medium storing program for executing.
Background technology
With the high speed development of internet, cloud industry quickly emerges, in order to support diversified network function, architecture Network is gradually biased to merge based on universal computing platform or the framework of modularization computing platform, and traditional PC equipment is counted in distribution The advantage calculated on platform becomes apparent.Currently, PC equipment is when obtaining data packet, generally by the ether in driving PC equipment Net driver, so that central processing unit (Central Processing Unit, CPU) can control Native Linux (local Linux) is received from network interface controller (Network Interface Controller, NIC) and is interrupted, and Traps are dispatched after receiving interruption, context switching are carried out to the interruption of gained, while waking up system and network interface card is called to receive Data packet.However, during obtaining data packet using aforesaid way, CPU not only cannot achieve constantly received data packet, together When can not also avoid traps, context switching and wake up system call etc. operations.Thus, for mass data processing or sea In the service scenarios for measuring user, high-performance programming is particularly important.
Data plane development kit (Data Plane Development Kit, DPDK) is mainly based upon linux system Operation is that the function library handled for rapid data packet is gathered with driving, can greatly improve data processing performance, handling capacity And the working efficiency of data plane application program.Compared to the mode of ethernet driver, DPDK uses the wheel of optimization Ask mode activated (Poll Mode Driver, PMD), when receiving data packet, the trawl performance through DPDK heavy duties can directly by Data packet is stored in memory, delivers the interface that application layer software is provided by DPDK directly to handle, saves a large amount of CPU in this way Break period and memory copying time.
But inventor has found that at least there are the following problems in the prior art:Using existing DPDK source scheduling modes, The resource utilization of CPU can be caused too low, i.e., no matter either with or without data packet is received, the occupancy of CPU is 100%, one always The CPU of the thread binding of denier received data packet is seized by other thread, then performance will significantly decline.
In conclusion how to solve the problems, such as that the resource utilization of CPU in the source scheduling mode based on DPDK is too low aobvious It obtains particularly important.
Invention content
It the resource regulating method that the purpose of the present invention is to provide a kind of based on DPDK, device, terminal device and readable deposits Storage media effectively reduces the occupation rate of CPU, improves the service efficiency of CPU.
In order to solve the above technical problems, embodiments of the present invention provide a kind of resource regulating method based on DPDK. The resource regulating method based on DPDK includes:Based on the mapping relations between processor and DPDK processing data packets threads, really It is fixed to need fixed DPDK processing data packets threads on a processor;Based on DPDK, control DPDK processing data packets thread is to take turns The mode of inquiry transceiving data from trawl performance model;If it is determined that meeting the condition of release processor resource, DPDK data are controlled Packet processing thread stops poll trawl performance model.
Embodiments of the present invention additionally provide a kind of resource scheduling device based on DPDK.The resource tune based on DPDK Spending device includes:Determining module, the first control module, judgment module and the second control module;Determining module, for based on processing Mapping relations between device and DPDK processing data packets threads determine and need fixed DPDK processing data packets lines on a processor Journey;First control module, for being based on DPDK, control DPDK processing data packets threads are in a manner of poll from trawl performance model Middle transceiving data;Judgment module, the condition for monitoring whether to meet release processor resource, and meet release processing determining When the condition of device resource, the second control module is triggered;Second control module stops wheel for controlling DPDK processing data packets threads Ask trawl performance model.
Embodiments of the present invention additionally provide a kind of terminal device.The terminal device includes at least one processor;With And the memory being connect at least one processor communication;Wherein, memory is stored with and can be executed by least one processor Instruction, instruction are executed by least one processor, so that at least one processor is able to carry out in arbitrary embodiment of the invention The resource regulating method being related to.
Embodiments of the present invention additionally provide a kind of readable storage medium storing program for executing.The readable storage medium storing program for executing is computer-readable deposits Storage media is stored with computer program in computer readable storage medium, can be realized when computer program is executed by processor Resource regulating method involved in the arbitrary embodiment of the present invention.
Embodiment of the present invention in terms of existing technologies, based on DPDK, control DPDK processing data packets thread with The mode of poll is before transceiving data in trawl performance model, by being based between processor and DPDK processing data packets threads Mapping relations, determine and need fixed DPDK processing data packets threads on a processor so that the use of CPU is more reasonable. In addition, during transceiving data, however, it is determined that the condition for meeting release processor resource, by controlling DPDK processing data packets Thread stops poll trawl performance model, effectively reduces the occupation rate of CPU so that CPU can handle other tasks, to carry The high service efficiency of CPU.
In addition, control DPDK processing data packets threads stop poll trawl performance model, specifically include:Log-on data is received and dispatched It interrupts, control DPDK processing data packets threads enter dormant state, stop poll trawl performance model.Present embodiments provide for Control a kind of concrete mode that DPDK processing data packets threads stop poll trawl performance model.
It is interrupted in addition, being received and dispatched in log-on data, control DPDK processing data packets threads enter dormant state, stop poll net After card driving model, the resource regulating method based on DPDK further includes:If monitoring data, DPDK processing data packets lines are waken up Journey is closed data transmit-receive and is interrupted;Based on DPDK, control DPDK processing data packets threads are in a manner of poll from trawl performance model Middle transceiving data.After log-on data transmitting-receiving is interrupted, whether there are data during being interrupted by monitoring data transmitting-receiving, and monitoring When data, DPDK processing data packets threads are waken up, data transmit-receive is closed and interrupts, be based on DPDK again, control at DPDK data packets Lineation journey transceiving data from trawl performance model in a manner of poll.By so recycling, until the transmitting-receiving of all data is grasped Until being fully completed, while ensureing CPU service efficiencies, needed but also data transmit-receive process is more in line with actual use It asks.
In addition, based on the mapping relations between processor and DPDK processing data packets threads, determines and need to be fixed on place Before managing the DPDK processing data packets threads on device, the resource regulating method based on DPDK further includes:To trawl performance model into Row initialization, and establish the correspondence of processor and trawl performance model.Based on processor and DPDK processing data packets lines Mapping relations between journey determine before needing fixed DPDK processing data packets threads on a processor, by executing to net Card driving model is initialized, and establishes the operation of processor and the correspondence of trawl performance model, it is ensured that data are received During hair, trawl performance model is in active states always so that DPDK processing data packets thread can be in a manner of poll The transceiving data from trawl performance model.
In addition, determining the condition for meeting release processor resource, specifically include:Accumulative be not polled to data continuous time Number determines the condition for meeting release processor resource if the read-around ratio for not being polled to data is not less than first threshold;And/or It is accumulative not to be polled to the continuous duration of data, if the continuous duration for not being polled to data is not less than second threshold, determines to meet and release Put the condition of processor resource.Present embodiments provide for several specific sides for determining the condition for meeting release processor resource Formula.
In addition, based on the mapping relations between processor and DPDK processing data packets threads, determines and need to be fixed on processing Before DPDK processing data packets threads on device, the resource regulating method based on DPDK further includes:Obtain sample data;Wherein, Sample data is the data that DPDK processing data packets thread can be received and dispatched;According to sample data, the data in predetermined period are determined Scale and data characteristics;According to data scale and data characteristics, the DPDK numbers for needing processor to be used and needs to create are determined Thread is handled according to packet, and establishes the mapping relations between processor and DPDK processing data packets threads.Present embodiments provide for Establish a kind of concrete mode of the mapping relations between processor and DPDK processing data packets threads.
In addition, sample data is obtained by the way of network crawl and/or system monitoring.Present embodiments provide for acquisitions Several concrete modes of sample data.
Description of the drawings
One or more embodiments are illustrated by the picture in corresponding attached drawing, these are exemplary Illustrate not constitute the restriction to embodiment, the element with same reference numbers label is expressed as similar member in attached drawing Part, unless there are special statement, composition does not limit the figure in attached drawing.
Fig. 1 is the flow chart of the resource regulating method based on DPDK of first embodiment of the invention;
Fig. 2 is the flow chart of the resource regulating method based on DPDK of second embodiment of the invention;
Fig. 3 is the block diagram of the resource scheduling device based on DPDK of third embodiment of the invention;
Fig. 4 is the block diagram of the terminal device of four embodiment of the invention.
Specific implementation mode
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with attached drawing to each reality of the present invention The mode of applying is explained in detail.However, it will be understood by those skilled in the art that in each embodiment of the present invention, In order to make the reader understand this application better, many technical details are proposed.But even if without these technical details and base In the various changes and modifications of following embodiment, each claim of the application technical side claimed can also be realized Case.
The first embodiment of the present invention is related to a kind of resource regulating methods based on DPDK.This resource based on DPDK Dispatching method is mainly used on terminal device (equipment for being equipped with linux system, such as PC equipment), and in terminal device extremely Include a processor (hereinafter referred to as " CPU ") less.
It should be noted that no matter terminal device includes several CPU, the resource regulating method based on DPDK is somebody's turn to do each Executive mode on a CPU is substantially identical, for convenience of description, is specifically described below from the angle of a CPU, Detailed process is as shown in Figure 1.
In a step 101, based on the mapping relations between processor and DPDK processing data packets threads, determination needs to fix DPDK processing data packets threads on a processor.
Specifically, the mapping relations between CPU and DPDK processing data packets threads described in present embodiment are pre- It first establishes, specific establishment mode is as follows:
S1, sample data is obtained.
It should be noted that the sample obtained in the mapping relations between establishing CPU and DPDK processing data packets threads Data are the data that DPDK processing data packets thread can be received and dispatched.
In the present embodiment, sample data specifically may be used network crawl (as utilize web crawlers software grabs) or It is obtained by way of system monitoring (such as creating a monitoring event computer programming language).
Furthermore it is also possible to sample data be obtained by the way of network crawl and system monitoring simultaneously, to further Abundant sample data so that the data scale in predetermined period and data characteristics determined according to sample data is more in line with reality Situation.
In addition, in order to ensure that the data scale predicted and data characteristics are more accurate, according to the sample number got According to before carrying out big data forecast analysis, re-scheduling processing can also be carried out to data sample, those skilled in the art can root According to rationally setting is needed, it is not limited herein.
S2, according to sample data, determine the data scale and data characteristics in predetermined period.
Specifically, prediction point mainly is carried out to sample data using existing big data analysis system in present embodiment Analysis, so as to obtain data scale and data characteristics in predetermined period (such as one month, 1 year).
Such as one has the PC equipment of 4 CPU and network interface cards, it is with daily online statistical data The data of example, one week of interception are sample data, by carrying out characteristic analysis to data daily in a week, are predicted Nearly 1 year Internet data scale and data characteristics.
Analyzing obtained data characteristics may be:The data volume at night is smaller, and the data volume on daytime is larger, and daily Data are all rules.
It should be noted that these are only citing, protection scope of the present invention is not constituted and is limited.
S3, the DPDK data packets created according to data scale and data characteristics, determination need processor to be used and needs Thread is handled, and establishes the mapping relations between processor and DPDK processing data packets threads.
Such as the data on daytime of above-mentioned Internet data, a DPDK data packet can be bound on each CPU Thread is handled, follow-up data transmitting-receiving operation is carried out.And when certain day data receiver on daytime finishes, then half number is used only in setting CPU bind DPDK processing data packets threads, the other half CPU is then used for the processing of other threads, to realize according to number According to scale and data characteristics, determining needs processor to be used and needs the DPDK processing data packets threads created, and at foundation Manage the mapping relations between device and DPDK processing data packets threads.
It should be noted that the above-mentioned mapping only established between CPU and DPDK processing data packets threads provided is closed A kind of specific implementation of system, in practical applications, those skilled in the art can be rationally arranged, and not be limited herein.
In a step 102, it is based on DPDK, control DPDK processing data packets threads are in a manner of poll from trawl performance model Middle transceiving data.
It should be noted that the time interval of poll acquisition data can be rationally arranged as needed every time, do not do herein Limitation.
In addition, for each CPU, the operation of transceiving data is all from trawl performance model in a manner of poll Independent, i.e., when needing transceiving data there are multiple CPU in terminal device, each CPU can receive data simultaneously, then Parallel processing.
In step 103, the condition for meeting release processor resource is monitored whether.If it is determined that meeting release processor resource Condition, enter step 104;Otherwise, step 103 is continued to execute, the condition until meeting release processor resource enters step 104 or terminate data transmit-receive operation until.
In order to make it easy to understand, present embodiment gives the specific side of several determining conditions for meeting release processor resource Formula, it is specific as follows:
Such as CPU, based on DPDK, control DPDK processing data packets threads are in a manner of poll from trawl performance model During middle transceiving data, by the accumulative read-around ratio for not being polled to data, and judge continuous time that is not polled to data Whether number is not less than first threshold (such as 3 times), if it is determined that the read-around ratio for not being polled to data is not less than first threshold, then really The fixed condition for meeting release processor resource.
Also such as, CPU is based on DPDK, and control DPDK processing data packets threads are in a manner of poll from trawl performance mould In type during transceiving data, by the accumulative continuous duration for not being polled to data, and judge not being polled to the continuous of data Whether duration is not less than second threshold (such as within 5 minutes), if it is determined that the continuous duration for not being polled to data is not less than second Threshold value, it is determined that meet the condition of release processor resource.
Also such as, CPU is based on DPDK, and control DPDK processing data packets threads are in a manner of poll from trawl performance mould In type during transceiving data, above two mode can be combined, consider be not polled to data read-around ratio and It is not polled to the continuous duration of data, and rational threshold value is set according to actual needs, then determines to meet when meeting threshold value and release Put the condition of processor resource.
It should be noted that these are only for example, not constituting protection scope of the present invention at restriction.In reality In, those skilled in the art can rationally be arranged according to the data of occasion, processing that terminal device uses and judge whether Meet release processor resource mode, and the condition (values of various threshold values) of release processor resource, is not limited herein.
At step 104, control DPDK processing data packets threads stop poll trawl performance model.
Specifically, control DPDK processing data packets threads stop the specific implementation of poll trawl performance model can be with It is realized by the way that interrupt mechanism is added.
Such as when determining the condition for meeting release processor resource, first log-on data transmitting-receiving is interrupted, and is then controlled DPDK processing data packets threads enter dormant state (sleep), stop poll trawl performance model, to realize release CPU's Resource.
In addition, it is noted that in order to make the process of data transmit-receive be more in line with actual use demand, in log-on data Transmitting-receiving is interrupted, and after the resource for discharging CPU, further monitoring data transmitting-receiving whether can also have data during interrupting, and monitoring When to data, DPDK processing data packets threads are waken up, data transmit-receive is closed and interrupts, be based on DPDK again, control DPDK data packets Handle thread transceiving data from trawl performance model in a manner of poll.By so recycling, until the transmitting-receiving of all data Until operation is fully completed, while ensureing CPU service efficiencies, needed but also data transmit-receive process is more in line with actual use It asks.
It is limited it should be noted that these are only for example, not constituted to technical scheme of the present invention.
In addition, above various methods the step of divide, be intended merely to describe clear, when realization can be merged into a step Or certain steps are split, multiple steps are decomposed into, as long as including identical logical relation, all protections in the present invention In range, to either adding inessential modification in algorithm in flow or introducing inessential design, but do not change it The core design of algorithm and flow is all within the scope of the present invention.
By foregoing description it is not difficult to find that compared with prior art, the resource based on DPDK provided in present embodiment Dispatching method, based on DPDK, control DPDK processing data packets threads receive and dispatch number in a manner of poll from trawl performance model According to before, by the mapping relations being based between processor (CPU) and DPDK processing data packets threads, determines and need to be fixed on place Manage the DPDK processing data packets threads on device so that the use of CPU is more reasonable.In addition, during transceiving data, if really The fixed condition for meeting release processor resource stops poll trawl performance model by controlling DPDK processing data packets threads, has Effect reduces the occupation rate of CPU so that CPU can handle other tasks, to improve the service efficiency of CPU.
Second embodiment of the present invention is related to a kind of resource regulating method based on DPDK.Present embodiment is real first It applies and is further improved on the basis of mode, specific improvements are:Based on processor and DPDK processing data packets threads Between mapping relations, determine before needing fixed DPDK processing data packets threads on a processor, need to trawl performance Model is initialized, and establishes the correspondence of processor and trawl performance model, and detailed process is as shown in Figure 2.
Specifically, in the present embodiment, including step 201 is to step 205, wherein step 202 to step 205 is divided Not roughly the same to step 104 with the step 101 in first embodiment, details are not described herein again, mainly introduces difference below Place:
In step 201, trawl performance model is initialized, and it is corresponding with trawl performance model to establish processor Relationship.
In the present embodiment, trawl performance model includes mainly Peripheral Component Interconnect standard (Peripheral Component Interconnect, PCI) bus apparatus and network card equipment.Therefore, it is carried out initially to trawl performance model Change, and establish in the operation of correspondence of processor (following to be indicated with " CPU ") and trawl performance model, is substantially to PCI Bus apparatus and network card equipment are initialized, and establish the correspondence of CPU and pci bus equipment and network card equipment, such as One CPU can correspond to a network interface on network card equipment, specific set-up mode, this field by a pci bus equipment Technical staff can rationally be arranged according to actual needs, be not limited herein.
For the ease of understanding the operation of " being initialized to trawl performance model ", include below for trawl performance model The case where pci bus equipment and network card equipment, is specifically described.
Such as device drives are first registered in linux system, then search the pci bus equipment in linux system. After finding pci bus equipment, the identity of each pci bus equipment is obtained, according to identity, determines that PCI is total The corresponding driving of line equipment finally initializes pci bus equipment and network card equipment according to driving.
It should be noted that these are only for example, the trawl performance model in linux system removes in practical applications Include except pci bus equipment and network card equipment, can also include private data structure.It is carried out just to trawl performance model When beginningization operates, those skilled in the art can be rationally arranged according to actual needs, not be limited herein.
By foregoing description it is not difficult to find that compared with prior art, the resource based on DPDK provided in present embodiment Dispatching method, based on the mapping relations between processor and DPDK processing data packets threads, determination needs to be fixed on processor On DPDK processing data packets threads before, trawl performance model is initialized by executing, and establishes processor and net The operation of the correspondence of card driving model, it is ensured that during data transmit-receive, trawl performance model is in active states always, Enable DPDK processing data packets threads transceiving data from trawl performance model in a manner of poll.
It will be understood by those skilled in the art that above-mentioned each method embodiment is to realize the specific implementation of the present invention Mode, and in practical applications, can to it, various changes can be made in the form and details, without departing from the present invention spirit and Range.
Third embodiment of the present invention is related to a kind of resource scheduling device based on DPDK.The resource tune based on DPDK That spends device is embodied the description that can be found in any of the above-described method embodiment, and the specific structure is shown in FIG. 3.
As shown in figure 3, the resource scheduling device 300 based on DPDK includes mainly determining module 301, the first control module 302, monitoring modular 303 and the second control module 304.
Specifically, determining module 301, for being closed based on the mapping between processor and DPDK processing data packets threads System determines and needs fixed DPDK processing data packets threads on a processor.First control module 302, for being based on DPDK, control DPDK processing data packets thread processed transceiving data from trawl performance model in a manner of poll.Monitoring modular 303, for monitoring Whether satisfaction discharges the condition of processor resource, and when determining the condition for meeting release processor resource, triggers second and control Module 304.Second control module 304 stops poll trawl performance model for controlling DPDK processing data packets threads.
It should be noted that the not technical detail of detailed description in the present embodiment, reference can be made to embodiment of the present invention The resource regulating method based on DPDK provided, details are not described herein again.
By foregoing description it is not difficult to find that compared with prior art, the resource based on DPDK provided in present embodiment Dispatching device, the first control module is based on DPDK, and control DPDK processing data packets threads are in a manner of poll from trawl performance In model before transceiving data, determining module passes through the mapping that is based between processor (CPU) and DPDK processing data packets threads Relationship determines and needs fixed DPDK processing data packets threads on a processor so that the use of CPU is more reasonable.In addition, During transceiving data, monitoring modular meets the condition for discharging processor resource by monitoring whether, and is released determining to meet Putting the condition of processor resource is, triggering the second control module control DPDK processing data packets threads stop poll trawl performance mould Type effectively reduces the occupation rate of CPU so that CPU can handle other tasks, to improve the service efficiency of CPU.
Device embodiments described above are only schematical, do not constitute and limit to protection scope of the present invention Fixed, in practical applications, those skilled in the art can select according to the actual needs some or all of module therein It realizes the purpose of present embodiment scheme, is not limited herein.
The 4th embodiment of the present invention is related to a kind of terminal device, and concrete structure is as shown in Figure 4.
The terminal device packet one or more processors 401 and memory 402 are with a processor 401 in Fig. 4 Example.
In the present embodiment, involved in the above embodiment to the resource scheduling device based on DPDK in each function Module is deployed on processor 401, and processor 401 can be connected with memory 402 by bus or other modes, in Fig. 4 For being connected by bus.
Memory 402 is used as a kind of computer readable storage medium, can be used for storing software program, computer can perform journey Sequence and module, as involved in any means embodiment of the present invention judge whether meet release processor resource condition, Specific polling mode etc..Processor 401 is stored in software program, instruction and module in memory 402 by operation, from And various function application and the data processing of execute server, that is, realize the base involved in any means embodiment of the present invention In the resource regulating method of DPDK.
Memory 402 may include storing program area and storage data field, wherein storing program area can store operation system System, the required application program of at least one function;Storage data field can store the data received, or need to send Data etc..Can also include memory in addition, memory 402 may include high-speed random access memory, for example, at least one A disk memory, flush memory device or other solid-state memories.In some embodiments, memory 402 is optional includes The memory remotely located relative to processor 401, these remote memories can pass through network connection to terminal device.It is above-mentioned The example of network includes but not limited to internet, intranet, LAN, mobile radio communication and combinations thereof.
In practical applications, the instruction of the execution of at least one processor 401 can be stored in memory 402, instructed by extremely A few processor 401 executes, so that at least one processor 401 is able to carry out what any means embodiment of the present invention was related to Resource regulating method based on DPDK controls the resource scheduling device 300 based on DPDK and completes the scheduling of resource side based on DPDK Method, the not technical detail of detailed description in the present embodiment, reference can be made to embodiment of the present invention provided based on DPDK's Resource regulating method.
The 5th embodiment of the present invention is related to a kind of readable storage medium storing program for executing.Readable storage medium storing program for executing is specially computer-readable Storage medium is stored with computer instruction in the computer readable storage medium, which enables a computer to execute The resource regulating method based on DPDK involved in any means embodiment of the present invention.
That is, it will be understood by those skilled in the art that realizing all or part of step in the method that the above embodiment is related to Suddenly it is that relevant hardware can be instructed to complete by program, which is stored in a storage medium, including several fingers It enables and using so that an equipment (can be microcontroller, chip etc.) or processor (processor) execute each implementation of the application The all or part of step of example the method.And storage medium above-mentioned includes:USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disc or CD etc. it is various The medium of program code can be stored.
It will be understood by those skilled in the art that the respective embodiments described above are to realize the specific embodiment party of the present invention Formula, and in practical applications, can to it, various changes can be made in the form and details, without departing from the spirit and model of the present invention It encloses.

Claims (10)

1. a kind of resource regulating method based on DPDK, which is characterized in that including:
Based on the mapping relations between processor and DPDK processing data packets threads, determines and need to fix on the processor The DPDK processing data packets thread;
Based on the DPDK, controls the DPDK processing data packets thread and receive and dispatch number from trawl performance model in a manner of poll According to;
If it is determined that meeting the condition for discharging the processor resource, controls the DPDK processing data packets thread and stop described in poll Trawl performance model.
2. the resource regulating method according to claim 1 based on DPDK, which is characterized in that the control DPDK numbers Stop trawl performance model described in poll according to packet processing thread, specifically includes:
Log-on data transmitting-receiving is interrupted, and is controlled the DPDK processing data packets thread and is entered dormant state, stops network interface card described in poll Driving model.
3. the resource regulating method according to claim 2 based on DPDK, which is characterized in that in log-on data transmitting-receiving It is disconnected, it controls the DPDK processing data packets thread and enters dormant state, after stopping trawl performance model described in poll, the base Further include in the resource regulating method of DPDK:
If monitoring data, the DPDK processing data packets thread is waken up, the data transmit-receive is closed and interrupts;
Control DPDK processing data packets thread transceiving data from the trawl performance model in a manner of poll.
4. the resource regulating method based on DPDK according to claims 1 to 3 any one, which is characterized in that based on Mapping relations between processor and DPDK processing data packets threads determine and need the fixed DPDK on the processor Before processing data packets thread, the resource regulating method based on DPDK further includes:
The trawl performance model is initialized, and establishes processor pass corresponding with the trawl performance model System.
5. the resource regulating method based on DPDK according to claims 1 to 3 any one, which is characterized in that described true It is fixed to meet the condition for discharging the processor resource, it specifically includes:
The accumulative read-around ratio for not being polled to data, if the read-around ratio for not being polled to data is not less than first threshold, really It is fixed to meet the condition for discharging the processor resource;
And/or the accumulative continuous duration for not being polled to data, if the continuous duration for not being polled to data is not less than the second threshold Value determines the condition for meeting and discharging the processor resource.
6. the resource regulating method based on DPDK according to claims 1 to 3 any one, which is characterized in that the base Mapping relations between processor and DPDK processing data packets threads determine and need fixed on the processor described Before DPDK processing data packets threads, the resource regulating method based on DPDK further includes:
Obtain sample data;Wherein, the sample data is the data that the DPDK processing data packets thread can be received and dispatched;
According to the sample data, the data scale and data characteristics in predetermined period are determined;
According to the data scale and the data characteristics, determining needs the processor to be used and needs to create described DPDK processing data packets threads, and establish the mapping relations between the processor and the DPDK processing data packets thread.
7. the resource regulating method according to claim 6 based on DPDK, which is characterized in that the sample data uses net Network captures and/or the mode of system monitoring obtains.
8. a kind of resource scheduling device based on DPDK, which is characterized in that including:Determining module, judges mould at the first control module Block and the second control module;
The determining module, for based on the mapping relations between processor and DPDK processing data packets threads, determining and needing admittedly The fixed DPDK processing data packets thread on the processor;
First control module controls the DPDK processing data packets thread in a manner of poll for being based on the DPDK The transceiving data from trawl performance model;
The judgment module meets the condition for discharging the processor resource for monitoring whether, and meets release institute determining When stating the condition of processor resource, second control module is triggered;
Second control module stops trawl performance model described in poll for controlling the DPDK processing data packets thread.
9. a kind of terminal device, which is characterized in that including:
At least one processor;And
The memory being connect at least one processor communication;Wherein,
The memory is stored with the instruction that can be executed by least one processor, and described instruction is by least one place Manage device execute so that at least one processor be able to carry out as described in claim 1 to 7 any one based on DPDK Resource regulating method.
10. a kind of readable storage medium storing program for executing, which is characterized in that the readable storage medium storing program for executing is computer readable storage medium, described It is stored with computer program in computer readable storage medium, is realized when the computer program is executed by processor as right is wanted Seek the resource regulating method based on DPDK described in 1 to 7 any one.
CN201810036566.8A 2018-01-15 2018-01-15 Resource regulating method, device, terminal device based on DPDK and readable storage medium storing program for executing Pending CN108345502A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810036566.8A CN108345502A (en) 2018-01-15 2018-01-15 Resource regulating method, device, terminal device based on DPDK and readable storage medium storing program for executing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810036566.8A CN108345502A (en) 2018-01-15 2018-01-15 Resource regulating method, device, terminal device based on DPDK and readable storage medium storing program for executing

Publications (1)

Publication Number Publication Date
CN108345502A true CN108345502A (en) 2018-07-31

Family

ID=62960785

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810036566.8A Pending CN108345502A (en) 2018-01-15 2018-01-15 Resource regulating method, device, terminal device based on DPDK and readable storage medium storing program for executing

Country Status (1)

Country Link
CN (1) CN108345502A (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109271268A (en) * 2018-09-04 2019-01-25 山东超越数控电子股份有限公司 A kind of intelligent fault-tolerance method based on DPDK
CN109445944A (en) * 2018-10-25 2019-03-08 武汉虹旭信息技术有限责任公司 A kind of network data acquisition processing system and its method based on DPDK
CN110286743A (en) * 2019-07-03 2019-09-27 浪潮云信息技术有限公司 A kind of data center's power-saving method, terminal, computer readable storage medium
CN110636139A (en) * 2019-10-15 2019-12-31 广州市品高软件股份有限公司 Optimization method and system for cloud load balancing
CN110768994A (en) * 2019-10-30 2020-02-07 中电福富信息科技有限公司 Method for improving SIP gateway performance based on DPDK technology
CN110928698A (en) * 2018-09-19 2020-03-27 阿里巴巴集团控股有限公司 Data transmitting and receiving control method and device, computing equipment and storage medium
CN110968403A (en) * 2018-09-28 2020-04-07 深信服科技股份有限公司 CPU work control method, device, equipment and storage medium
CN110968402A (en) * 2018-09-28 2020-04-07 深信服科技股份有限公司 CPU work control method, device, equipment and storage medium
CN111200541A (en) * 2019-12-31 2020-05-26 山石网科通信技术股份有限公司 Network data processing method and device
CN111211942A (en) * 2020-01-03 2020-05-29 山东超越数控电子股份有限公司 Data packet receiving and transmitting method, equipment and medium
CN112817772A (en) * 2019-11-15 2021-05-18 深信服科技股份有限公司 Data communication method, device, equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104753711A (en) * 2013-12-31 2015-07-01 华为技术有限公司 Method and device for adjusting resource allocation of network equipment
CN105357151A (en) * 2015-11-19 2016-02-24 成都科来软件有限公司 DPDK-based packet capture and mirror image flow forwarding method
US20160226821A1 (en) * 2015-01-30 2016-08-04 Nicira, Inc. Datapath with service stages
CN106549869A (en) * 2015-09-21 2017-03-29 北京信威通信技术股份有限公司 Data package processing method and device
US20170187621A1 (en) * 2015-12-29 2017-06-29 Amazon Technologies, Inc. Connectionless reliable transport
CN107132903A (en) * 2016-02-29 2017-09-05 中兴通讯股份有限公司 A kind of administration of energy conservation implementation method, device and the network equipment
CN107360268A (en) * 2017-06-23 2017-11-17 北京奇艺世纪科技有限公司 A kind of data package processing method, device and equipment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104753711A (en) * 2013-12-31 2015-07-01 华为技术有限公司 Method and device for adjusting resource allocation of network equipment
US20160226821A1 (en) * 2015-01-30 2016-08-04 Nicira, Inc. Datapath with service stages
CN106549869A (en) * 2015-09-21 2017-03-29 北京信威通信技术股份有限公司 Data package processing method and device
CN105357151A (en) * 2015-11-19 2016-02-24 成都科来软件有限公司 DPDK-based packet capture and mirror image flow forwarding method
US20170187621A1 (en) * 2015-12-29 2017-06-29 Amazon Technologies, Inc. Connectionless reliable transport
CN107132903A (en) * 2016-02-29 2017-09-05 中兴通讯股份有限公司 A kind of administration of energy conservation implementation method, device and the network equipment
CN107360268A (en) * 2017-06-23 2017-11-17 北京奇艺世纪科技有限公司 A kind of data package processing method, device and equipment

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109271268A (en) * 2018-09-04 2019-01-25 山东超越数控电子股份有限公司 A kind of intelligent fault-tolerance method based on DPDK
CN110928698B (en) * 2018-09-19 2023-06-16 阿里巴巴集团控股有限公司 Data receiving and transmitting control method and device, computing equipment and storage medium
CN110928698A (en) * 2018-09-19 2020-03-27 阿里巴巴集团控股有限公司 Data transmitting and receiving control method and device, computing equipment and storage medium
CN110968403A (en) * 2018-09-28 2020-04-07 深信服科技股份有限公司 CPU work control method, device, equipment and storage medium
CN110968402A (en) * 2018-09-28 2020-04-07 深信服科技股份有限公司 CPU work control method, device, equipment and storage medium
CN109445944A (en) * 2018-10-25 2019-03-08 武汉虹旭信息技术有限责任公司 A kind of network data acquisition processing system and its method based on DPDK
CN110286743A (en) * 2019-07-03 2019-09-27 浪潮云信息技术有限公司 A kind of data center's power-saving method, terminal, computer readable storage medium
CN110636139B (en) * 2019-10-15 2020-07-31 广州市品高软件股份有限公司 Optimization method and system for cloud load balancing
CN110636139A (en) * 2019-10-15 2019-12-31 广州市品高软件股份有限公司 Optimization method and system for cloud load balancing
CN110768994B (en) * 2019-10-30 2022-01-11 中电福富信息科技有限公司 Method for improving SIP gateway performance based on DPDK technology
CN110768994A (en) * 2019-10-30 2020-02-07 中电福富信息科技有限公司 Method for improving SIP gateway performance based on DPDK technology
CN112817772A (en) * 2019-11-15 2021-05-18 深信服科技股份有限公司 Data communication method, device, equipment and storage medium
CN112817772B (en) * 2019-11-15 2023-12-29 深信服科技股份有限公司 Data communication method, device, equipment and storage medium
CN111200541A (en) * 2019-12-31 2020-05-26 山石网科通信技术股份有限公司 Network data processing method and device
CN111200541B (en) * 2019-12-31 2022-04-12 山石网科通信技术股份有限公司 Network data processing method and device
CN111211942A (en) * 2020-01-03 2020-05-29 山东超越数控电子股份有限公司 Data packet receiving and transmitting method, equipment and medium

Similar Documents

Publication Publication Date Title
CN108345502A (en) Resource regulating method, device, terminal device based on DPDK and readable storage medium storing program for executing
CN105718479B (en) Execution strategy generation method and device under cross-IDC big data processing architecture
Hwang et al. {TCP}{≈}{RDMA}:{CPU-efficient} Remote Storage Access with i10
RU2577476C2 (en) Method, apparatus and system for scheduling processor core in multiprocessor core system
CN100474240C (en) Systems and methods for implementing an operating system in a virtual machine environment
CN102111337B (en) Method and system for task scheduling
CN106506670B (en) A kind of cloud platform virtual resource high speed dispatching method and system
CN106557369A (en) A kind of management method and system of multithreading
CN111052086A (en) Warm start technology of cloud hosting function
CN104102543A (en) Load regulation method and load regulation device in cloud computing environment
CN103902646A (en) Distributed task managing system and method
CN109445944A (en) A kind of network data acquisition processing system and its method based on DPDK
CN109684074A (en) Physical machine resource allocation methods and terminal device
CN106776395B (en) A kind of method for scheduling task and device of shared cluster
CN104113585A (en) Hardware Level Generated Interrupts Indicating Load Balancing Status For A Node In A Virtualized Computing Environment
CN103823706B (en) A kind of plant model analog simulation real-time scheduling method based on RTLinux
DE112011101321T5 (en) Querying performance data on a parallel computer system having compute nodes
CN110362392A (en) A kind of ETL method for scheduling task, system, equipment and storage medium
Lai et al. Sol: Fast distributed computation over slow networks
CN109684078A (en) Resource dynamic distributing method and system for spark streaming
DE102019105881A1 (en) TECHNOLOGIES FOR PROVIDING EFFICIENT DETECTION OF EMPTYING QUALITY GRINDING
DE102020114142A1 (en) TECHNOLOGIES FOR INTERRUPT DISASSOCIATED QUEENING FOR MULTI-QUEUE I / O DEVICES
CN101799772B (en) Kernel dispatching method, kernel backup method and multi-core processor
CN108268546A (en) A kind of method and device for optimizing database
CN104598311A (en) Method and device for real-time operation fair scheduling for Hadoop

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

Application publication date: 20180731

RJ01 Rejection of invention patent application after publication