JP6034467B2 - system - Google Patents

system Download PDF

Info

Publication number
JP6034467B2
JP6034467B2 JP2015209305A JP2015209305A JP6034467B2 JP 6034467 B2 JP6034467 B2 JP 6034467B2 JP 2015209305 A JP2015209305 A JP 2015209305A JP 2015209305 A JP2015209305 A JP 2015209305A JP 6034467 B2 JP6034467 B2 JP 6034467B2
Authority
JP
Japan
Prior art keywords
key
address
value
storage location
stored
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.)
Expired - Fee Related
Application number
JP2015209305A
Other languages
Japanese (ja)
Other versions
JP2016021264A (en
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.)
Toshiba Corp
Original Assignee
Toshiba Corp
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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP2015209305A priority Critical patent/JP6034467B2/en
Publication of JP2016021264A publication Critical patent/JP2016021264A/en
Application granted granted Critical
Publication of JP6034467B2 publication Critical patent/JP6034467B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Description

本発明の実施形態は、ホストシステムによりアクセスされる、key−valueストア方式を有するメモリシステムに関する。   Embodiments described herein relate generally to a memory system having a key-value store scheme that is accessed by a host system.

一般的なホストシステム、例えばコンピュータシステムが備えるストレージ装置として、磁気式のハードディスクドライブ(HDD)や不揮発性半導体メモリを搭載する固体ドライブ(SSD)などがある。SSDはストレージに分類されるが、規模と機能が拡張されたメモリシステムともいえる。   As a storage device included in a general host system, for example, a computer system, there are a magnetic hard disk drive (HDD), a solid-state drive (SSD) equipped with a nonvolatile semiconductor memory, and the like. Although SSD is classified as storage, it can be said that it is a memory system whose scale and function are expanded.

メモリシステムは、例えば、インターフェースと、第1のメモリブロックと、第2のメモリブロックと、コントローラから構成される。第1のメモリブロックはデータとしてのファイルを格納し、第2のメモリブロックはデータ書き込み/読み出し時におけるバッファメモリである。第1のメモリブロックは、第2のメモリブロックよりも、不揮発・大容量であるがアクセス速度が遅い。第2のメモリブロックは、インターフェースの通信速度と、第1のメモリブロックの書き込み/読み出し速度との速度差を補うために使用される。例えば、第1のメモリブロックは不揮発性のフラッシュメモリであり、第2のメモリブロックは揮発性のDRAMもしくはSRAMである。このような従来のストレージ型のメモリシステムでは、アドレス指定によるデータ書き込み/読み出し機能を実現するための構成をとっている。   The memory system includes, for example, an interface, a first memory block, a second memory block, and a controller. The first memory block stores a file as data, and the second memory block is a buffer memory at the time of data writing / reading. The first memory block is non-volatile and has a larger capacity than the second memory block, but the access speed is slower. The second memory block is used to compensate for the speed difference between the communication speed of the interface and the writing / reading speed of the first memory block. For example, the first memory block is a non-volatile flash memory, and the second memory block is a volatile DRAM or SRAM. Such a conventional storage-type memory system has a configuration for realizing a data write / read function by address designation.

一方、メモリシステムに保存されている、あるテキストに関連付けられた別のテキストや、バイナリファイルにおける特定のビットパターン、動画ファイルにおける特定パターン、音声ファイルにおける特徴的な音声パターンなどのデータを効率的に取り出すためには、データ指定によるデータ読み出し機能を持たせることが望ましい。このため、通常のデータ保存のみならず、データに関連付けられたメタデータを付属させて保存しておき、所望のデータを得るためにメタデータを参照する方法が用いられる。   On the other hand, data such as another text associated with a certain text stored in a memory system, a specific bit pattern in a binary file, a specific pattern in a video file, and a characteristic audio pattern in an audio file can be efficiently used. In order to retrieve the data, it is desirable to have a data read function by data designation. For this reason, not only normal data storage but also a method in which metadata associated with data is attached and stored, and the metadata is referred to in order to obtain desired data.

メタデータの管理方法としては、大きく二つに分けられ、表形式のデータベース型と、1対1にデータが対応したkey−value store(KVS)方式とがある。KVS方式では、検索要求としてkeyが与えられると、それに対応付けられていたvalueが出力される。   Metadata management methods can be broadly divided into two types: a table-type database type and a key-value store (KVS) method in which data correspond one-to-one. In the KVS system, when a key is given as a search request, the value associated with it is output.

従来システムでKVS方式を実現するには、メモリシステム内に格納されたデータの管理や複数のメタデータを、ホストシステムの主記憶装置(DRAM)にデータを展開した上で、中央演算装置(CPU)を使用して演算を施した後に再びストレージからデータを読み出して照合するという、繰り返しのデータ入出力処理を実施している。   In order to realize the KVS system in the conventional system, after managing the data stored in the memory system and a plurality of metadata in the main memory (DRAM) of the host system, the central processing unit (CPU) ) Is used to repeatedly perform data input / output processing in which data is read from the storage and verified again.

従来システムでのkey−value store(KVS)方式とその問題点を説明する。   The key-value store (KVS) method in the conventional system and its problems will be described.

従来型SSDでKVS方式を実現する場合、データはファイルとして保存され、データに付属するkey−value型データ(あるいはkey−valueペア)のメタデータもまたファイルとして保存されている。すなわち、key−valueストア方式を実現しているのはファイルシステム以上の上位システムであって、OSに実装されたファイルシステムあるいはアプリケーションである。   When the KVS method is realized by the conventional SSD, the data is stored as a file, and the metadata of the key-value type data (or key-value pair) attached to the data is also stored as a file. In other words, the key-value store method is realized by a host system higher than the file system, and is a file system or application implemented in the OS.

この場合、汎用的なハードウェア構成でkey−valuストア方式を実現できるという利点はあるものの、メタデータの取り扱いが通常のデータと同じであるため、メタデータの読み出し/書き込みあるいは検索操作は、ホストシステムがメタデータファイルをメインメモリ(例えば、DRAM)に読み出してから扱うことになる。これにより、例えば以下のような少なくとも3つの問題点が生じる。   In this case, although there is an advantage that the key-value store method can be realized with a general-purpose hardware configuration, since handling of metadata is the same as normal data, read / write or search operations of metadata are performed by the host. The system reads the metadata file into the main memory (for example, DRAM) and handles it. This causes, for example, at least three problems as follows.

第1に、ファイルアクセス性能が低下する。一般的に、メインメモリのサイズはSSDと比較して小さいため、メインメモリサイズよりも大きなメタデータファイルは一度に取り扱うことができない。このため、メタデータファイルは、例えばkey毎に分割化しておき、扱い易いサイズのメタデータファイルを必要に応じてメインメモリに読み出してから利用することになる。必要なkey−valueが得られるまでこの過程が繰り返され、メタデータファイルの数に応じたファイルアクセスがSSDに対して発生するため、SSDのファイルアクセス速度が、メタデータ読み出し要求の速度よりも遅い場合、ホストシステムおよびローカルシステム(メモリシステム)の全体を律速してしまう。   First, file access performance is degraded. In general, since the size of the main memory is smaller than that of the SSD, a metadata file larger than the main memory size cannot be handled at a time. For this reason, the metadata file is divided for each key, for example, and a metadata file having an easy-to-handle size is read out to the main memory as needed and used. This process is repeated until the required key-value is obtained, and file access corresponding to the number of metadata files occurs for the SSD, so the SSD file access speed is slower than the metadata read request speed. In this case, the entire host system and local system (memory system) are limited.

第2に、CPUの負荷が増大する。メタデータの作成、管理、照合(検索)はすべてCPUによって処理されるため、メタデータ処理の間、CPUに負荷が生じる。特に、メタデータはデータに対応して作成されているため、データを更新した際には、対応するメタデータをメタデータファイルの中から探し出して更新する必要がある。また、メタデータを検索する仕組みもCPUでソフトウェアアルゴリズムを駆使して行わねばならないため、結局CPUはメタデータ管理のための負荷を新たに生じることになる。   Second, the load on the CPU increases. Since creation, management, and collation (search) of metadata are all processed by the CPU, a load is imposed on the CPU during the metadata processing. In particular, since the metadata is created corresponding to the data, when the data is updated, it is necessary to find and update the corresponding metadata from the metadata file. In addition, since a mechanism for searching for metadata must be performed by using a software algorithm in the CPU, the CPU eventually creates a new load for metadata management.

第3に、バスあるいはインターフェースへの負荷が増大する。第1、第2の問題点の結果、ホストシステムとローカルシステム(メモリシステム)との間はメタデータ情報が頻繁に行き来することになり、バス及びインターフェース部のトラフィックが増大する。   Third, the load on the bus or interface increases. As a result of the first and second problems, metadata information frequently goes back and forth between the host system and the local system (memory system), increasing the traffic on the bus and the interface unit.

特開2005−209214号公報JP 2005-209214 A 特許第4167359号明細書Japanese Patent No. 4167359

メタデータに対する操作要求をkey−valueストア方式によって効率的かつ高速に処理することができるメモリシステムを提供する。   Provided is a memory system that can efficiently and quickly process an operation request for metadata by a key-value store method.

一実施態様のシステムは、インターフェースを介して、ホストからコマンドを受けて前記ホストにデータを転送するシステムにおいて、keyと前記keyに対応するvalueの組であるkey−value型データを含むメタデータテーブルと、データ領域とを格納する不揮発性メモリと、前記不揮発性メモリにアクセスするコントローラとを備え、前記メタデータテーブルの第1アドレスが指定する記憶場所には、前記key−value型データが記憶され、前記第1アドレスが指定する記憶場所に記憶されたvalueには、前記データ領域における記憶場所を示す第2アドレスが記憶され、前記第2アドレスが指定する記憶場所には、前記valueが記憶された記憶場所を示す第3アドレスと、前記keyとが格納され、前記コントローラは、前記ホストから、前記keyに関連付けられたvalueの登録を命ずるコマンドが入力されたとき、前記keyが前記メタデータテーブルに存在するかを検索し、前記keyが前記メタデータテーブルに存在していないとき、前記keyに関連付けられた前記valueが前記データ領域に保存されているかを判定し、前記valueが前記データ領域に保存されていないとき、前記valueを前記データ領域の第4アドレスが指定する記憶場所に保存し、前記valueが前記データ領域に保存されているとき、前記メタデータテーブルの第5アドレスが指定する記憶場所に、前記keyと、前記valueが保存された前記第4アドレスを登録するA system according to an embodiment includes a metadata table including key-value type data that is a set of a key and a value corresponding to the key in a system that receives a command from a host and transfers data to the host via an interface. And a non-volatile memory for storing the data area, and a controller for accessing the non-volatile memory, and the key-value type data is stored in a storage location specified by the first address of the metadata table. The value stored in the storage location specified by the first address stores the second address indicating the storage location in the data area, and the value is stored in the storage location specified by the second address. A third address indicating the storage location and the key are stored, When a command for registering a value associated with the key is input from the host, the controller searches whether the key exists in the metadata table, and the key exists in the metadata table. If not, it is determined whether or not the value associated with the key is stored in the data area. If the value is not stored in the data area, the value is designated by the fourth address of the data area. When the value is stored in the data area, the key and the fourth address storing the value are stored in the storage location specified by the fifth address of the metadata table. Register .

第1のメモリブロック内の実データ領域とメタデータテーブルとの関係、及びkey−valueストア方式の仕組みを模式的に示す図である。It is a figure which shows typically the relationship between the real data area in a 1st memory block, and a metadata table, and the mechanism of a key-value store system. 図1における要素と集合の関係を示す図である。It is a figure which shows the relationship between the element in FIG. 1, and a set. key−valueストア方式における具体的な処理手順を示すフローチャートである。It is a flowchart which shows the specific process sequence in a key-value store system. key−valueストア方式における具体的な処理手順を示すフローチャートである。It is a flowchart which shows the specific process sequence in a key-value store system. key−valueストア方式における具体的な処理手順を示すフローチャートである。It is a flowchart which shows the specific process sequence in a key-value store system. key−valueストア方式における具体的な処理手順を示すフローチャートである。It is a flowchart which shows the specific process sequence in a key-value store system. 第1実施形態のメモリシステムのハードウェア構成を示すブロック図である。It is a block diagram which shows the hardware constitutions of the memory system of 1st Embodiment. 第2実施形態のメモリシステムのハードウェア構成を示すブロック図である。It is a block diagram which shows the hardware constitutions of the memory system of 2nd Embodiment. 第3実施形態のメモリシステムのハードウェア構成を示すブロック図である。It is a block diagram which shows the hardware constitutions of the memory system of 3rd Embodiment. 第4実施形態のメモリシステムのハードウェア構成を示すブロック図である。It is a block diagram which shows the hardware constitutions of the memory system of 4th Embodiment. 第5実施形態のメモリシステムのハードウェア構成を示すブロック図である。It is a block diagram which shows the hardware constitutions of the memory system of 5th Embodiment. 第6実施形態のメモリシステムのハードウェア構成を示すブロック図である。It is a block diagram which shows the hardware constitutions of the memory system of 6th Embodiment. 第7実施形態のメモリシステムのハードウェア構成を示すブロック図である。It is a block diagram which shows the hardware constitutions of the memory system of 7th Embodiment. 第8実施形態のメモリシステムのハードウェア構成を示すブロック図である。It is a block diagram which shows the hardware constitutions of the memory system of 8th Embodiment. 変形例1の実データ領域とメタデータテーブルとを模式的に示す図である。It is a figure which shows typically the real data area and metadata table of the modification 1. FIG. 変形例2の実データ領域とメタデータテーブルとを模式的に示す図である。It is a figure which shows typically the real data area and metadata table of the modification 2. 変形例3の実データ領域とメタデータテーブルとを模式的に示す図である。It is a figure which shows typically the real data area and metadata table of the modification 3. 変形例3のkey−valueストア方式の他の実現方法を模式的に示す図である。It is a figure which shows typically the other realization method of the key-value store system of the modification 3. 変形例4の実データ領域とメタデータテーブルとを模式的に示す図である。It is a figure which shows typically the real data area and metadata table of the modification 4.

以下の説明において、略同一の機能及び構成を有する構成要素については、同一符号を付し、重複説明は必要な場合にのみ行う。   In the following description, components having substantially the same function and configuration are denoted by the same reference numerals, and redundant description will be given only when necessary.

メモリシステムに保存されるメタデータがkey−valueストア方式で保存される。そのkey−value型データの効率的な保存方法と構成を与えるための実施形態を、図を用いながら説明する。   Metadata stored in the memory system is stored using the key-value store method. An embodiment for providing an efficient storage method and configuration of the key-value type data will be described with reference to the drawings.

<メタデータテーブルとkey−valueストア方式>
まず、本実施形態の基本原理となるメタデータテーブルとkey−valueストア方式について述べる。
<Metadata table and key-value store method>
First, a metadata table and a key-value store system, which are basic principles of the present embodiment, will be described.

図1は、第1のメモリブロック内の実データ領域とメタデータテーブルとの関係、及びkey−valueストア方式の仕組みを模式的に示している。なお、数値や記号は説明のために用いられており、実施形態とは必ずしも対応していない。   FIG. 1 schematically shows the relationship between the actual data area in the first memory block and the metadata table, and the mechanism of the key-value store method. Numerical values and symbols are used for explanation and do not necessarily correspond to the embodiment.

図1に示すように、メモリアクセス可能な物理アドレス空間内には、アドレス指定の実データ領域(実アドレス空間)161と、メタデータテーブル162が存在している。実データ領域161は、従来概念でいうところの論理アドレス空間にそのまま対応する。メタデータテーブル162は、メモリシステム側が適宜用いるデータ領域であるため、ユーザーまたはクライアントが通常利用では明示的にアクセスすることはしない。ただし、システムへのテストコマンドとしては明示的にアクセスすることも許可される。ユーザーは基本的にインターフェースコマンドを用いてメモリシステムに対し、実データあるいはメタデータを操作する要求を投げかけ、メモリシステムは内部で処理した結果、返答としての信号あるいはデータをユーザー(ホストシステム)へ返す。   As shown in FIG. 1, an address-designated real data area (real address space) 161 and a metadata table 162 exist in the physical address space accessible by the memory. The actual data area 161 directly corresponds to the logical address space in the conventional concept. Since the metadata table 162 is a data area that is appropriately used by the memory system side, the user or client does not explicitly access it during normal use. However, explicit access to the system is also permitted as a test command. The user basically sends a request to manipulate the actual data or metadata to the memory system using interface commands, and the memory system returns a signal or data as a response to the user (host system) as a result of internal processing. .

メモリシステムは、論理アドレスを物理アドレスに変換するための論理アドレス−物理アドレス変換テーブルの中で、実データ領域161とメタデータテーブル162の格納領域を区別する。メタデータテーブル162内のメタデータアドレスは、必要に応じて作られるため、key−value型データの作成要求がなければ第1のメモリブロック内に存在しない場合も有り得る。   The memory system distinguishes between storage areas of the actual data area 161 and the metadata table 162 in a logical address-physical address conversion table for converting a logical address into a physical address. Since the metadata address in the metadata table 162 is created as necessary, it may not exist in the first memory block unless there is a request for creating key-value type data.

このように、本実施形態のメモリシステムでのメタデータテーブル162の記憶容量は固定されて設置されているわけではなく、key−valueストア方式に基づく要求に応じて任意に可変(拡張あるいは縮小)されて存在できるものである。このため、ユーザーはメタデータを任意に扱いつつ、アクセス可能な物理メモリ空間が最大効率で利用可能となる。極端に言えば、メタデータをまったく扱わない場合も取り得る。この場合、物理メモリ空間が最大限に利用できる。   As described above, the storage capacity of the metadata table 162 in the memory system according to the present embodiment is not fixed and is arbitrarily set (expanded or reduced) according to a request based on the key-value store method. Can exist. For this reason, the user can use the accessible physical memory space with maximum efficiency while arbitrarily handling the metadata. In extreme terms, it is possible to handle no metadata at all. In this case, the physical memory space can be utilized to the maximum extent.

逆に、メタデータを十分活用した場合は、実データ領域161と同サイズ以上にメタデータテーブル162を拡大する場合もあり得る。この場合でも、メタデータの管理はメモリシステム(ローカルシステム)側の仕事なので、ホストシステム側はメタデータの管理から開放されている。従って、ユーザー(ホストシステム側)は通常利用においてメタデータの管理を意識する必要はなくなる。   Conversely, if the metadata is fully utilized, the metadata table 162 may be enlarged to the same size or more as the actual data area 161. Even in this case, since the management of the metadata is a work on the memory system (local system) side, the host system side is released from the management of the metadata. Therefore, the user (host system side) does not need to be aware of metadata management in normal use.

メタデータテーブル162にはkey−valueペアが保存されているが、データの実態は実データ領域(実アドレス空間)161に存在する。   Although the key-value pair is stored in the metadata table 162, the actual data exists in the actual data area (real address space) 161.

本実施形態でのメタデータテーブル162と実データ領域161の実データとの関係について、key−valueストア方式によるデータ取り出しの具体例を示して説明する。   The relationship between the metadata table 162 and the actual data in the actual data area 161 in this embodiment will be described with reference to a specific example of data extraction by the key-value store method.

key−valueストア(KVS)方式とは、キー(key)と値(value)の組を書き込み、キーを指定することで値を読み出せるデータベース管理方式のことを意味する。KVS方式は、ネットワーク越しに使われる例が多いが、データの格納先はどこかのローカルのメモリあるいはストレージシステムであることは間違いない。メタデータといえども実データアドレス空間内に格納されている。   The key-value store (KVS) system means a database management system in which a set of keys (keys) and values (values) is written, and values can be read by designating the keys. The KVS method is often used over a network, but there is no doubt that the data storage destination is some local memory or storage system. Even metadata is stored in the actual data address space.

データは、通常、保存されているメモリの先頭アドレスを指定することで読み出される。ここで、データをファイルと言い替えても良い。ファイルシステムによっては、実データアドレス空間が、例えば512バイトのセクタ単位で管理される。あるいは、ファイルシステムを限定する必要がなければ、例えばNANDフラッシュメモリの読み出し/書き込みのページサイズである、4KBや8KB単位などで管理されても良い。   Data is normally read by designating the top address of the stored memory. Here, the data may be rephrased as a file. Depending on the file system, the actual data address space is managed in units of 512-byte sectors, for example. Alternatively, if it is not necessary to limit the file system, for example, it may be managed in units of 4 KB or 8 KB which are the page size of reading / writing of the NAND flash memory.

図1に示す実データ領域161には、概念的に実アドレスに対応したファイル(データ)の保存の様子を示している。例えば、&001の実データアドレスにファイルa-file.txtのファイルIDである%a-file.txtが保存され、&002に“This is a book”というファイル内容が保存されているとする。実際は、実データアドレスはバイト単位で管理されるのが一般的なため、&001と&002のように連続するのは特殊な例である。   The actual data area 161 shown in FIG. 1 conceptually shows how a file (data) corresponding to an actual address is stored. For example, it is assumed that% a-file.txt, which is the file ID of the file a-file.txt, is stored at the actual data address & 001, and the file content “This is a book” is stored at & 002. Actually, since the actual data address is generally managed in units of bytes, it is a special example that it is continuous as & 001 and & 002.

図1に示すメタデータテーブル162には、保存されたkey−valueペアが示されている。keyはデータファイルから抽出されたもので、検索対象の要素あるいは集合である。この例ではkeyは集合であり、&001と&011という要素を含む。Valueはkeyが見つかったときに返される値である。この例では“book”という単語を含むデータファイルのファイルIDの集合を、実データアドレス空間のアドレスの形でvalueとして格納している。   The metadata table 162 shown in FIG. 1 shows stored key-value pairs. The key is extracted from the data file and is a search target element or set. In this example, the key is a set and includes elements & 001 and & 011. Value is a value returned when a key is found. In this example, a set of file IDs of data files including the word “book” is stored as values in the form of addresses in the actual data address space.

図1中の手順に従って説明すると、
(i)keyをentryとして入力し、メタデータテーブルからvalueを探す。
(ii)見つかったkeyに対応するvalueは、keyが所属する集合を保存する実データアドレスなので、その実データアドレスを参照する。
(iii)参照された実データアドレスに書かれたデータを出力する。
となる。
According to the procedure in FIG.
(I) Enter key as entry and search for value from metadata table.
(Ii) Since the value corresponding to the found key is an actual data address that stores the set to which the key belongs, the actual data address is referred to.
(Iii) The data written in the referenced actual data address is output.
It becomes.

このような実データアドレスとメタデータテーブルの関係、およびkey−valueペアの関係は、図2(a)及び図2(b)に示すような、要素と集合の関係となっている。   The relationship between the actual data address and the metadata table, and the relationship between the key-value pair is an element-set relationship as shown in FIGS. 2 (a) and 2 (b).

すなわち、通常のファイルでは、図2(b)に示すように、例えば“a-file.txt”というファイル名のファイルが集合であり、“This is a book”というテキストデータのそれぞれの単語が要素である。ファイルIDも1つの要素である。   That is, in a normal file, as shown in FIG. 2 (b), for example, files with a file name “a-file.txt” are a set, and each word of text data “This is a book” is an element. It is. The file ID is also an element.

一方、メタデータテーブル(メタデータアドレス空間)に置かれた場合、図2(a)に示すように、集合と要素の関係が逆転して整理し直された形態をとり得る。すなわち、「転置」の関係に変換されている。“book”という集合の中には、“a-file.txt”、“b-file.txt”というファイル名が要素として保存されることになる。key−value型データでは、この整理し直された集合名(“book”)を検索し、その要素(“a-file.txt”、“b-file.txt”)を求めていることになる。これは、一般に、全文検索で実行されている転置ファイルの作成と、検索手順そのものであって、key−value型データの実用上の一例といえる。   On the other hand, when placed in the metadata table (metadata address space), as shown in FIG. 2A, the relationship between the set and the element can be reversed and rearranged. That is, it is converted into a “transposition” relationship. In the set “book”, file names “a-file.txt” and “b-file.txt” are stored as elements. In the key-value type data, the rearranged set name (“book”) is searched and the elements (“a-file.txt”, “b-file.txt”) are obtained. . In general, this is the creation of a transposed file executed in full-text search and the search procedure itself, which can be said to be a practical example of key-value type data.

転置ファイルとは、全文検索機能の実現法の一つである転置インデックス法で用いられる検索のための索引ファイルである。転置インデックス法では、コンテンツ毎にそのコンテンツを含むファイルのリストを格納する転置ファイルと呼ばれる索引データファイルを予め作成し、ファイルの追加/削除の都度あるいは定期的にまとめて、転置ファイルの内容を更新する。コンテンツの検索要求に対しては、その検索対象のコンテンツに対応する転置ファイルの内容を検索結果として出力すればよい。そのため、全文検索の都度、すべてのファイルの内容を調べる必要がない。従って、検索を高速化できる。転置ファイルは、key−value型データの1つの用例であって、本実施形態はこれに限定しないことに注意すべきである。   An inverted file is an index file for search used in the inverted index method, which is one of the methods for realizing the full-text search function. In the inverted index method, an index data file called an inverted file that stores a list of files containing the content for each content is created in advance, and the contents of the inverted file are updated each time a file is added / deleted or periodically. To do. In response to a content search request, the contents of the transposed file corresponding to the search target content may be output as a search result. Therefore, it is not necessary to check the contents of all files every time a full text search is performed. Therefore, the search can be speeded up. It should be noted that the transposed file is one example of key-value type data, and the present embodiment is not limited to this.

<key−valueストア方式のコマンド>
ホストシステムからは、メモリシステムのホストインターフェースに対し、key−valueストア要求のための次のコマンドが与えられる。
<Key-value store command>
The host system gives the next command for a key-value store request to the host interface of the memory system.

key−valueストア方式に基づく要求のためのコマンドは、keyに関連付けられた新たな集合(value)を登録するコマンド(PUT)、あるkeyに関連付けられた集合(value)に新たな要素(value)を追加するコマンド(WRITE)、keyに関連付けられた集合(value)の要素をバッファに格納しそのサイズを返すコマンド(GET)、バッファに格納されている要素(value)を読み出すコマンド(READ)、を含む。   A command for a request based on the key-value store method includes a command (PUT) for registering a new set (value) associated with the key, and a new element (value) for the set (value) associated with a certain key. A command (WRITE) for adding a command, a command (GET) for storing an element of a set (value) associated with the key in the buffer and returning its size, a command (READ) for reading the element (value) stored in the buffer, including.

コマンド名称は適宜変更されても良く、key−valueストア方式に基づく要求のために新たなコマンドが追加されても良い。例えば、集合(key)に属する要素(value)を整理するためのコマンドや、メタデータテーブル内の集合(key)の並び替えや、要素(value)同士の比較、などを命令するコマンドである。   The command name may be changed as appropriate, and a new command may be added for a request based on the key-value store method. For example, a command for organizing the elements (values) belonging to the set (key), a command for rearranging the sets (key) in the metadata table, and comparing the elements (value) with each other.

本実施形態では、コマンド要求に従い、メタデータテーブルと実データ領域の連携がメモリシステム内で行われる。上記コマンドを用いた場合の、key−value型データの追加、検索などの具体的な手順を図3A〜図3Dのフローチャートに示す。
(1)新たなkey−value型データを登録する場合(PUT)、図3Aに示すように、まず、そのkeyがメタデータテーブルにすでに存在しているかを検索する(ステップS1,S2)。keyが見つかれば、出力にエラーを返す、すなわち、keyが既に存在していることを返信して終了する(ステップS3)。
In the present embodiment, the metadata table and the actual data area are linked in the memory system according to the command request. Specific procedures such as addition and retrieval of key-value type data when the above command is used are shown in the flowcharts of FIGS. 3A to 3D.
(1) When registering new key-value type data (PUT), as shown in FIG. 3A, first, it is searched whether the key already exists in the metadata table (steps S1 and S2). If the key is found, an error is returned to the output, that is, it returns that the key already exists and ends (step S3).

一方、keyが見つからなければ、valueの処理に進む。valueが実データ領域(実データアドレス)に保存されているかを検索する(ステップS4)。そのkey−value型データの登録時点で、valueが実データ領域に保存されていなければ、valueを実データ領域に追加する(ステップS5)。valueが保存されていれば、そのままkeyをメタデータテーブルに保存し、そのkeyにvalueの実データアドレスを関連付けて登録する(ステップS6)。   On the other hand, if the key is not found, the process proceeds to value processing. It is searched whether the value is stored in the actual data area (actual data address) (step S4). If the value is not stored in the actual data area at the time of registration of the key-value type data, the value is added to the actual data area (step S5). If the value is stored, the key is stored in the metadata table as it is, and the actual data address of the value is associated with the key and registered (step S6).

メモリシステム内で論理アドレス−物理アドレス変換テーブルが管理されている場合、管理している機能回路に対してメタデータテーブルの更新を通知する(ステップS7)。最後に、valueの実データサイズを出力して終了する(ステップS8)。
(2)既にあるkeyに対し、新たなvalueを追加する場合(WRITE)、図3Bに示すように、まず、そのkeyがメタデータテーブルに存在しているかを検索する(ステップS11,S12)。keyが見つからなければ、出力に、例えば、size=0を返してkeyが存在しないことを通知する(ステップS13)。
When the logical address-physical address conversion table is managed in the memory system, the management circuit is notified of the update of the metadata table (step S7). Finally, the actual data size of value is output and the process ends (step S8).
(2) When adding a new value to an existing key (WRITE), as shown in FIG. 3B, first, it is searched whether the key exists in the metadata table (steps S11 and S12). If no key is found, for example, size = 0 is returned to notify the output that there is no key (step S13).

一方、keyが見つかれば、keyに対応するvalueに保存された実データアドレスが指定する格納場所を参照し(ステップS14)、その格納場所に新たなvalueを追加する。まず、valueの格納場所に空きがあるかを調べる(ステップS15)。valueの格納場所に空きがない場合、別のvalueの実データアドレスへジャンプするためのポインタを格納する(ステップS16)。続いて、そのアドレスが指定する格納場所に新たなvalueを追加する(ステップS17)。   On the other hand, if the key is found, the storage location specified by the actual data address stored in the value corresponding to the key is referred to (step S14), and a new value is added to the storage location. First, it is checked whether or not there is a space in the value storage location (step S15). If there is no space in the storage location of the value, a pointer for jumping to the actual data address of another value is stored (step S16). Subsequently, a new value is added to the storage location designated by the address (step S17).

valueの格納場所に空きがある場合は、valueの実データアドレスの空いている格納場所に新たなvalueを追加する(ステップS17)。最後に、valueの実データサイズを出力して終了する(ステップS18)。
(3)keyに関連付けられた集合(value)を得る場合(GET)、図3Cに示すように、まず、そのkeyがメタデータテーブルに存在しているかを検索する(ステップS21,S22)。keyが見つからなければ、出力に、例えば、size=0を返してkeyが存在しないことを通知する(ステップS23)。
If there is a vacancy in the storage location of the value, a new value is added to the vacant storage location of the actual data address of the value (step S17). Finally, the actual data size of value is output and the process ends (step S18).
(3) When obtaining a set (value) associated with the key (GET), as shown in FIG. 3C, first, it is searched whether the key exists in the metadata table (steps S21 and S22). If the key is not found, for example, size = 0 is returned to notify the output that the key does not exist (step S23).

一方、keyが見つかれば、keyに対応するvalueに保存された実データアドレスが指定する格納場所を参照する(ステップS24)。そして、その実データアドレスの格納場所に記憶されたvalueを読み出してバッファメモリあるいはレジスタメモリに格納する(ステップS25)。最後に、valueの実データサイズを出力して終了する(ステップS26)。
(4)バッファメモリ(あるいは、レジスタメモリ)に格納されている集合(value)の要素を出力させる場合(READ)、図3Dに示すように、集合(value)の要素が格納されたバッファメモリ内の保管場所を参照する(ステップS31)。そして、集合(value)の要素があるか否かを調べる(ステップS32)。集合(value)の要素が見つからなければ、出力に、例えば、S=NULLを返して集合(value)の要素が存在しないことを通知する(ステップS33)。
On the other hand, if the key is found, the storage location designated by the actual data address stored in the value corresponding to the key is referred to (step S24). Then, the value stored in the storage location of the actual data address is read and stored in the buffer memory or the register memory (step S25). Finally, the actual data size of value is output and the process ends (step S26).
(4) When outputting the elements of a set (value) stored in the buffer memory (or register memory) (READ), as shown in FIG. 3D, in the buffer memory storing the elements of the set (value) Is referred to (step S31). Then, it is checked whether or not there is an element of the set (value) (step S32). If no element of the set (value) is found, for example, S = NULL is returned in the output to notify that the element of the set (value) does not exist (step S33).

一方、集合(value)の要素が見つかれば、指定されたサイズ分に対応する集合(value)の要素を読み出す(ステップS34)。続いて、読み出した集合(value)の要素を出力して終了する(ステップS35)。ここでは、サイズ指定によって要素を読み出す例を示したが、実際にはバッファメモリの場所を特定して読み出しても良い。   On the other hand, if an element of the set (value) is found, the element of the set (value) corresponding to the designated size is read (step S34). Subsequently, the elements of the read set (value) are output and the process ends (step S35). Here, an example in which an element is read out by size designation has been shown, but actually, the location of the buffer memory may be specified and read out.

なお(3)の手順において、ホストシステムにvalueの実データアドレスの先頭アドレスを返すという場合も有り得る。これは、この手順の後にはたいてい次の(4)の手順が行われることになるので、valueの実データを読み出すのに都合が良いからである。どう定義するかはコマンドセットの定義に依存していて、本出願ではkey−valueストア方式の手順を説明するために具体的なコマンドセットを用いて説明しているので、これに限定されない。他の手順も同様に前記説明に限定されるものではない。   In the procedure (3), there may be a case where the head address of the actual data address of value is returned to the host system. This is because the following procedure (4) is usually performed after this procedure, which is convenient for reading the actual data of value. How to define depends on the definition of the command set. In the present application, a specific command set is used to explain the procedure of the key-value store method, and the present invention is not limited to this. Similarly, other procedures are not limited to the above description.

メモリシステムが、Hash−CAMを用いている場合は、keyとvalueが一致していない場合、すなわちkeyとvalueが関連付けられたものでない場合があり得る。なお、Hash−CAMについては後で詳述する。   When the memory system uses Hash-CAM, there is a possibility that the key and the value do not match, that is, the key and the value are not associated with each other. The Hash-CAM will be described later in detail.

このため、Hash−CAMの場合は、メタデータテーブル内でkeyを検索する手順において、keyに対応付けられたvalueを参照し、実データとkeyが一致しているか判別する手順が加わる。一致していなければ、Hash−CAMでのkey−valueストア方式のアドレス管理ルール(例えば、隣のアドレスを調べる)に従って、別のkey範囲のメタデータアドレスに指定して検索しなおす。   For this reason, in the case of Hash-CAM, in the procedure for searching for a key in the metadata table, a procedure for determining whether the actual data and the key match with reference to the value associated with the key is added. If they do not match, the search is performed again by designating the metadata address in another key range according to the address management rule of the key-value store method in the Hash-CAM (for example, checking the adjacent address).

なお、実際の手順やコマンドはこれに限定されない。例えば、実際の運用で、複数のkeyが見つかった場合には、一度フラグを立てておいてまとめてvalueを読むなど、方法にバリエーションを持たせることができる。   Actual procedures and commands are not limited to this. For example, when a plurality of keys are found in actual operation, it is possible to give variations to the method such as setting a flag once and reading the values together.

さらに上述したように、例えば、集合(key)に属する要素(value)を整理するためのコマンドや、メタデータテーブル内の集合(key)の並び替えや、要素(value)同士の比較などを命令するコマンドに対する手順があり得る。   Further, as described above, for example, a command for organizing elements (values) belonging to a set (key), a rearrangement of sets (keys) in the metadata table, and a comparison between elements (values) are given. There can be a procedure for the command to do.

なお、keyとvalueは、一方が集合で他方が要素、またはその逆の関係を取り得る。あるいは、1対1に対応するものであるため、両者ともに集合、または、要素ということもあり得る。   It should be noted that the key and value can be in a set and the other is an element, or vice versa. Alternatively, since they correspond one-to-one, both may be a set or an element.

本実施形態においては、ホストインターフェースあるいは、それを介してローカルコントローラやメモリコントローラなどが上記検索コマンドを受け付けて、key−valueストア方式の一連の処理を実行することができる。また、メモリシステム内のローカルコントローラあるいはメモリコントローラにダイレクトメモリアクセスコントローラ(DMAC:Direct Memory Access Controller)が備わった構成をとることができ、この場合、メモリシステムが主体的にkey−valueストア方式の動作を制御することが可能である。場合によってはメモリシステム外の別のメモリ(例えばホストシステムのメインメモリ)に主体的にアクセスすることが可能である。   In the present embodiment, a host interface or a local controller or a memory controller via the host interface or the like can receive the search command and execute a series of processes of the key-value store method. In addition, the local controller in the memory system or the memory controller can be provided with a direct memory access controller (DMAC). In this case, the memory system mainly operates in a key-value store system. Can be controlled. In some cases, it is possible to independently access another memory outside the memory system (for example, the main memory of the host system).

以下では、本実施形態の具体的なハードウェア構成について、適宜、図を用いて説明する。   Hereinafter, a specific hardware configuration of this embodiment will be described with reference to the drawings as appropriate.

[第1の実施形態]
第1実施形態のメモリシステムのハードウェア構成について説明する。
[First Embodiment]
A hardware configuration of the memory system according to the first embodiment will be described.

図4は、第1実施形態のメモリシステムのハードウェア構成を示すブロック図である。   FIG. 4 is a block diagram illustrating a hardware configuration of the memory system according to the first embodiment.

図示するように、メモリシステム(またはローカルシステム)10は、ホストインターフェース11、ローカルコントローラ12、メモリコントローラ(あるいはチップコントローラ)13、固定長データ生成器14、レジスタメモリ(あるいはキャッシュメモリ、ページレジスタ、R/Wレジスタ、ページキャッシュなどとも呼ばれる)15、及び第1のメモリブロック16を備える。   As shown, the memory system (or local system) 10 includes a host interface 11, a local controller 12, a memory controller (or chip controller) 13, a fixed length data generator 14, a register memory (or cache memory, page register, R / W register, also called page cache) 15, and a first memory block 16.

メモリシステム10のホストインターフェース11には、例えば、AMBA、SATA、PCIe、USBなどのバスを介してホストシステムが接続されている。ホストシステムは、CPU101及びメインメモリ102を有する。   For example, a host system is connected to the host interface 11 of the memory system 10 via a bus such as AMBA, SATA, PCIe, or USB. The host system has a CPU 101 and a main memory 102.

第1のメモリブロック16は、実データ領域161と、実データ領域161から抽出したメタデータテーブル162を格納する。このメタデータテーブル162は、key−value型データを有する。   The first memory block 16 stores an actual data area 161 and a metadata table 162 extracted from the actual data area 161. The metadata table 162 has key-value type data.

メタデータテーブル162におけるkey−value型データは、データに関連付けられたメタデータとしてのkeyと、関連付けられたデータの実データアドレスの先頭アドレス(value)を、リストとして格納する。このkey−value型データを用いて、例えば、上述した転置ファイルなどを構成することができる。   The key-value type data in the metadata table 162 stores a key as metadata associated with the data and a head address (value) of the actual data address of the associated data as a list. Using this key-value type data, for example, the above-described transposed file can be configured.

第1のメモリブロック16には、例えば、不揮発性半導体メモリの1つであるNANDフラッシュメモリが用いられる。NANDフラッシュメモリは、1つのチップでもよいし、記憶容量を増大させるため複数のチップで構成されていても良い。なお、第1のメモリブロック16には、その他、記憶不揮発性を有する固体チップLSIであれば、例えば、MRAM(Magnetic Random Access Memory)やReRAM(Resistive Random Access Memory)も用いることができるが、これらに限定されるものではない。   For the first memory block 16, for example, a NAND flash memory which is one of nonvolatile semiconductor memories is used. The NAND flash memory may be a single chip or may be composed of a plurality of chips in order to increase the storage capacity. For the first memory block 16, other than this, if it is a solid-state chip LSI having storage non-volatility, for example, MRAM (Magnetic Random Access Memory) and ReRAM (Resistive Random Access Memory) can be used. It is not limited to.

ホストインターフェース11は、ホストシステムからアドレス指定による通常のデータ操作要求、すなわちデータ書き込み及び読み出しの要求と、メタデータテーブル162内のkey−valueストア型データへの書き込み及び読み出しの要求を受け付けることができる。   The host interface 11 can accept a normal data operation request by address designation from the host system, that is, a data write and read request, and a write and read request to the key-value store type data in the metadata table 162. .

第1のメモリブロック16への書き込み及び読み出し要求は、メモリコントローラ13で受け付けられ、制御される。さらに、メモリコントローラ13と第1のメモリブロック16との間には、固定長データ生成器14とレジスタメモリ15が接続されている。レジスタメモリ15は、ページレジスタ、R/Wレジスタ、ページキャッシュなどとも呼ばれるが、書き込みあるいは読み出しを行う際に、一時的に記憶領域として使用される。特に、このレジスタメモリ15には演算機能が備わっており、一般的にNANDフラッシュメモリの多値動作を制御するために用いられ、本実施形態でも同様に用いられる。   Requests for writing to and reading from the first memory block 16 are received and controlled by the memory controller 13. Further, a fixed-length data generator 14 and a register memory 15 are connected between the memory controller 13 and the first memory block 16. The register memory 15 is also called a page register, R / W register, page cache, or the like, but is temporarily used as a storage area when writing or reading. In particular, the register memory 15 has an arithmetic function and is generally used for controlling the multi-value operation of the NAND flash memory, and is similarly used in the present embodiment.

本実施形態では、第1のメモリブロック16に対しkey−value型データの書き込み及び読み出しを行うために用いられる固定長データ生成器14、例えばハッシュ生成器を備えていることを特徴とする。ハッシュ生成器は、keyの入力に対して、key−value型データが記憶されたアドレスを取得するアドレス取得回路として機能する。ここで、ハッシュ生成器は、ハッシュ関数を生成する機能を有する電子回路と見なして良いが、専用回路を用いてもよいし、あるいは汎用演算回路にハッシュ関数アルゴリズムを入力したものを用いても良い。   The present embodiment is characterized in that a fixed-length data generator 14, for example, a hash generator, used to write and read key-value type data to and from the first memory block 16 is provided. The hash generator functions as an address acquisition circuit that acquires an address at which key-value type data is stored in response to a key input. Here, the hash generator may be regarded as an electronic circuit having a function of generating a hash function, but a dedicated circuit may be used, or a general-purpose arithmetic circuit into which a hash function algorithm is input may be used. .

ハッシュ生成器により生成されたハッシュ値(アドレス)は衝突する可能性がある。メモリコントローラ13は、ハッシュ値の衝突後の処理のための比較回路やアドレス管理回路を備える。固定長データ生成器(ハッシュ生成器)14とアドレス管理回路を用いたデータ格納・検索方法については後述する。なおここでは、メモリコントローラ13と固定長データ生成器14が個別に形成された例を示したが、メモリコントローラ13が固定長データ生成器14を含んでいてもよい。   The hash value (address) generated by the hash generator may collide. The memory controller 13 includes a comparison circuit and an address management circuit for processing after a hash value collision. A data storage / retrieval method using the fixed-length data generator (hash generator) 14 and the address management circuit will be described later. Although an example in which the memory controller 13 and the fixed-length data generator 14 are separately formed is shown here, the memory controller 13 may include the fixed-length data generator 14.

さらに、本実施形態の構成として、ホストインターフェース11と第1のメモリブロック16の相互の信号送受信を制御するためにローカルコントローラ12を備える。ローカルコントローラ12は、第1のメモリブロック16から出力されたデータに対するエラー訂正符号復号(ECC)回路を備えることができる。なお、ECC回路は、メモリコントローラ13に備わっていればローカルコントローラ12に備える必要はない。   Furthermore, as a configuration of the present embodiment, a local controller 12 is provided to control signal transmission / reception between the host interface 11 and the first memory block 16. The local controller 12 can include an error correction code decoding (ECC) circuit for data output from the first memory block 16. Note that the ECC circuit need not be provided in the local controller 12 as long as the ECC circuit is provided in the memory controller 13.

また、ローカルコントローラ12は、第1のメモリブロック16の論理アドレスを物理アドレスに変換する、論理アドレス−物理アドレス変換テーブルを管理する機能を備えることができる。これによりローカルコントローラ12は、実データ領域161及びメタデータテーブル162と論理アドレスとの対応を管理することができる。すなわち、ローカルコントローラ12は、論理アドレス−物理アドレス変換テーブルの中で、実データ領域161とメタデータテーブル162の記憶領域を区別する。このため、第1のメモリブロック16内おいて、実データ領域161とメタデータテーブル162の記憶領域は分離されている必要はなく、混在していてもよい。   In addition, the local controller 12 can have a function of managing a logical address-physical address conversion table that converts a logical address of the first memory block 16 into a physical address. Thereby, the local controller 12 can manage the correspondence between the actual data area 161 and the metadata table 162 and the logical address. That is, the local controller 12 distinguishes between the storage areas of the real data area 161 and the metadata table 162 in the logical address-physical address conversion table. For this reason, in the first memory block 16, the storage area of the actual data area 161 and the metadata table 162 does not need to be separated and may be mixed.

これら処理のために、第2のメモリブロックをローカルコントローラ12の内部に含むことができる。あるいは、ローカルコントローラ12の外部にバス線を介して第2のメモリブロックを接続しても良い。   For these processes, a second memory block can be included within the local controller 12. Alternatively, the second memory block may be connected to the outside of the local controller 12 via a bus line.

第2のメモリブロックの存在は従来型のSSDであれば自明であるが、仮に第2のメモリブロックが存在しなくとも、本実施形態の最小構成を示す上では必ずしも不都合とならないため、図4では第2のメモリブロックを図示していない。ただし、ローカルコントローラ12が第2のメモリブロックを利用できるのであれば、メタデータテーブルを第1のメモリブロック16から第2のメモリブロック内へ読み出して参照することができる。   The presence of the second memory block is obvious in the case of a conventional SSD, but even if the second memory block does not exist, it is not necessarily inconvenient in showing the minimum configuration of the present embodiment. However, the second memory block is not shown. However, if the local controller 12 can use the second memory block, the metadata table can be read from the first memory block 16 into the second memory block for reference.

なお、第2のメモリブロックは、ホストインターフェース11の通信速度と、第1のメモリブロック16のアクセス速度との速度差を補うためにも使用される。このため、第2のメモリブロックには、第1のメモリブロック16に比べて、揮発・小容量であるがアクセス速度が速いものが用いられる。   The second memory block is also used to compensate for a speed difference between the communication speed of the host interface 11 and the access speed of the first memory block 16. For this reason, the second memory block has a volatile / small capacity but a high access speed as compared with the first memory block 16.

例えば、第2のメモリブロックには、揮発性のDRAMもしくはSRAMが用いられる。あるいは、同等の速度と容量が得られれば、不揮発性RAM(Random Access Memory)、例えば、MRAM(磁気抵抗変化膜RAM)、ReRAM(抵抗変化膜RAM)、FeRAM(強誘電体膜RAM)、PCRAM(相変化膜RAM)などを用いてもよい。第1のメモリブロック16にフラッシュメモリを用いたメモリシステムであれば、ローカルコントローラ12、第2のメモリブロック、論理アドレス−物理アドレス変換テーブルを用いて、ウェアレベリング機能を備えるのが一般的であり、本実施形態でこれを用いても良い。   For example, a volatile DRAM or SRAM is used for the second memory block. Alternatively, if equivalent speed and capacity can be obtained, nonvolatile RAM (Random Access Memory), for example, MRAM (Magnetic Resistance Change Film RAM), ReRAM (Resistance Change Film RAM), FeRAM (Ferroelectric Film RAM), PCRAM (Phase change film RAM) or the like may be used. In the case of a memory system using a flash memory as the first memory block 16, it is common to provide a wear leveling function using the local controller 12, the second memory block, and a logical address-physical address conversion table. This may be used in the present embodiment.

<ハッシュ関数を用いたデータ格納・検索方法>
本実施形態の固定長データ生成器(ハッシュ生成器)14とアドレス管理回路を用いたデータ格納・検索方法について説明する。アドレス管理回路は、メモリコントローラ13に備えられており、ハッシュ値(アドレス)の衝突を回避する処理を行う。
<Data storage / retrieval method using hash function>
A data storage / retrieval method using the fixed-length data generator (hash generator) 14 and the address management circuit of this embodiment will be described. The address management circuit is provided in the memory controller 13 and performs processing for avoiding collision of hash values (addresses).

本実施形態は、ハッシュ生成器を備えているため、任意長ビットデータをハッシュ関数によって固定長ビットデータに変換することができる。ここでは、この機能を用いて、ハッシュ生成器が、任意長ビットデータのメタデータから、固定長ビットデータのメタデータアドレスを生成する例を示す。   Since this embodiment includes a hash generator, arbitrary length bit data can be converted into fixed length bit data by a hash function. Here, an example is shown in which the hash generator uses this function to generate a metadata address of fixed-length bit data from metadata of arbitrary-length bit data.

ハッシュ関数としては、なるべく均一かつ疎な暗号学的ハッシュ関数が好ましい。例えば、SHA−1(Secure Hash Algorithm-1)、SHA−2(Secure Hash Algorithm-2)、MD4(MessageDigest4)、MD5(MessageDigest5)などを使用する。   As the hash function, a cryptographic hash function that is as uniform and sparse as possible is preferable. For example, SHA-1 (Secure Hash Algorithm-1), SHA-2 (Secure Hash Algorithm-2), MD4 (MessageDigest4), MD5 (MessageDigest5), etc. are used.

ハッシュ生成器は、与えられた任意長の<key>を、ハッシュ関数に従って固定長ビットのビット列をhash(<key>)のように得て、さらに所望のビット長(BitLength)に短縮する機能を有する。例えば、次式の除算機能を有する。   The hash generator has a function that obtains a given <key> of arbitrary length as a hash (<key>) bit string of fixed length bits according to a hash function, and further shortens it to the desired bit length (BitLength). Have. For example, it has a division function of the following equation.

<key ID>= hash(<key>) mod BitLength
あるいは、単純に、生成された固定長ビットのビット列の先頭から所望の長さの分だけを切り取って使用しても良い。
<key ID> = hash (<key>) mod BitLength
Alternatively, a portion of a desired length may be simply cut out from the beginning of the generated fixed-length bit string.

このように生成されたkeyIDの長さを、メタデータテーブルのアドレス長と等しくしておけば、そのままメタデータテーブルのアドレスとして利用できる。例えば図1において、メタデータテーブルにおけるkey−value型データで説明すると、ハッシュ生成器による“book”の固定長ビットデータの生成(以下、hash(“book”)と記す)の結果が001であれば、メタデータテーブルの$001番地は“book”というkeyに対応する。この$001番地には対応するvalueが保存されている。   If the length of the keyID generated in this way is made equal to the address length of the metadata table, it can be used as it is as the address of the metadata table. For example, in FIG. 1, the key-value type data in the metadata table will be described. If the result of generation of fixed-length bit data of “book” by the hash generator (hereinafter referred to as hash (“book”)) is 001. For example, address $ 001 in the metadata table corresponds to the key “book”. The corresponding value is stored at address $ 001.

同様に“Blue”の場合もhash(“Blue”)の結果が002であれば、$002のメタデータアドレスに対応するvalueが保存される、という要領でkeyとvalueを格納していく。   Similarly, in the case of “Blue”, if the result of hash (“Blue”) is 002, the key and value are stored in the manner that the value corresponding to the metadata address of $ 002 is saved.

keyを検索したい時には、例えば“book”の場合、そのハッシュ関数の出力値(ハッシュ値)である001は、その値がそのまま格納場所のメタデータアドレスなので、直接そのアドレスを参照すれば良い。このような、ハッシュ関数とメモリアドレスの対応を活用したデータ参照方法をHash−CAMと呼ぶ。   When searching for a key, for example, in the case of “book”, the output value (hash value) 001 of the hash function is the metadata address of the storage location as it is, so that address can be directly referred to. Such a data reference method utilizing the correspondence between the hash function and the memory address is called Hash-CAM.

Hash−CAMでは、できるだけ疎なハッシュ関数を用いたとしても、確率論的にハッシュ値(アドレス)が衝突する可能性はゼロにはならない。実用上、ハッシュ値の衝突の可能性を減らす最も単純かつ有効な方法は、十分に大きなメモリ空間を用意することである。実際には、メモリサイズは制限されているため衝突は起こりえる。そこで衝突後の処理機能を備えるために、次の機能を持つ比較回路とアドレス管理回路を備えることで解決できる。比較回路は、ハッシュ値が衝突したとき、valueの中を参照してデータを取り出し、取り出したデータとそのkeyとが一致するか否か比較・照合する。アドレス管理回路は、取り出したデータとそのkeyとが一致するとき、ハッシュ値(アドレス)を変更する。   In Hash-CAM, even if a hash function that is as sparse as possible is used, the possibility that hash values (addresses) collide stochastically is not zero. In practice, the simplest and most effective way to reduce the possibility of hash value collisions is to provide a sufficiently large memory space. In practice, collisions can occur because the memory size is limited. In order to provide a post-collision processing function, this can be solved by providing a comparison circuit and an address management circuit having the following functions. When the hash values collide, the comparison circuit retrieves data by referring to the value, and compares and collates whether or not the retrieved data matches the key. The address management circuit changes the hash value (address) when the extracted data matches the key.

例えば、上記に加えて別のkeyとして“note”を格納するとき、hash(“note”)の結果も001になってしまったとする。その場合は、すでに$001は“book”に使用されているので、別のメタデータアドレスにジャンプする必要がある。そこで例えば、1つ隣のメタデータアドレスへ移動、すなわちアドレスをインクリメントする。図1の例で説明すると、$001が衝突したため、$002が空いているか調べる。しかし、$002もhash(“Blue”)によってすでに使用されているので、さらに次の番地$003を調べる。その結果、$003が空き番地であれば、そこに“note”に対応するvalueを格納する。   For example, when “note” is stored as another key in addition to the above, the result of hash (“note”) also becomes 001. In this case, since $ 001 is already used for “book”, it is necessary to jump to another metadata address. Therefore, for example, the next metadata address is moved, that is, the address is incremented. In the example of FIG. 1, since $ 001 collides, it is checked whether $ 002 is free. However, since $ 002 is already used by hash (“Blue”), the next address $ 003 is further examined. As a result, if $ 003 is an empty address, the value corresponding to “note” is stored there.

この方法を用いると、ハッシュ値が衝突した場合でもデータの格納は可能となる。ただし、key−value型データの検索には工夫が必要である。“note”を検索する場合には、hash(“note”)が001になると、$001のメタデータアドレスを参照するが、すでに格納されていた“book”のvalueが誤って得られてしまう。   If this method is used, data can be stored even if hash values collide. However, it is necessary to devise a search for key-value type data. When searching for “note”, if hash (“note”) becomes 001, the metadata address of $ 001 is referred to, but the value of “book” that has already been stored is obtained by mistake.

そこで、必ずkeyとvalueの対応が正しいかどうか照合する必要がある。“book”のvalueは実データアドレスの&101であるため、&101を参照してデータを読み出す。その先頭データには[book]が保存されているので、“note”のkey−valueペアではないことが判明する。従って、“note”のkey−valueペアを探し当てるために、次のメタデータアドレスの$002も同様に照合し、“note”のkey−valueペアではないことが判明する。結果として、次のメタデータアドレスの$003が正しいkey−valueペアであることが判明する。このように、ハッシュ値が衝突した場合でもkey−value型データの検索は可能となる。   Therefore, it is necessary to check whether the correspondence between key and value is correct. Since the value of “book” is & 101 of the actual data address, data is read with reference to & 101. Since [book] is stored in the head data, it is determined that it is not a “note” key-value pair. Therefore, in order to find the key-value pair of “note”, the next metadata address $ 002 is also checked in the same manner, and it is found that it is not the key-value pair of “note”. As a result, it turns out that $ 003 of the next metadata address is a correct key-value pair. In this way, even when hash values collide, it is possible to search for key-value type data.

なお、実データ部の[book]、[Blue]、[note]はkeyの照合さえできれば良いので、実質的には、bookをbo、BlueをBl、noteをnoというように先頭の数バイト分を切り取って固定長で用いても良い。ただし、この場合も固定長にした場合に衝突の可能性がゼロではなくなるので注意が必要である。   It should be noted that [book], [Blue], [note] in the actual data part only need to be able to collate the key, so in effect, the first few bytes such as bo for book, Bl for Blue, no for note, etc. May be cut off and used in a fixed length. However, it should be noted that the possibility of collision is not zero when the length is fixed.

上記では衝突後にアドレスをインクリメントする方法を用いたが、後述する変形例で示されているように、本実施形態を用いれば、keyすなわちアドレスが衝突していても、それに対応するvalueから実データアドレスを参照できるため、実データアドレス内にkey自体を格納していき、照合するという方式も用いることができる。この場合でも、検索エントリーとしてのkeyと、実データ内のkeyとの照合は必要である。Hash−CAMとしてのアドレス管理回路も必要である。従って、方式は多少異なるものの、前述したHash−CAMと同じ構成で考えれば良い。   In the above, the method of incrementing the address after the collision is used. However, as shown in a modification example to be described later, even if the key, that is, the address collides, if this embodiment is used, the actual data from the corresponding value is used. Since the address can be referred to, a method of storing the key itself in the actual data address and collating can also be used. Even in this case, it is necessary to collate the key as the search entry with the key in the actual data. An address management circuit as a Hash-CAM is also required. Therefore, although the system is slightly different, the same configuration as the Hash-CAM described above may be used.

以上のように、ハッシュ生成器を用いてハッシュ値(アドレス)を生成し、さらにアドレス管理回路によりハッシュ値の衝突回避の手順をメタデータの保存に加えることにより、メモリシステム10内で効率的にkey−valueストア方式を実現することができる。   As described above, a hash value (address) is generated using a hash generator, and a hash value collision avoidance procedure is added to the storage of the metadata by the address management circuit, thereby efficiently in the memory system 10. A key-value store method can be realized.

本実施形態では、Hash−CAMを実現するために、ハードウェア機能(固定長データ生成器)を備え、さらに固定長データ(アドレス)の衝突を回避する回路をメモリコントローラ13が備えている。ここで、ハードウェア機能(固定長データ生成器)はメモリコントローラ13に備わっていてもよく、その際のkey−value型データの格納は、レジスタメモリ15内で行われても良いし、直接、第1のメモリブロック16に対して行われても良い。   In this embodiment, in order to implement Hash-CAM, the memory controller 13 includes a hardware function (fixed length data generator) and a circuit that avoids collision of fixed length data (address). Here, the hardware function (fixed length data generator) may be provided in the memory controller 13, and the key-value type data at that time may be stored in the register memory 15 or directly. This may be performed on the first memory block 16.

