CN105512342B - The persistency method that memory transaction based on HTM and NVRAM calculates - Google Patents
The persistency method that memory transaction based on HTM and NVRAM calculates Download PDFInfo
- Publication number
- CN105512342B CN105512342B CN201610005809.2A CN201610005809A CN105512342B CN 105512342 B CN105512342 B CN 105512342B CN 201610005809 A CN201610005809 A CN 201610005809A CN 105512342 B CN105512342 B CN 105512342B
- Authority
- CN
- China
- Prior art keywords
- nvram
- htm
- data
- affairs
- persistency
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The persistency method for the memory transaction calculating based on HTM and NVRAM that the present invention provides a kind of, comprising: step 1: distribution NVRAM, and the data modified in the affairs executed with the NVRAM of distribution record HTM;Step 2: checking the need for cleaning NVRAM, if desired clear up, then the data of the NVRAM are write back into disk.The present invention utilizes the characteristic of NVRAM and HTM, so that businesslike program is not needed to record data to disk and can be returned, it in this way can be with the persistence of low latency realizing memory transaction and calculating.The present invention can significantly reduce the delay of Database Systems affairs execution, promote the resource utilization of Database Systems and the performance of application service.
Description
Technical field
The present invention relates to memory database issued transaction fields, and in particular, to a kind of memory based on HTM and NVRAM
The persistency method that transactional calculates.
Background technique
The persistence of db transaction is the important feature of Database Systems, and whether the data for being directly related to user can lose
It loses.Existing solution predominantly writes data into and submits affairs in disk again.Problem brought by this way is due to disk
Delay with higher is read and write, can significantly increase the delay of memory transaction calculating in this way.
Hardware transactional memory HTM (Hardware transactional memory) is transactional memory computing technique,
Provide the atomicity and isolation of program execution.And HTM efficiently realizes these characteristics very much.However HTM is not
Persistent support is provided.
Persistence memory NVRAM (Non-volatile RAM) is that a kind of new memory techniques are all protected there are many realizing
Card can ensure that the persistence of data if data are written in the memory.Delay and convential memory due to the read-write of NVRAM
With comparable delay, while many faster than write magnetic disk.
Although HTM can be executed efficiently very much, working set is restricted, therefore can not in the execution of HTM
Access excessive memory.Simultaneously as the size of NVRAM is also restricted, thus how it is effective how in HTM using NVRAM come
There is challenges for the modification of record affairs.Since database persistent request data are eventually stored in disk, still
Effective method is needed finally to write back to the log that NVRAM is recorded in disk.
Currently, existing HTM system generallys use batch processing to be reduced regularly to write the modification of affairs in disk
The expense of disk can bring very high delay in this way.And using the Database Systems of NVRAM, there is no supported using HTM
The isolation and atomicity of db transaction be not high compared to HTM throughput of system in this way.Therefore how it to be directed to HTM, in conjunction with
NVRAM rationally designs memory database affairs persistence method, reduces the delay that affairs execute, efficiently realizes internal storage data
The persistence of library affairs has become those skilled in the art's technical problem urgently to be resolved in fact.
Summary of the invention
For the defects in the prior art, the object of the present invention is to provide a kind of memory transactions based on HTM and NVRAM
The persistency method of calculating.
The persistency method that the memory transaction based on HTM and NVRAM provided according to the present invention calculates, including walk as follows
It is rapid:
Step 1: distribution NVRAM, and the data modified in the affairs executed with the NVRAM of distribution record HTM;
Step 2: checking the need for cleaning NVRAM, if desired clear up, then the data of the NVRAM are write back into disk.
Preferably, the step 1 includes:
Step 1.1: before affairs start, allocating NVRAM in advance and be used to record the internal storage data that affairs need to modify;
If NVRAM is inadequate, it is allocated again after waiting liquidation procedures informing there are enough NVRAM;When NVRAM is distributed
At NVRAM used in rear label are as follows: inseparable to match;
Step 1.2: after modifying to certain data, the version number of data is added when entering HTM execution for affairs
One, and the version number of data and modified value are recorded in pre-assigned NVRAM.
Preferably, the step 2 includes:
Step 2.1: liquidation procedures has periodically checked whether that enough NVRAM can be allocated, if discovery is not enough
NVRAM then writes back to the data for being partially designated as indistributable NVRAM in disk, and by these NVRAM labeled as available;
Step 2.2: liquidation procedures informs that the affairs of the NVRAM to be allocated such as all start to distribute.
Compared with prior art, the present invention have it is following the utility model has the advantages that
1, the method in the present invention realizes db transaction persistence using lower delay using NVRAM and HTM,
This method in HTM by recording data in NVRAM, so that the data in NVRAM are submitted data, this
Whether there is no need to additional agreements submitted come the data for checking NVRAM for sample, at the same will not be executed to affairs bring it is additional
Delay, also without waiting for data and be written back in disk to submit affairs again, to substantially reduce the delay of affairs execution.
2, the present invention utilizes hardware institute using the memory database system that can directly support using HTM to the greatest extent
The performance advantage of offer, so efficient memory database system of bring have high-throughput and low latency, database it is whole
Body performance is very good while can also promote the experience of user.
Detailed description of the invention
Upon reading the detailed description of non-limiting embodiments with reference to the following drawings, other feature of the invention,
Objects and advantages will become more apparent upon:
Fig. 1 is the logical flow chart of the memory transaction persistency method based on HTM and NVRAM in the present invention;
Fig. 2 is the NVRAM Memory Allocation and recycling of the memory transaction persistency method based on HTM and NVRAM in the present invention
Mechanism principle figure.
Specific embodiment
The present invention is described in detail combined with specific embodiments below.Following embodiment will be helpful to the technology of this field
Personnel further understand the present invention, but the invention is not limited in any way.It should be pointed out that the ordinary skill of this field
For personnel, without departing from the inventive concept of the premise, various modifications and improvements can be made.These belong to the present invention
Protection scope.
The present invention uses the hardware technology of HTM and NVRAM, realizes the persistence of db transaction system.
Specifically, as shown in FIG. 1, FIG. 1 is the logical flow charts of the memory transaction persistency method based on HTM and NVRAM.
Step S1: affairs have checked whether enough NVRAM to be allocated, if there is then marking the NVRAM of needs to be
It is inseparable to match;If waiting enough NVRAM to be marked as re-starting distribution again after can be used without enough NVRAM.
Step S2: affairs are when executing affairs using HTM, if necessary to modify to some data, then by this number
According to version number add 1, and the new version number of this data and new data are recorded in the NVRAM of step S1 distribution.
Step S3: liquidation procedures has periodically checked whether that NVRAM is marked as needing to clear up, will be in the NVRAM if having
Data write back in disk, then again by this block NVRAM labeled as can distribute, and notify etc. that affairs to be allocated start point
With NVRAM.
Further specifically, distribution and the cleaning algorithm of NVRAM are as shown in Fig. 2, all NVRAM are divided into two greatly
Block, wherein there are many segment NVRAM again for distribution for each bulk.Wherein there is a NVRAM as currently used
NVRAM.The affairs each to be executed in step sl are by checking in currently used NVRAM whether have in enough fritters
The data (white blocks of Fig. 2) for carrying out the modification that logging program will carry out are deposited, if there is then directly marking these fritters are as follows: no
(black block of Fig. 2) can be used, and start to execute affairs.The bulk memory is labeled as needing to clear up (Fig. 2 arrow if not
Head), while currently used NVRAM is switched to another NVRAM bulk.If the label of NVRAM currently used at this time
Still to need to clear up, then it is waited to become to distribute.Otherwise NVRAM is allocated in new current NVRAM, and will be after distribution
NVRAM label are as follows: it is inseparable to match.
Whether liquidation procedures can be inspected periodically currently has the label of bulk for cleaning.If there is then by data therein
It writes in disk, is labeled as to distribute by the bulk of cleaning again after the completion of disk write operation.Cleaning work is just completed.
In conclusion the memory transaction persistency method proposed by the present invention based on HTM and NVRAM, can not have to wait until
The data of affairs modification are written in disk the persistence that can guarantee affairs, so can submission affairs earlier, significantly
Reduce the delay that memory transaction executes.To improve the overall performance and user experience of memory database transaction system.
Specific embodiments of the present invention are described above.It is to be appreciated that the invention is not limited to above-mentioned
Particular implementation, those skilled in the art can make various deformations or amendments within the scope of the claims, this not shadow
Ring substantive content of the invention.
Claims (2)
1. a kind of persistency method that the memory transaction based on HTM and NVRAM calculates, which comprises the steps of:
Step 1: distribution NVRAM, and the data modified in the affairs executed with the NVRAM of distribution record HTM;
Step 2: checking the need for cleaning NVRAM, if desired clear up, then the data of the NVRAM are write back into disk;
The step 1 includes:
Step 1.1: before affairs start, allocating NVRAM in advance and be used to record the internal storage data that affairs need to modify;
If NVRAM is inadequate, it is allocated again after waiting liquidation procedures informing there are enough NVRAM;After NVRAM is assigned
Label NVRAM used are as follows: inseparable to match;
Step 1.2: the version number of data after modifying to certain data, is added one when entering HTM and executing by affairs, and
The version number of data and modified value are recorded in pre-assigned NVRAM.
2. the persistency method that the memory transaction according to claim 1 based on HTM and NVRAM calculates, feature exist
In the step 2 includes:
Step 2.1: liquidation procedures has periodically checked whether that enough NVRAM can be allocated, if discovery is not enough
NVRAM, then the data by part labeled as indistributable NVRAM write back in disk, and these NVRAM are marked are as follows: can
Distribution;
Step 2.2: liquidation procedures informs that the affairs of the NVRAM to be allocated such as all start to distribute.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610005809.2A CN105512342B (en) | 2016-01-05 | 2016-01-05 | The persistency method that memory transaction based on HTM and NVRAM calculates |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610005809.2A CN105512342B (en) | 2016-01-05 | 2016-01-05 | The persistency method that memory transaction based on HTM and NVRAM calculates |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105512342A CN105512342A (en) | 2016-04-20 |
CN105512342B true CN105512342B (en) | 2019-03-26 |
Family
ID=55720322
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610005809.2A Active CN105512342B (en) | 2016-01-05 | 2016-01-05 | The persistency method that memory transaction based on HTM and NVRAM calculates |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105512342B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114691307A (en) * | 2022-03-16 | 2022-07-01 | 阿里巴巴(中国)有限公司 | Transaction processing method and computer system |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CA2387087A1 (en) * | 1999-10-27 | 2001-05-03 | British Telecommunications Public Limited Company | Distributed database management system |
US20040181510A1 (en) * | 2003-01-16 | 2004-09-16 | Jardin Cary A. | System and method for cooperative database acceleration |
CN103279406B (en) * | 2013-05-31 | 2015-12-23 | 华为技术有限公司 | A kind of partition method of internal memory and device |
CN103678180B (en) * | 2013-11-29 | 2017-11-24 | 武汉天喻信息产业股份有限公司 | The management method of intelligent card nonvolatile memory |
CN104778126B (en) * | 2015-04-20 | 2017-10-24 | 清华大学 | Transaction Information storage optimization method and system in non-volatile main |
CN104881371B (en) * | 2015-05-29 | 2018-02-09 | 清华大学 | Persistence memory transaction handles buffer memory management method and device |
-
2016
- 2016-01-05 CN CN201610005809.2A patent/CN105512342B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN105512342A (en) | 2016-04-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Wang et al. | Concurrent analytical query processing with GPUs | |
US20230185607A1 (en) | Hardware accelerated dynamic work creation on a graphics processing unit | |
US8484438B2 (en) | Hierarchical bloom filters for facilitating concurrency control | |
EP2972885B1 (en) | Memory object reference count management with improved scalability | |
US9135262B2 (en) | Systems and methods for parallel batch processing of write transactions | |
CN107368362B (en) | Multithreading/multiprocessing lock-free processing method and system for disk read-write data | |
US6848021B2 (en) | Efficient data backup using a single side file | |
JP2010524133A5 (en) | ||
US10019363B2 (en) | Persistent memory versioning and merging | |
US11609786B2 (en) | Hierarchical register file device based on spin transfer torque-random access memory | |
CN109033359A (en) | A kind of method of multi-process secure access sqlite | |
CN113688099B (en) | SPDK-based database storage engine acceleration method and system | |
CN113220490A (en) | Transaction persistence method and system for asynchronous write-back persistent memory | |
CN105512342B (en) | The persistency method that memory transaction based on HTM and NVRAM calculates | |
Gough et al. | Kernel scalability—expanding the horizon beyond fine grain locks | |
US11734014B2 (en) | Device and processor for implementing resource index replacement | |
US20110247018A1 (en) | API For Launching Work On a Processor | |
Abadir et al. | An improved layout verification algorithm (LAVA) | |
CN115525226A (en) | Hardware batch fingerprint calculation method, device and equipment | |
WO2019008715A1 (en) | Data loading program, data loading method, and data loading device | |
CN116820333B (en) | SSDRAID-5 continuous writing method based on multithreading | |
CN117093508B (en) | Memory resource management method and device, electronic equipment and storage medium | |
CN118069071B (en) | Resource access control method, device, computer equipment and storage medium | |
CN117435353B (en) | Comprehensive optimization method for high-frequency checkpoint operation | |
KR102701385B1 (en) | Operation method of Flash memory storage device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |