The algorithm used in an stock exchange system

Original Articles in Chinese: http://t.cn/R2DoIAe & http://t.cn/R2DXusg

Background:

Shareholders (>10^9) info should be managed in memory.
There are many Sockets of CPU in the server, one process pinned on each processor(or core?).
The expected QPS of queries (Query, Modify, Delete, Add) per process is in millions, operations must be done in concurrent.

Data Structure:

The shareholders info is identified by:
Shareholder Type (char(1), [A-F])
Shareholder Code (char(10), [A-Z][0-9]{9})
Security ID (short)

The shareholder data is an 64bit value.

Solution:
Compress the shareholders info to a single 64bit key, then the entire struct will be 16 bytes.
Manage the Key-Value pair by open addressing hash map (load factor should be under control), the concurrent modifications can be done by CAS operations.