なお、上記構成においてkey−valueストア方式による機能が損なわれなければ、論理アドレス−物理アドレス変換テーブルの一時保存、及びウェアレベリング処理は、メモリシステム10内部で行うことに限定せず、ホストシステムがCPUとメインメモリを駆使して行っても良い。また、メモリシステム10が主体的にkey−valueストア方式を行うために、ダイレクトメモリアクセスコントローラ(DMAC)を備えていても良い。   If the function of the key-value store method is not impaired in the above configuration, the temporary storage of the logical address-physical address conversion table and the wear leveling process are not limited to being performed inside the memory system 10, and the host system You may carry out using CPU and main memory. Further, a direct memory access controller (DMAC) may be provided in order for the memory system 10 to actively perform the key-value store method.

本実施形態では、各機能ブロック間はバス線で繋がれている。基本的にはメモリシステム内で高速かつ効率的なバス線配置を取られることが望ましいが、例えばチップインターフェース規格と外部インターフェース規格の相違などで、2種類以上のバス線がメモリシステム内で用いられていても良い。   In this embodiment, each functional block is connected by a bus line. Basically, it is desirable to have a fast and efficient bus line arrangement in the memory system. However, two or more types of bus lines are used in the memory system due to, for example, the difference between the chip interface standard and the external interface standard. May be.

本実施形態よれば、データに関連付けられたメタデータに対するkey−value型データにより、メモリシステムからデータを取り出す処理を簡素かつ高速に行うことができ、かつ、ユーザーはメタデータを任意に扱いつつ、アクセス可能な物理メモリ空間が最大効率で利用可能となるメモリシステムを提供することができる。すなわち、メタデータに対する操作要求をメモリシステムが受け付け、メモリシステム内部のkey−valueストア方式によって効率的かつ高速に処理し、出力することができるメモリシステムを提供できる。   According to the present embodiment, the key-value type data for the metadata associated with the data makes it possible to perform the process of retrieving the data from the memory system simply and at high speed, and the user arbitrarily handles the metadata, It is possible to provide a memory system in which an accessible physical memory space can be used with maximum efficiency. That is, it is possible to provide a memory system in which an operation request for metadata is accepted by a memory system, and can be processed and output efficiently and at high speed by a key-value store system inside the memory system.

[第2実施形態]
本実施形態は、第1実施形態とハードウェア構成の一部が異なり、key照合専用メモリ空間を有するハードウェアCAMを備える。
[Second Embodiment]
This embodiment is different from the first embodiment in hardware configuration, and includes a hardware CAM having a key verification dedicated memory space.

図5は、第2実施形態のメモリシステムのハードウェア構成を示すブロック図である。
メモリコントローラ13は、ローカルコントローラ12と第1のメモリブロック16との間の相互の信号送受信を制御する。また、第1のメモリブロック16に対する書き込み/読み出し時のためのレジスタメモリ15を有している。検索要求をこのレジスタメモリ15に一時的に保存し、読み出しの一致判定を行うことができる。バイト単位での並列読み出しと一致判定を行い、任意長の検索データに関しては逐次処理を行うことで一致判定が可能である。
FIG. 5 is a block diagram illustrating a hardware configuration of the memory system according to the second embodiment.
The memory controller 13 controls mutual signal transmission / reception between the local controller 12 and the first memory block 16. In addition, a register memory 15 for writing / reading the first memory block 16 is provided. The search request can be temporarily stored in the register memory 15 and read matching can be determined. It is possible to perform coincidence determination by performing parallel reading in byte units and performing coincidence determination, and sequentially processing search data of arbitrary length.

本実施形態では、図5に示すように、メモリコントローラ13からアクセス可能な位置にコンテンツ連想メモリ(CAM:Content-Addressable Memory)24が配置されている。コンテンツ連想メモリ(CAM)とは、アドレスの入力に対してそのアドレスが指定するデータを出力する通常メモリとは異なり、検索データの入力に対して、その検索データと全ての格納データとの一致・不一致の比較演算を同時並列に行い、一致した格納データのアドレスを出力する機能を持つ高速検索用途の特殊メモリである。ここでは、CAM24は、keyの入力に対して、key−value型データが記憶されたアドレスを取得するアドレス取得回路として機能する。また、CAMは、データの一致検索に対して、一致データの有無を“Match Flag”として出力することができる。本実施形態では、CAM24はこれらの機能を実現するための電子回路で実現されているため、ハードウェアCAMと呼んでいる。   In the present embodiment, as shown in FIG. 5, a content associative memory (CAM) 24 is arranged at a location accessible from the memory controller 13. A content associative memory (CAM) is different from a normal memory that outputs data specified by an address in response to an input of an address, and matches the search data and all stored data in response to an input of the search data. This is a special-purpose memory for high-speed search that has the function of performing inconsistent comparison operations in parallel and outputting the address of the stored data that matches. Here, the CAM 24 functions as an address acquisition circuit that acquires an address in which key-value type data is stored in response to a key input. Further, the CAM can output the presence / absence of matching data as a “Match Flag” for data matching search. In the present embodiment, the CAM 24 is called a hardware CAM because it is realized by an electronic circuit for realizing these functions.

このハードウェアCAMは、レジスタメモリ15に直結されていて、メモリコントローラ13とレジスタメモリ15との間に配置されている。なおここでは、メモリコントローラ13とCAM24が個別に形成された例を示したが、メモリコントローラ13がCAM24を含んでいてもよい。   The hardware CAM is directly connected to the register memory 15 and is disposed between the memory controller 13 and the register memory 15. Although an example in which the memory controller 13 and the CAM 24 are separately formed is shown here, the memory controller 13 may include the CAM 24.

さらに、第1のメモリブロック16はRAM(random access memory)であるため、CAM24と第1のメモリブロック16によりCAM−RAMとして機能する。CAM−RAMとは、前述したCAM24でアドレスを出力させ、アドレス指定アクセスのRAMでデータを出力させるように組み合わせたシステムである。CAMの1つのエントリとRAMの1つのエントリとが一対一対応するように、CAMのアドレスデコーダとRAMのアドレスエンコーダが設計されている。   Further, since the first memory block 16 is a random access memory (RAM), the CAM 24 and the first memory block 16 function as a CAM-RAM. The CAM-RAM is a system in which an address is output by the CAM 24 and data is output by an addressed access RAM. The CAM address decoder and RAM address encoder are designed so that one CAM entry and one RAM entry have a one-to-one correspondence.

本実施形態において、keyをCAM24に格納し、それに対応する値(value)の組を第1のメモリブロック16に保存すること、あるいは、第1のメモリブロック16から値(value)をレジスタメモリ15に読み出して、RAM部として保存することにより、CAM−RAMとして機能する。   In the present embodiment, the key is stored in the CAM 24, and a set of values corresponding to the key is stored in the first memory block 16, or the value (value) from the first memory block 16 is stored in the register memory 15. And function as a CAM-RAM.

ハードウェアCAMを用いるには、第1のメモリブロック16内からメタデータテーブルがレジスタメモリ15に転送されている必要がある。このようなCAM−RAMを用いれば、第1実施形態におけるHash−CAMのような、アドレスの衝突が原理的に起こらない。   In order to use the hardware CAM, the metadata table needs to be transferred from the first memory block 16 to the register memory 15. If such a CAM-RAM is used, an address collision does not occur in principle as in the Hash-CAM in the first embodiment.

従って、keyとvalueの照合手続きと検索やり直しが発生することがないため、検索がより高速になる。また、Hash−CAMでは衝突回避の手段として、メタデータアドレスに余裕を持たせる場合が多いが、ハードウェアCAMの場合は衝突が無いためCAM24を効率良く利用することができる。   Accordingly, since the key and value collation procedures and the search re-execution do not occur, the search becomes faster. Further, in the Hash-CAM, as a means for avoiding collision, there is often a margin in the metadata address. However, in the case of the hardware CAM, since there is no collision, the CAM 24 can be used efficiently.

本実施形態では、CAM24がkey−value型データのkey検索にのみ用いられるため、CAMがデータ入出力のページレジスタ(レジスタメモリ)に接続されていることにより、第1のメモリブロックの物理アドレス空間を、key−value型データのために一部占有させることなく、最大限に利用することが可能となる。その他の構成及び効果は前述した第1実施形態と同様である。   In this embodiment, since the CAM 24 is used only for key retrieval of key-value type data, the CAM is connected to a data input / output page register (register memory), so that the physical address space of the first memory block is obtained. Can be used to the maximum extent without partially occupying the key-value type data. Other configurations and effects are the same as those of the first embodiment described above.

[第3の実施形態]
本実施形態は、第2実施形態と同様に、key照合専用メモリ空間を有するハードウェアCAMを備えるが、第1のメモリブロック16がハードウェアCAMを備えている。
[Third Embodiment]
As in the second embodiment, the present embodiment includes a hardware CAM having a key verification dedicated memory space, but the first memory block 16 includes a hardware CAM.

図6は、第3実施形態のメモリシステムのハードウェア構成を示すブロック図である。
図示するように、第1のメモリブロック16は、実データ領域161、及びメタデータテーブルを格納するCAM−RAM163を有する。CAM−RAMの使われ方は、第2実施形態と同様であるが、本実施形態においては、第1のメモリブロック16の一部がCAM専用のアドレス空間である。このため、メタデータテーブルのkeyを第1のメモリブロック16の外へ移動させることなく、直接保存されているkeyの検索が可能となる。
FIG. 6 is a block diagram illustrating a hardware configuration of the memory system according to the third embodiment.
As shown in the figure, the first memory block 16 has a real data area 161 and a CAM-RAM 163 for storing a metadata table. The CAM-RAM is used in the same manner as in the second embodiment. In this embodiment, a part of the first memory block 16 is a dedicated address space for CAM. Therefore, it is possible to search directly stored keys without moving the keys of the metadata table to the outside of the first memory block 16.

また、第1のメモリブロック16の記憶セル部に対する照合データの与え方を工夫することで、完全並列検索を行うことが可能である。例えば、第1のメモリブロック16がNANDフラッシュメモリで構成されている場合、CAM部に使用する領域は、すべてのゲートに同時に検索データとしての入力を与えられるように、読み出し回路を構成しておく。これにより、検索がヒットしたNANDストリングのみ出力が検知されるようにでき、その出力とRAM部のページアドレスを対応させておけば、CAM−RAMが実現される。その他の構成及び効果は前述した第1実施形態と同様である。   In addition, it is possible to perform a complete parallel search by devising a method of giving collation data to the memory cell portion of the first memory block 16. For example, when the first memory block 16 is configured by a NAND flash memory, the read circuit is configured so that the area used for the CAM unit can be input as search data to all the gates simultaneously. . As a result, the output can be detected only for the NAND string for which the search is hit, and the CAM-RAM can be realized by associating the output with the page address of the RAM unit. Other configurations and effects are the same as those of the first embodiment described above.

[第4の実施形態]
本実施形態は、第1実施形態と同様に、固定長データ生成器(例えば、ハッシュ生成器)を備えるが、第1実施形態とは固定長データ生成器の設置場所が異なり、ローカルコントローラ12が固定長データ生成器14を備えている。
[Fourth Embodiment]
This embodiment includes a fixed-length data generator (for example, a hash generator) as in the first embodiment, but the installation location of the fixed-length data generator is different from that of the first embodiment, and the local controller 12 A fixed-length data generator 14 is provided.

図7は、第4実施形態のメモリシステムのハードウェア構成を示すブロック図である。
図示するように、固定長データ生成器14はローカルコントローラ12内に配置されている。必ずしも、固定長データ生成器14とローカルコントローラ12とは、物理的に同チップ内にある必要は無い。ローカルコントローラ12が他の機能ブロックと比べて容易に、固定長データ生成器14にアクセス可能な位置にあれば良い。
FIG. 7 is a block diagram illustrating a hardware configuration of the memory system according to the fourth embodiment.
As shown in the figure, the fixed length data generator 14 is arranged in the local controller 12. The fixed-length data generator 14 and the local controller 12 are not necessarily physically located in the same chip. It suffices if the local controller 12 is at a position where the fixed length data generator 14 can be easily accessed as compared with other functional blocks.

ローカルコントローラ12は、第2のメモリブロックとしてのバッファメモリ121を含む。このため、ローカルコントローラ12は、第1のメモリブロック16より読み出した論理アドレス−物理アドレス変換テーブルをバッファメモリ121内に格納して、論理アドレス−物理アドレス変換を行うことができる。同様に、NANDフラッシュのウェアレベリング処理を行うこともできる。さらに、ローカルコントローラ12は、メタデータテーブル162と論理アドレスの対応を管理することができる。   The local controller 12 includes a buffer memory 121 as a second memory block. For this reason, the local controller 12 can store the logical address-physical address conversion table read from the first memory block 16 in the buffer memory 121 and perform logical address-physical address conversion. Similarly, wear leveling processing of the NAND flash can be performed. Furthermore, the local controller 12 can manage the correspondence between the metadata table 162 and logical addresses.

本実施形態の特徴として、固定長データ生成器14がローカルコントローラ12内にあるため、論理アドレス−物理アドレス変換の際に、keyのハッシュ値化とvalueへの対応付け、すなわちメタデータテーブル162のkey−value型データの作成がローカルコントローラ12内で効率的に行うことができる。   As a feature of the present embodiment, since the fixed-length data generator 14 is in the local controller 12, at the time of logical address-physical address conversion, key hashing and association with value, that is, the metadata table 162 The creation of key-value type data can be efficiently performed in the local controller 12.

本実施形態では、Hash−CAMを第2のメモリブロックであるバッファメモリ121で行う方法、第1のメモリブロック16で行う方法の2通りを用いることができる。後者は実施形態1と同様なので説明を省略し、前者について以下説明する。   In the present embodiment, two methods can be used: a method in which Hash-CAM is performed in the buffer memory 121 which is the second memory block, and a method in which the first memory block 16 is performed. Since the latter is the same as that of the first embodiment, the description is omitted, and the former will be described below.

メタデータテーブルを作成する際には、第1のメモリブロック16からデータを読み出してバッファメモリ121内に格納してハッシュ値化する。Hash−CAMをバッファメモリ121内で行うので、メタデータアドレスはバッファメモリ121の物理アドレスに対応させておく。   When creating the metadata table, data is read from the first memory block 16, stored in the buffer memory 121, and converted into a hash value. Since Hash-CAM is performed in the buffer memory 121, the metadata address corresponds to the physical address of the buffer memory 121.

