DATABASE SYSTEM UTILIZING FORCED MEMORY ALIGNED ACCESS
A networked database management system (DBMS) and supporting infrastructure is disclosed. At least one node in the DBMS includes a processor having a preferred data alignment. An application operating on the processor has a preferred memory alignment. The application creates a data structure having multiple fields, each of which field exists on a boundary having the preferred memory alignment. This allows the application to access or write data into the fields with a lower processing overhead than if the fields were not forced to be on the preferred memory alignment.
1 . A node in a massively parallel database management system, the node comprising:
a) a processor having a preferred data alignment;
b) an application operating on the processor;
c) a memory buffer allocated by the application with the preferred data alignment;
d) wherein the application is adapted to create within the memory buffer a data structure having a plurality of fields;
e) wherein each of the plurality of fields is defined to be aligned on the preferred data alignment; and
f) wherein the application is adapted to insert data into the data structure.
2 . The node of claim 1 wherein the memory buffer is a pinned RDMA memory buffer.
3 . The node of claim 2 further comprising a network interface card, and wherein the application is adapted to communicate the data structure to the network interface card.
4 . The node of claim 3 wherein the network interface card is adapted to receive data over the network and is further adapted to write the received data into the RDMA memory buffer and wherein the data written into the RDMA memory buffer is a second data structure having a plurality of fields and wherein each of the plurality of fields of the second data structure is aligned on the preferred data alignment.
5 . The node of claim 2 further comprising a disk controller and wherein the application is adapted to communicate the data structure to the disk controller.
6 . The node of claim 5 wherein the data structure is read back from disk using the disk controller and wherein every field of the data structure is aligned on the preferred data alignment that was originally written.
7 . The node of claim 2 wherein the processor's preferred data alignment is one of the group consisting of 64 bits, 128 bits, and 256 bits.