作成したメタデータテーブルは第1のメモリブロック16に書き戻すか、第2のメモリブロックであるバッファメモリ121に保持しておく。これにより、メタデータテーブルに対してkey−value型データの参照を行うことができる。   The created metadata table is written back to the first memory block 16 or stored in the buffer memory 121 as the second memory block. Thereby, key-value type data can be referred to the metadata table.

メタデータテーブルがバッファメモリ121のサイズに比べて小さい場合は、第1のメモリブロック16よりも高速なバッファメモリ121内でkey−value型データの参照を行うことができるため、検索がより高速になる。   When the metadata table is smaller than the size of the buffer memory 121, the key-value type data can be referred to in the buffer memory 121 that is faster than the first memory block 16, so that the search can be performed faster. Become.

さらに、バッファメモリ121が不揮発性のRAMの場合は、メタデータを第1のメモリブロック16に書き戻すことなく、メモリシステムの電源をオフにすることができる。再び電源をオンにした後でも、メタデータテーブルはバッファメモリ121に保存されているので、第1のメモリブロック16から読み出す処理は必要ない。このため、結果として全体的な速度向上が得られる。その他の構成及び効果は前述した第1実施形態と同様である。   Further, when the buffer memory 121 is a non-volatile RAM, the power of the memory system can be turned off without writing the metadata back to the first memory block 16. Even after the power is turned on again, the metadata table is stored in the buffer memory 121, so that the process of reading from the first memory block 16 is not necessary. This results in an overall speed improvement. Other configurations and effects are the same as those of the first embodiment described above.

本実施形態では、Hash−CAMに必要な機能がローカルコントローラ付近に備わっているが、必ずしもHash−CAMはバッファメモリに対して行われる必要はなく、第1実施形態と同様に第1のメモリブロックに対して行われても良い。メタデータテーブルが小さい場合はバッファメモリテーブルにすべて読み出してからHash−CAMを行う方が高速だが、メタデータテーブルがバッファメモリサイズよりも大きい場合、直接第1のメモリブロックに対してHash−CAM動作を行った方が高速になる場合もある。   In the present embodiment, the functions necessary for the Hash-CAM are provided near the local controller. However, the Hash-CAM is not necessarily performed on the buffer memory, and the first memory block is the same as in the first embodiment. It may be done against. When the metadata table is small, it is faster to perform Hash-CAM after reading all data into the buffer memory table. However, when the metadata table is larger than the buffer memory size, the Hash-CAM operation is directly performed on the first memory block. In some cases, it is faster.

[第5の実施形態]
本実施形態は、第4実施形態と同様に、第2のメモリブロックであるバッファメモリ121でkey−value型データの参照を行うが、ローカルコントローラ12がハードウェアCAMを備えている。
[Fifth Embodiment]
In the present embodiment, as in the fourth embodiment, key-value type data is referred to by the buffer memory 121, which is the second memory block, but the local controller 12 includes a hardware CAM.

図8は、第5実施形態のメモリシステムのハードウェア構成を示すブロック図である。
図示するように、バッファメモリ121にCAM122が接続されている。図ではバッファメモリ121とCAM122とが区別して書かれているが、これらが物理的に結合していても良い。
FIG. 8 is a block diagram illustrating a hardware configuration of the memory system according to the fifth embodiment.
As shown in the figure, a CAM 122 is connected to the buffer memory 121. In the figure, the buffer memory 121 and the CAM 122 are written separately, but they may be physically coupled.

CAM122の出力(ヒット信号)はバッファメモリ121の一部分(例えば、半分程度のメモリ容量)と直接接続されており、CAM122とバッファメモリ121の一部分とでCAM−RAMが構成されている。このため、データ(コンテンツ)指定によるデータの読み出しが可能となっている。   The output (hit signal) of the CAM 122 is directly connected to a part of the buffer memory 121 (for example, about half the memory capacity), and the CAM 122 and a part of the buffer memory 121 constitute a CAM-RAM. Therefore, it is possible to read data by specifying data (content).

ハードウェアCAM122を用いることで、Hash−CAMのようなアドレスの衝突が原理的に起こらない。このため、keyとvalueの照合手続きと検索やり直しが発生することがないので、検索がより高速になる。   By using the hardware CAM 122, an address collision like Hash-CAM does not occur in principle. For this reason, since the key and value collation procedures and the search re-execution do not occur, the search becomes faster.

さらに、バッファメモリ121はアクセス性能が高い反面、メモリ容量が第1のメモリブロック16よりも小さいので、効率的なメモリ空間の運用が求められる。本実施形態では、CAM122を追加することにより、バッファメモリ121のメモリ空間は最大効率で利用可能となる。その他の構成及び効果は前述した第2実施形態と同様である。   Furthermore, while the buffer memory 121 has high access performance, the memory capacity is smaller than that of the first memory block 16, so that efficient operation of the memory space is required. In this embodiment, by adding the CAM 122, the memory space of the buffer memory 121 can be used with maximum efficiency. Other configurations and effects are the same as those of the second embodiment described above.

[第6の実施形態]
本実施形態は、第1実施形態とほぼ同様のハードウェア構成を取るが、メモリシステム10内にローカルコントローラが存在しない点で異なる。
[Sixth Embodiment]
The present embodiment has substantially the same hardware configuration as the first embodiment, but differs in that there is no local controller in the memory system 10.

図9は、第6実施形態のメモリシステムのハードウェア構成を示すブロック図である。
図示するように、ホストインターフェース11が直接、メモリコントローラ13へ接続されている。
FIG. 9 is a block diagram illustrating a hardware configuration of the memory system according to the sixth embodiment.
As shown in the figure, the host interface 11 is directly connected to the memory controller 13.

key−valueストア方式の実現方法は第1実施形態と同様であるが、論理アドレス−物理アドレス変換テーブルの取り扱いが異なる。ローカルコントローラおよび第2のメモリブロックがメモリシステム10内に存在しないため、論理アドレス−物理アドレス変換テーブルは、第1のメモリブロック16から読み出されて、メモリシステム10の外部、例えばメインメモリ102内で取り扱われる。   The method for realizing the key-value store method is the same as that in the first embodiment, but the handling of the logical address-physical address conversion table is different. Since the local controller and the second memory block do not exist in the memory system 10, the logical address-physical address conversion table is read from the first memory block 16 and is external to the memory system 10, for example, in the main memory 102. Handled by.

Hash−CAMは第1実施形態と同様にメモリコントローラ13内で固定長データ生成器14を駆使して行われるため、メタデータテーブル162でのkey−value型データの格納はメモリシステム10内で行われる。key−value型データだけではなく、メタデータテーブル162の変更点もホストシステムに返され、論理アドレス−物理アドレス変換テーブルに反映された後に、適宜、第1のメモリブロック16へ書き戻される。   Since Hash-CAM is performed using the fixed-length data generator 14 in the memory controller 13 as in the first embodiment, key-value type data is stored in the metadata table 162 within the memory system 10. Is called. Not only the key-value type data but also the changes in the metadata table 162 are returned to the host system, reflected in the logical address-physical address conversion table, and then written back to the first memory block 16 as appropriate.

本実施形態では、メモリシステム10内部にバッファメモリやローカルコントローラを持たず、機能を簡素化しているため、メモリシステム自体はコンパクトになる。   In the present embodiment, since the memory system 10 does not have a buffer memory or a local controller and has simplified functions, the memory system itself is compact.

なお、メモリシステム10が主体的にkey−valueストア方式を実行するために、ダイレクトメモリアクセスコントローラ(DMAC)を備え、メモリシステム10とメインメモリ102との間のデータ転送をDMACが制御しても良い。その他の構成及び効果は前述した第1実施形態と同様である。   Note that a direct memory access controller (DMAC) is provided in order for the memory system 10 to actively execute the key-value store method, and the DMAC controls data transfer between the memory system 10 and the main memory 102. good. Other configurations and effects are the same as those of the first embodiment described above.

[第7の実施形態]
本実施形態は、第2実施形態とほぼ同様のハードウェア構成を取るが、メモリシステム10内にローカルコントローラが存在しない点で異なる。
[Seventh Embodiment]
The present embodiment has substantially the same hardware configuration as the second embodiment, but differs in that there is no local controller in the memory system 10.

図10は、第7実施形態のメモリシステムのハードウェア構成を示すブロック図である。
ハードウェアCAMによるkey−valueストア方式の実現方法は第2実施形態と同様であり、ローカルコントローラがないことによる機能の特徴は第6の実施形態と同様であるため、説明を省略する。
FIG. 10 is a block diagram illustrating a hardware configuration of the memory system according to the seventh embodiment.
The method for realizing the key-value store method by the hardware CAM is the same as that of the second embodiment, and the feature of the function due to the absence of the local controller is the same as that of the sixth embodiment.

[第8の実施形態]
本実施形態は、第3実施形態とほぼ同様のハードウェア構成を取るが、メモリシステム10内にローカルコントローラが存在しない点で異なる。
[Eighth Embodiment]
The present embodiment has substantially the same hardware configuration as that of the third embodiment, but differs in that no local controller is present in the memory system 10.

図11は、第8実施形態のメモリシステムのハードウェア構成を示すブロック図である。
CAM−RAMによるkey−valueストア方式の実現方法は第3の実施形態と同様であり、ローカルコントローラがないことによる機能の特徴は第6実施形態と同様であるため、説明を省略する。
FIG. 11 is a block diagram illustrating a hardware configuration of the memory system according to the eighth embodiment.
The method for realizing the key-value store method using the CAM-RAM is the same as that of the third embodiment, and the feature of the function due to the absence of the local controller is the same as that of the sixth embodiment.

以上のように、本実施形態では、key−valueストア方式の仕組みをメタデータとそのテーブル、及び検索器としてのハッシュ生成器(Hash−CAM)、ハードウェアCAM(CAM−RAM)で実現する。   As described above, in the present embodiment, the key-value store scheme is realized by metadata, its table, a hash generator (Hash-CAM) as a searcher, and a hardware CAM (CAM-RAM).

前述した第1から第8実施形態を用いて、key−valueストア方式が実現される場合、さらに、以下のような変形例を取ることが可能であり、以下に具体的に示す。なお、本出願の本旨としては変形例よりも上記実施形態が優先的に解釈される。   When the key-value store method is realized by using the first to eighth embodiments described above, the following modifications can be further taken, which will be specifically described below. In addition, the said embodiment is preferentially interpreted rather than a modification as the main point of this application.

[変形例1]
図12は、変形例1における第1のメモリブロック16内の実データ領域161とメタデータテーブル162との関係、及びkey−valueストア方式の仕組みを模式的に示す図である。
[Modification 1]
FIG. 12 is a diagram schematically illustrating the relationship between the actual data area 161 in the first memory block 16 and the metadata table 162 and the mechanism of the key-value store method in the first modification.

図12に示す実データ領域161では、実データアドレスに、データファイルと、そのファイルに対応するファイル名あるいはファイルIDと、ファイルから抽出したkeyと、keyが格納されたメタデータアドレスとが格納されている。このような保存の方法は、ホストシステムからの命令で行うことができるほか、メモリシステム10に予めkey抽出機能とメタデータアドレス割り当て機能が備わっていれば実現できる。   In the actual data area 161 shown in FIG. 12, a data file, a file name or file ID corresponding to the file, a key extracted from the file, and a metadata address storing the key are stored in the actual data address. ing. Such a storage method can be performed by an instruction from the host system, and can be realized if the memory system 10 has a key extraction function and a metadata address assignment function in advance.

メタデータテーブル162には、実データアドレスにファイルを保存する際に抽出されたkeyと、keyに対応するvalueとして、keyが存在する実データアドレスと、keyと関連付けられる別のkey−value型データが保存されたメタデータアドレスとが保存されている。   The metadata table 162 includes a key extracted when a file is stored at a real data address, a real data address where the key exists as a value corresponding to the key, and another key-value type data associated with the key. And the metadata address where is stored.

このようなアドレス管理により、ローカルコントローラ12あるいはメモリコントローラ13がkey検索要求を指示したとき、メモリコントローラ13はメタデータアドレスからkeyを検索する。   With such address management, when the local controller 12 or the memory controller 13 instructs a key search request, the memory controller 13 searches for the key from the metadata address.

例えば、“book”を含むファイル名を得たいとき、まずメタデータアドレスから“book”を検索する。“book”はメタデータアドレス$002に格納されている。このメタデータアドレス$002から、valueとして実アドレスの&001、&002と、メタデータアドレスの$011、$012が得られる。   For example, to obtain a file name including “book”, first, “book” is searched from the metadata address. “Book” is stored at the metadata address $ 002. From this metadata address $ 002, real values & 001 and & 002 and metadata addresses $ 011 and $ 012 are obtained as values.

ここで、検索結果として実アドレスを返すことができる。さらに、valueのメタデータアドレスをたどることで、“book”が所属する集合名をたどることができる。例えば、$011では、“a-file.txt”というkeyとそれに対するvalueの実データアドレス、メタデータアドレスを得ることができる。   Here, a real address can be returned as a search result. Furthermore, by following the metadata address of the value, the set name to which “book” belongs can be traced. For example, at $ 011, a key “a-file.txt” and the actual data address and metadata address of the key can be obtained.

このように、メタデータテーブル162を連続してたどり、検索結果として求めていた値(実データ)を得ることができる。本変形例では、メタデータテーブルに存在するのはkeyのみであって、実際のkeyは実データ領域161の実アドレスに格納されている。   Thus, the value (actual data) obtained as a search result can be obtained by continuously tracing the metadata table 162. In this modification, only the key exists in the metadata table, and the actual key is stored at the real address in the real data area 161.

[変形例2]
図13は、変形例2における第1のメモリブロック16内の実データ領域161とメタデータテーブル162との関係、及びkey−valueストア方式の仕組みを模式的に示す図である。
[Modification 2]
FIG. 13 is a diagram schematically illustrating the relationship between the actual data area 161 and the metadata table 162 in the first memory block 16 and the mechanism of the key-value store method in the second modification.

図13に示す実データ領域161では、実データアドレスに、ファイルと、そのファイルに対応するファイル名あるいはファイルIDが格納されている。メタデータテーブル162には、ファイルから抽出されたkeyと、それに対応するvalueとしてのkeyが存在する実アドレスと、keyに関連付けられた別集合あるいは要素を保存するメタデータアドレスが格納されている。   In the actual data area 161 shown in FIG. 13, a file and a file name or file ID corresponding to the file are stored in the actual data address. The metadata table 162 stores a key extracted from a file, a real address where a key corresponding to the key exists, and a metadata address for storing another set or element associated with the key.

変形例1と同様に、ローカルコントローラ12あるいはメモリコントローラ13がkey検索要求を指示したとき、メモリコントローラ13はメタデータアドレスからkeyを検索する。   As in the first modification, when the local controller 12 or the memory controller 13 instructs a key search request, the memory controller 13 searches for the key from the metadata address.

例えば、“book”を含むファイル名を得たいとき、まずメタデータアドレスから“book”を検索する。“book”はメタデータアドレス$002に格納されている。このメタデータアドレス$002から、valueとして実データアドレスの&011と、メタデータアドレスの$011、$012が得られる。   For example, to obtain a file name including “book”, first, “book” is searched from the metadata address. “Book” is stored at the metadata address $ 002. From this metadata address $ 002, & 011 of the actual data address and $ 011 and $ 012 of the metadata address are obtained as values.

ここで、実データアドレスは“book”が所属するファイルの保管場所ではなく、keyの実データアドレス中の保存場所を示している。一方、valueのメタデータアドレスは“book”が所属する集合を示す。このため、メタデータアドレスをたどり、$011、$012のそれぞれのvalueの実データアドレスが得られて、これらを検索結果として返すか、あるいは実データアドレスをたどって&001、&002のデータを返すことになる。変形例2は、変形例1よりも実データ領域(実アドレス空間)161の一つのアドレスあたりのデータ量が少ないという利点がある。   Here, the actual data address indicates not the storage location of the file to which “book” belongs, but the storage location in the actual data address of the key. On the other hand, the metadata address of value indicates a set to which “book” belongs. Therefore, the metadata address is traced and the actual data addresses of the values $ 011 and $ 012 are obtained and returned as search results, or the actual data addresses are traced and & 001 and & 002 data are returned. become. Modification 2 has an advantage that the amount of data per address in the real data area (real address space) 161 is smaller than that in Modification 1.

[変形例3]
図14は、変形例3における第1のメモリブロック16内の実データ領域161とメタデータテーブル162との関係、及びkey−valueストア方式の仕組みを模式的に示す図である。
[Modification 3]
FIG. 14 is a diagram schematically showing the relationship between the actual data area 161 and the metadata table 162 in the first memory block 16 and the mechanism of the key-value store method in the third modification.

本変形例では、メタデータの実態が実データ領域161の実データアドレスに保管されていることを示す。   This modification shows that the actual state of metadata is stored at the actual data address in the actual data area 161.

図14に示す実データ領域161では、実データアドレスに、ファイルと、そのファイルに対応するファイル名あるいはファイルIDと、さらにkeyのメタデータアドレスとが格納されている。   In the actual data area 161 shown in FIG. 14, a file, a file name or file ID corresponding to the file, and a key metadata address are stored in the actual data address.

メタデータテーブル162では、メタデータアドレスに、ファイルから抽出されたkeyと、それに対応するvalueとしてのkeyが存在する実データアドレスが格納されている。また、メタデータアドレスに対応する物理アドレスが示されている。   In the metadata table 162, the metadata address stores the actual data address where the key extracted from the file and the corresponding key as a value exist. In addition, a physical address corresponding to the metadata address is shown.

このように、メタデータアドレスが実データアドレスと別の物理アドレス空間に割り当てられている場合、メタデータアドレスと物理アドレスの対応表は第1のメモリブロック16に保存されており、メモリシステム(ローカルシステム)あるいはホストシステムがその対応表を呼び出して使用する。   As described above, when the metadata address is assigned to a physical address space different from the actual data address, the correspondence table between the metadata address and the physical address is stored in the first memory block 16, and the memory system (local System) or the host system calls and uses the correspondence table.

また、メタデータテーブル内のkey検索の方法と、連続したアドレスにvalueが保管されている例を示す。   In addition, a key search method in the metadata table and an example in which values are stored at consecutive addresses are shown.

メタデータテーブル162内のkey−value型データは、図15に示すように、実現することも可能である。メタデータアドレス空間は、第1のメモリブロック16の特定の物理アドレス空間に対応しているものとする。連続したメタデータアドレスの被検索領域を、Slotという単位で区切るものとする。Slot内の先頭領域にはkeyが格納されている。   The key-value type data in the metadata table 162 can also be realized as shown in FIG. The metadata address space is assumed to correspond to a specific physical address space of the first memory block 16. It is assumed that search target areas of continuous metadata addresses are divided by a unit called Slot. The key is stored in the head area in the slot.

図15に示す例では、“pen”というkeyを検索する。keyは一文字ずつメモリコントローラ13が与え、Slot全体を検索する。この例でのkey検索の仕組みには、実施形態で示したメモリコントローラ13、レジスタメモリ15におけるハードウェアCAMが用いられる。   In the example shown in FIG. 15, the key “pen” is searched. The key is given by the memory controller 13 character by character, and the entire slot is searched. The key search mechanism in this example uses the hardware CAM in the memory controller 13 and the register memory 15 described in the embodiment.

“pen”のうち最初の“p”が得られたSlotは、一致フラグを立てておき、そのSlotは次に“e”を検索する。連続してヒットした場合、同様にフラグを立てて次を検索するという操作を継続する。そうして、図15では、#003と#102でkeyの一致が得られ、そのSlotでそのまま連続して読み出すとvalueが得られる。keyとvalueの区切りには、制御コードが挿入されているので区別できるものとする。   The slot where the first “p” of “pen” is obtained sets a match flag, and the slot searches for “e” next. If there is a continuous hit, the operation of setting the flag in the same manner and searching for the next is continued. Thus, in FIG. 15, a key match is obtained at # 003 and # 102, and value is obtained by continuously reading as it is with the slot. Since a control code is inserted in the separator between the key and the value, it can be distinguished.

また、これを拡張すると、don‘t care マスクビットを与えた検索を行うこともできる。   If this is expanded, a search with don't care mask bits can also be performed.

[変形例4]
本変形例では、固定長のkeyを格納したkey−value型データと、それによる全文検索を例として示す。
[Modification 4]
In this modification, key-value type data storing a fixed-length key and full-text search using the key-value type data are shown as an example.

固定長ビットの必要性は、検索方式に依存する。全文検索方式は(1)逐次検索、(2)索引検索の2つに大別される。さらに、索引作成(インデクシング)の方法で分類でき、(a)形態素解析、(b)N−gram、(c)接尾辞法、が知られている。   The need for fixed-length bits depends on the search scheme. The full text search system is roughly divided into two types: (1) sequential search and (2) index search. Furthermore, it can classify | categorize with the method of index creation (indexing), (a) Morphological analysis, (b) N-gram, (c) Suffix method is known.

これらのうち、形態素解析は、予め用意された辞書内に存在する単語を抽出する方法である。N−gramは、辞書を用意する必要がなく、単語をN個の要素に分割し、任意の文字列が検索できる。例えば検索対象の集合をSとすると、Sの分割の仕方が1文字ずつならuni−gram、2文字ずつならbi−gram、N文字ずつならN−gramとなる。例えば、S=innovationを分解すると、bi−gramなら、その分割要素(トークン)がat, in, io, nn, no, n, on, ov, ti, va となる。接尾辞法は、任意長を扱うが索引ファイルの圧縮に向いている。   Among these, the morphological analysis is a method of extracting words existing in a dictionary prepared in advance. N-gram does not require a dictionary and can divide a word into N elements and search for an arbitrary character string. For example, if the set to be searched is S, the division method of S is uni-gram if it is one character, bi-gram if it is two characters, N-gram if it is N characters. For example, when S = innovation is decomposed, if it is a bi-gram, its divided elements (tokens) become at, in, io, nn, no, n, on, ov, ti, va. The suffix method handles arbitrary lengths, but is suitable for index file compression.

図16に示す実データ領域161では、実データアドレスに、ファイルと、そのファイルに対応するファイル名あるいはファイルIDとが格納されている。メタデータテーブル162では、メタデータアドレスに、ファイルからN−gram方式で抽出されたkeyが格納されている。   In the actual data area 161 shown in FIG. 16, a file and a file name or file ID corresponding to the file are stored at the actual data address. In the metadata table 162, the key extracted from the file by the N-gram method is stored in the metadata address.

この例では、メタデータのkeyは、実データアドレスに保存されている“innovation”から分解抽出したbi−gramである。keyに対応するvalueとして実アドレスが示され、bi−gramでファイルから抽出された際のファイル中の出現位置(position)がペアで格納されている。bi−gramでの検索は、keyを検索したあとはkeyの出現回数でソートし、そのファイル中の位置情報を比較して連続したキーワードであることを確認し、所望の検索語の集合を求める。   In this example, the key of metadata is a bi-gram that is decomposed and extracted from “innovation” stored in the actual data address. The real address is indicated as a value corresponding to the key, and the appearance position (position) in the file when it is extracted from the file by bi-gram is stored in pairs. In bi-gram search, after searching for keys, sort by the number of occurrences of keys, compare position information in the file to confirm that they are continuous keywords, and obtain a desired set of search terms. .

ここで、keyが固定長であるため、そのままハッシュ化してkey−value型データを構成することができる。図16の例では、“at”、“in”、がその順でメタデータアドレスにそれぞれ格納されている。実際は、N−gramトークンを、ASCIIやUTF−6などのコードにてビット列で表し、それを短縮してメタデータアドレスとしても良い。   Here, since the key has a fixed length, it can be hashed as it is to form key-value type data. In the example of FIG. 16, “at” and “in” are respectively stored in the metadata address in that order. Actually, the N-gram token may be represented by a bit string using a code such as ASCII or UTF-6, and may be shortened to be a metadata address.

このように、本実施形態によるkey−valueストア方式は固定長を扱うN−gramと相性が良く、高速なインデクシングに向いている。全文検索では、検索は速いがインデクシングに時間がかる。インデクシングは、要素と集合であるメタデータテーブルを適宜読み出し、追加・更新・削除が必要な要素の検索と、その集合の編集を行う。このため、ファイルアクセスが頻発することになるため、本実施形態のメモリシステムを用いることで、メモリシステム内での効率的なkey−valueストア方式の実現によって、ホストシステムに負荷をかけず、高速にインデクシングを行うことも可能となる。   Thus, the key-value store method according to the present embodiment is compatible with N-gram handling a fixed length and is suitable for high-speed indexing. Full-text search is fast but takes time to index. The indexing appropriately reads out a metadata table that is an element and a set, searches for an element that needs to be added / updated / deleted, and edits the set. For this reason, since file access occurs frequently, by using the memory system of the present embodiment, an efficient key-value store method in the memory system can be realized without imposing a load on the host system. It is also possible to perform indexing.

本実施形態においては、メモリシステムにおけるkey−valueストア方式の有用性を示す例として、度々、全文検索の手順で説明したが、本実施形態は必ずしも全文検索に特化した技術ではない。   In the present embodiment, as an example of the usefulness of the key-value store method in the memory system, the full-text search procedure has been frequently described. However, the present embodiment is not necessarily a technique specialized for full-text search.

本実施形態は、メモリシステムにデータを格納する際の、メタデータを効率的に管理するために、key−valueストア方式の仕組みとその具体的構成を提供するものである。   The present embodiment provides a key-value store scheme and its specific configuration in order to efficiently manage metadata when data is stored in a memory system.

本発明のいくつかの実施形態を説明したが、これらの実施形態は、例として提示したものであり、発明の範囲を限定することは意図していない。これら新規な実施形態は、その他の様々な形態で実施されることが可能であり、発明の要旨を逸脱しない範囲で、種々の省略、置き換え、変更を行うことができる。これら実施形態やその変形は、発明の範囲や要旨に含まれるとともに、特許請求の範囲に記載された発明とその均等の範囲に含まれる。   Although several embodiments of the present invention have been described, these embodiments are presented by way of example and are not intended to limit the scope of the invention. These novel embodiments can be implemented in various other forms, and various omissions, replacements, and changes can be made without departing from the scope of the invention. These embodiments and modifications thereof are included in the scope and gist of the invention, and are included in the invention described in the claims and the equivalents thereof.

10…メモリシステム(またはローカルシステム)、11…ホストインターフェース、12…ローカルコントローラ、13…メモリコントローラ(あるいはチップコントローラ)、14…固定長データ生成器、15…レジスタメモリ(あるいはキャッシュメモリ)、16…第1のメモリブロック、24…コンテンツ連想メモリ(CAM)、101…CPU、102…メインメモリ、121…バッファメモリ、122…CAM−RAM、161…実データ領域(実アドレス空間)、162…メタデータテーブル、163…CAM−RAM。   DESCRIPTION OF SYMBOLS 10 ... Memory system (or local system), 11 ... Host interface, 12 ... Local controller, 13 ... Memory controller (or chip controller), 14 ... Fixed length data generator, 15 ... Register memory (or cache memory), 16 ... 1st memory block, 24 ... content associative memory (CAM), 101 ... CPU, 102 ... main memory, 121 ... buffer memory, 122 ... CAM-RAM, 161 ... real data area (real address space), 162 ... metadata Table, 163... CAM-RAM.

Claims (12)

インターフェースを介して、ホストからコマンドを受けて前記ホストにデータを転送するシステムにおいて、
keyと前記keyに対応するvalueの組であるkey−value型データを含むメタデータテーブルと、データ領域とを格納する不揮発性メモリと、
前記不揮発性メモリにアクセスするコントローラと、
を備え、
前記メタデータテーブルの第1アドレスが指定する記憶場所には、前記key−value型データが記憶され、
前記第1アドレスが指定する記憶場所に記憶されたvalueには、前記データ領域における記憶場所を示す第2アドレスが記憶され、
前記第2アドレスが指定する記憶場所には、前記valueが記憶された記憶場所を示す第3アドレスと、前記keyとが格納され、
前記コントローラは、前記ホストから、前記keyに関連付けられたvalueの登録を命ずるコマンドが入力されたとき、前記keyが前記メタデータテーブルに存在するかを検索し、
前記keyが前記メタデータテーブルに存在していないとき、前記keyに関連付けられた前記valueが前記データ領域に保存されているかを判定し、
前記valueが前記データ領域に保存されていないとき、前記valueを前記データ領域の第4アドレスが指定する記憶場所に保存し、
前記valueが前記データ領域に保存されているとき、前記メタデータテーブルの第5アドレスが指定する記憶場所に、前記keyと、前記valueが保存された前記第4アドレスを登録するシステム
In a system for receiving a command from a host via an interface and transferring data to the host,
a non-volatile memory for storing a metadata table including a key-value type data that is a set of a key and a value corresponding to the key, and a data area;
A controller accessing the non-volatile memory;
With
The key-value type data is stored in the storage location specified by the first address of the metadata table,
In the value stored in the storage location designated by the first address, a second address indicating the storage location in the data area is stored,
The storage location designated by the second address stores a third address indicating the storage location where the value is stored, and the key.
The controller searches for whether the key exists in the metadata table when a command for ordering registration of a value associated with the key is input from the host.
When the key does not exist in the metadata table, determine whether the value associated with the key is stored in the data area;
When the value is not stored in the data area, the value is stored in a storage location specified by the fourth address of the data area;
When the value is stored in the data area, the key and the fourth address storing the value are registered in a storage location specified by the fifth address of the metadata table .
インターフェースを介して、ホストからコマンドを受けて前記ホストにデータを転送するシステムにおいて、
keyと前記keyに対応するvalueの組であるkey−value型データを含むメタデータテーブルと、データ領域とを格納する不揮発性メモリと、
前記不揮発性メモリにアクセスするコントローラと、
を備え、
前記メタデータテーブルの第1アドレスが指定する記憶場所には、前記key−value型データが記憶され、
前記第1アドレスが指定する記憶場所に記憶されたvalueには、前記データ領域における記憶場所を示す第2アドレスが記憶され、
前記第2アドレスが指定する記憶場所には、前記valueが記憶された記憶場所を示す第3アドレスと、前記keyとが格納され、
前記コントローラは、前記ホストから、前記keyに関連付けられたvalue集合にvalueの追加を命ずるコマンドを受け取ったとき、前記keyが前記メタデータテーブルに存在するかを検索し、
前記keyが前記メタデータテーブルに存在するとき、前記keyに対応する前記valueに保存された前記データ領域の第4アドレスが指定する記憶場所を参照し、
前記第4アドレスが指定する記憶場所に空きがあるか調べ、空きがないときは別のvalueの前記データ領域の第5アドレスへジャンプするポインタを格納し、空きがあるときは前記第4アドレスが指定する記憶場所に前記valueを追加するシステム
In a system for receiving a command from a host via an interface and transferring data to the host,
a non-volatile memory for storing a metadata table including a key-value type data that is a set of a key and a value corresponding to the key, and a data area;
A controller accessing the non-volatile memory;
With
The key-value type data is stored in the storage location specified by the first address of the metadata table,
In the value stored in the storage location designated by the first address, a second address indicating the storage location in the data area is stored,
The storage location designated by the second address stores a third address indicating the storage location where the value is stored, and the key.
When the controller receives a command from the host to add a value to the value set associated with the key, the controller searches whether the key exists in the metadata table;
When the key exists in the metadata table, refer to the storage location specified by the fourth address of the data area stored in the value corresponding to the key;
A check is made to see if there is an empty storage location designated by the fourth address. If there is no empty, a pointer for jumping to the fifth address of the data area of another value is stored. A system for adding the value to a designated storage location .
インターフェースを介して、ホストからコマンドを受けて前記ホストにデータを転送するシステムにおいて、
keyと前記keyに対応するvalueの組であるkey−value型データを含むメタデータテーブルと、データ領域とを格納する不揮発性メモリと、
前記不揮発性メモリにアクセスするコントローラと、
を備え、
前記メタデータテーブルの第1アドレスが指定する記憶場所には、前記key−value型データが記憶され、
前記第1アドレスが指定する記憶場所に記憶されたvalueには、前記データ領域における記憶場所を示す第2アドレスが記憶され、
前記第2アドレスが指定する記憶場所には、前記valueが記憶された記憶場所を示す第3アドレスと、前記keyとが格納され、
前記コントローラは、前記ホストから、前記keyに関連付けられたvalueを出力することを命ずるコマンドを受け取ったとき、前記keyが前記メタデータテーブルに存在するかを検索し、
前記keyが前記メタデータテーブルに存在するとき、前記keyに対応する前記valueに保存された前記データ領域の第4アドレスが指定する記憶場所を参照し、
前記第4アドレスが指定する記憶場所に記憶されたvalueを読み出すシステム
In a system for receiving a command from a host via an interface and transferring data to the host,
a non-volatile memory for storing a metadata table including a key-value type data that is a set of a key and a value corresponding to the key, and a data area;
A controller accessing the non-volatile memory;
With
The key-value type data is stored in the storage location specified by the first address of the metadata table,
In the value stored in the storage location designated by the first address, a second address indicating the storage location in the data area is stored,
The storage location designated by the second address stores a third address indicating the storage location where the value is stored, and the key.
When the controller receives a command from the host to output the value associated with the key, the controller searches whether the key exists in the metadata table;
When the key exists in the metadata table, refer to the storage location specified by the fourth address of the data area stored in the value corresponding to the key;
A system for reading a value stored in a storage location designated by the fourth address .
keyと前記keyに対応するvalueの組であるkey−value型データを含むkey−valueストアを備えたシステムにおいて、
前記key−value型データを含むメタデータテーブルと、データ領域とを格納する不揮発性メモリと、
前記不揮発性メモリにアクセスするコントローラと、
を備え、
前記メタデータテーブルの第1アドレスは、第1key−value型データが記憶された記憶場所を示し、
前記第1アドレスが指定する記憶場所に記憶された前記keyに対応するvalueには、前記keyと関連付けられた第2key−value型データの前記メタデータテーブルの記憶場所を示す第2アドレスと、前記データ領域の記憶場所を示す第3アドレスとが記憶され、
前記第2アドレスが指定する記憶場所には、前記第3アドレスが記憶され、
前記第3アドレスが指定する記憶場所には、前記valueと前記keyとが格納されているシステム
In a system including a key-value store including a key-value type data which is a set of a key and a value corresponding to the key,
A non-volatile memory for storing a metadata table including the key-value type data and a data area;
A controller accessing the non-volatile memory;
With
The first address of the metadata table indicates a storage location where the first key-value type data is stored,
In the value corresponding to the key stored in the storage location designated by the first address, the second address indicating the storage location of the metadata table of the second key-value type data associated with the key, and A third address indicating the storage location of the data area is stored;
The third address is stored in a storage location designated by the second address,
A system in which the value and the key are stored in a storage location designated by the third address .
keyと前記keyに対応するvalueの組であるkey−value型データを含むkey−valueストアを備えたシステムにおいて、
前記key−value型データを含むメタデータテーブルと、データ領域とを格納する不揮発性メモリと、
前記不揮発性メモリにアクセスするコントローラと、
を備え、
前記メタデータテーブルの第1アドレスは、第1key−value型データが記憶された記憶場所を示し、
前記第1アドレスが指定する記憶場所に記憶された前記keyに対応するvalueには、前記keyと関連付けられた第2key−value型データの前記メタデータテーブルの記憶場所を示す第2アドレスと、前記データ領域の記憶場所を示す第3アドレスとが記憶され、
前記第2アドレスが指定する記憶場所には、前記データ領域の記憶場所を示す第4アドレスが記憶され、
前記第4アドレスが指定する記憶場所には、前記valueが格納され、
前記第3アドレスが指定する記憶場所には、前記keyが格納されているシステム
In a system including a key-value store including a key-value type data which is a set of a key and a value corresponding to the key,
A non-volatile memory for storing a metadata table including the key-value type data and a data area;
A controller accessing the non-volatile memory;
With
The first address of the metadata table indicates a storage location where the first key-value type data is stored,
In the value corresponding to the key stored in the storage location designated by the first address, the second address indicating the storage location of the metadata table of the second key-value type data associated with the key, and A third address indicating the storage location of the data area is stored;
In the storage location designated by the second address, a fourth address indicating the storage location of the data area is stored,
The value is stored in the storage location designated by the fourth address,
A system in which the key is stored in a storage location designated by the third address .
keyと前記keyに対応するvalueの組であるkey−value型データを含むkey−valueストアを備えたメモリシステムにおいて、
前記key−value型データを含むメタデータテーブルと、データ領域とを格納する不揮発性メモリと、
前記不揮発性メモリにアクセスするコントローラと、
を備え、
前記メタデータテーブルの第1アドレスは、前記key−value型データが記憶された記憶場所を示し、
前記第1アドレスが指定する記憶場所に記憶された前記keyに対応するvalueには、前記データ領域の記憶場所を示す第2アドレスが記憶され、
前記第2アドレスが指定する記憶場所には、前記メタデータテーブルの記憶場所を示す第3アドレスが記憶され、
前記第3アドレスが指定する記憶場所には、前記データ領域の記憶場所を示す第4アドレスが記憶され、
前記第4アドレスが指定する記憶場所には、前記valueが格納され、
前記第1アドレスが指定する記憶場所には、前記第1アドレスに対応する物理アドレスが記憶されているシステム
In a memory system including a key-value store including a key-value type data that is a set of a key and a value corresponding to the key,
A non-volatile memory for storing a metadata table including the key-value type data and a data area;
A controller accessing the non-volatile memory;
With
The first address of the metadata table indicates a storage location where the key-value type data is stored,
The value corresponding to the key stored in the storage location designated by the first address stores a second address indicating the storage location of the data area,
The storage location specified by the second address stores a third address indicating the storage location of the metadata table,
The storage location designated by the third address stores a fourth address indicating the storage location of the data area,
The value is stored in the storage location designated by the fourth address,
A system in which a physical address corresponding to the first address is stored in a storage location designated by the first address .
keyと前記keyに対応するvalueの組であるkey−value型データを含むkey−valueストアを備えたメモリシステムにおいて、
前記key−value型データを含むメタデータテーブルと、データ領域とを格納する不揮発性メモリと、
前記不揮発性メモリにアクセスするコントローラと、
を備え、
前記メタデータテーブルの第1アドレスは、前記key−value型データが記憶された記憶場所を示し、
前記第1アドレスが指定する記憶場所に前記keyとして、前記keyが分割された要素が記憶され、
前記第1アドレスが指定する記憶場所に前記keyに対応するvalueとして、前記データ領域の記憶場所を示す第2アドレスが記憶され、
前記第2アドレスが指定する記憶場所には、第3アドレスと、前記value中の前記keyの出現位置とが記憶され、
前記第3アドレスが指定する記憶場所には、前記valueが格納されるシステム
In a memory system including a key-value store including a key-value type data that is a set of a key and a value corresponding to the key,
A non-volatile memory for storing a metadata table including the key-value type data and a data area;
A controller accessing the non-volatile memory;
With
The first address of the metadata table indicates a storage location where the key-value type data is stored,
An element obtained by dividing the key is stored as the key in a storage location designated by the first address,
A second address indicating a storage location of the data area is stored as a value corresponding to the key in a storage location designated by the first address;
The storage location specified by the second address stores the third address and the appearance position of the key in the value,
A system in which the value is stored in a storage location designated by the third address .
前記コントローラは、前記keyからアドレス取得部を用いて前記第1アドレスを取得する請求項4乃至7のいずれかに記載のシステム The system according to claim 4, wherein the controller acquires the first address from the key using an address acquisition unit . 前記アドレス取得部は、前記keyをハッシュ関数によって前記第1アドレスに変換するハッシュ生成器である請求項8に記載のシステム The system according to claim 8, wherein the address acquisition unit is a hash generator that converts the key into the first address using a hash function . 前記アドレス取得部は、前記keyの入力に対して、前記keyと前記アドレス取得部内に格納されたデータとの比較を行い、一致したデータの前記第1アドレスを取得するコンテンツ連想メモリ(CAM)である請求項8に記載のシステム The address acquisition unit compares the key with the data stored in the address acquisition unit in response to the key input, and obtains the first address of the matched data by a content associative memory (CAM). The system of claim 8 . 前記key−value型データに、前記コントローラを介さず直接アクセスするダイレクトメモリアクセスコントローラをさらに備える請求項1乃至10のいずれかに記載のシステム The system according to claim 1, further comprising a direct memory access controller that directly accesses the key-value type data without using the controller . 前記不揮発性メモリはNANDフラッシュメモリである請求項1乃至11のいずれかに記載のシステム The system according to claim 1, wherein the nonvolatile memory is a NAND flash memory .
JP2015209305A 2015-10-23 2015-10-23 system Expired - Fee Related JP6034467B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015209305A JP6034467B2 (en) 2015-10-23 2015-10-23 system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015209305A JP6034467B2 (en) 2015-10-23 2015-10-23 system

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2014221667A Division JP5833212B2 (en) 2014-10-30 2014-10-30 Memory system having a key-value store system

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2016207128A Division JP6258436B2 (en) 2016-10-21 2016-10-21 Memory system local controller

Publications (2)

Publication Number Publication Date
JP2016021264A JP2016021264A (en) 2016-02-04
JP6034467B2 true JP6034467B2 (en) 2016-11-30

Family

ID=55266026

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015209305A Expired - Fee Related JP6034467B2 (en) 2015-10-23 2015-10-23 system

Country Status (1)

Country Link
JP (1) JP6034467B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102535828B1 (en) * 2018-02-06 2023-05-23 삼성전자주식회사 Memory controller and method of operating the memory controller
CN114328545B (en) * 2022-03-03 2022-07-08 北京蚂蚁云金融信息服务有限公司 Data storage and query method, device and database system

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0728690A (en) * 1993-07-14 1995-01-31 Hitachi Ltd Flash memory system
JP2005284417A (en) * 2004-03-26 2005-10-13 Fujitsu Ltd Random access method for xml document of table format, and its program
KR100885181B1 (en) * 2007-02-06 2009-02-23 삼성전자주식회사 Memory system performing group mapping operation and address mapping method thereof
JP2009020757A (en) * 2007-07-12 2009-01-29 Toshiba Corp Data registration apparatus, data registration method and program
WO2010114006A1 (en) * 2009-03-31 2010-10-07 日本電気株式会社 Storage system and storage access method and program
JP5367470B2 (en) * 2009-06-11 2013-12-11 日本放送協会 Storage server device and computer program
BRPI1013789A8 (en) * 2009-06-26 2017-10-10 Simplivity Corp COMPUTER SYSTEM COMPRISING A FILE SYSTEM AND METHOD OF NAMING AND STORING A FILE ON ONE OR MORE COMPUTER STORAGE DEVICES

Also Published As

Publication number Publication date
JP2016021264A (en) 2016-02-04

Similar Documents

Publication Publication Date Title
JP5524144B2 (en) Memory system having a key-value store system
JP5597666B2 (en) Semiconductor memory device, information processing system, and control method
US10642515B2 (en) Data storage method, electronic device, and computer non-volatile storage medium
US8868926B2 (en) Cryptographic hash database
KR20210057835A (en) Compressed Key-Value Store Tree Data Block Leak
US20100211616A1 (en) Performance by Avoiding Disk I/O for Deduplicated File Blocks
CN108984420A (en) Multiple name spaces in managing non-volatile memory (NVM)
WO2015145647A1 (en) Storage device, data processing method, and storage system
US9164704B2 (en) Semiconductor storage device for handling write to nonvolatile memories with data smaller than a threshold
JP2005267600A5 (en)
JP2013037551A (en) Memory system having key-value store
JP5646775B2 (en) Memory system having a key-value store system
JP6258436B2 (en) Memory system local controller
JP5833212B2 (en) Memory system having a key-value store system
WO2022212566A1 (en) Key storage for sorted string tables using content addressable memory
JP6034467B2 (en) system
US20200019539A1 (en) Efficient and light-weight indexing for massive blob/objects
JP6205386B2 (en) Semiconductor device and information writing / reading method
US11914587B2 (en) Systems and methods for key-based indexing in storage devices
JP2015181043A (en) Memory, data processing method and memory system

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20160707

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A132

Effective date: 20160712

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20160912

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20160927

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20161027

R151 Written notification of patent or utility model registration

Ref document number: 6034467

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees