Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Loading in …3
×
1 of 26

Highload++2014: 1Hippeus - zerocopy messaging in the spirit of Sparta!

2

Share

1Hippeus – инфраструктура обмена сообщениями, ориентированная на предельно эффективное zero-copy & lockfree-взаимодействие через разделяемую память, RDMA, MPI, коммуникации с GPU, сетевыми адаптерами, SDN & NFV, гипервизоры. Это инфраструктурный проект, который станет Open Source уже в первом релизе

Related Books

Free with a 30 day trial from Scribd

See all

Related Audiobooks

Free with a 30 day trial from Scribd

See all

Highload++2014: 1Hippeus - zerocopy messaging in the spirit of Sparta!

  1. 1. StarWars ^ | *---+ || || +-----+ || | | +-------+ || | | | | +---------> 1000,000K 0=| | | | | | msg/sec || | | | | | || | | | +--------+ || | +------+ |+----+ | v BitMining
  2. 2. • • • • • • • •
  3. 3. 3.MPI 4.ØMQ, nanomsg, …
  4. 4. XYZ +---------+ +--------------+ +-----------+ | NGINX | | LINUX KERNEL | | TARANTOOL| |---------| |--------------| |-----------| | | | | | | | | | | | | +---------+ +--------------+ +-----------+ +--------------------------------------------+ | | | RAM, a lofof... | | DMA_RING| +--------------------------------------------+ +--------------------------------------------+ | PCI Express | +--------------------------------------------+ +-----+ +------+ +-------+ +----------+ | NIC | | DISK | | GPU | | Xeon Phi | +-----+ +------+ +-------+ +----------+ xyz xyz xyz
  5. 5. • ≈2 •libt1h.1.0.so •
  6. 6. +----------+ | PRODUCER| |----------| | push() | +----------+ || / +----------+ | | | QUEUE| | | +----------+ || / +----------+ | pull() | |----------| | CONSUMER| +----------+ ↔ ↔ ↔
  7. 7. +----------+ | PRODUCER| |----------| | push() | +----------+ || / +----------+ | | | QUEUE| | | +----------+ || / +----------+ | pull() | |----------| | CONSUMER| +----------+
  8. 8. HOST_A HOST_B +----------+ SHARED MEMORY #1 | PRODUCER| +-------+ | push() | ==>> | QUEUE| +----------+ +-------+ || / +-----------+ | pull() | | TRANSPORT| | push() | +-----------+ || / +-------+ +----------+ | QUEUE| ==>> | CONSUMER| +-------+ | pull() | SHARED MEMORY #2 +----------+
  9. 9. +---------+ +--------+ | QUEUE | | BUFFER | |---------| | | | 0 | | begin##| | 0 | |########| +--------+ TAIL-> PTR------->|####end | | BUFFER | | PTR| +--------+ | | | ... | | begin##| | PTR------->+--------+ |########| HEAD-> 0 | | BUFFER | |########| | 0 | | chunk1----->|####end | | 0 | | chunk2| +--------+ | 0 | | ... | +---------+ | chunkN----->+--------+ | | | BUFFER | +--------+ | | | begin##| |####end | +--------+
  10. 10. TAGGET_POINTER:= pointer | flags +---------+ | POINTER | |---------| | | ALIEN | bit_0 | SLIM | bit_1 | => PARCEL | bit_2 | INCORPOREAL | | ... | bit_3 | | ... | +--------+ | | ------------->| BUFFER | | | / |--------| | | / | | +---------+ | data | | | +--------+
  11. 11. +-------------+ +-------------+ +-------------+ | 1) SOLID| | 2) INDIRECT| | 3) WEAK| |-------------| |-------------| |-------------| | ref_counter| | ref_counter| | ref_counter| | tag | | tag | | tag | | _data >---------+ | _data>---------+ | _data>-----|--> ?.. | | | +-------------+ | | VMT| | -----------| | | +----------+--+ | |<--+ +-----------+ | | | | | | | | | space | | sk_buff|<--+ v | | | | class my_buffer | | +-----------+ : public T1H::buffer { | | | | | | virtual~my_buffer(); | | }; | | +-------------+
  12. 12. SERVERCOMMON / SHARED +--------+ +----------------+ | OBJECT | = CreateObject(TypeId,------>| BINDER| |--------| "libprovider.so"); |----------------| | Body |<----------------------------------------| | | TypeId| | TypeId| | Handle >----------------+ | Handle | +--------+ | | libprovider.so| | | Body ---------------+ || | | | | | v CLIENT| | +----------------------+ +--------+ v | | OBJECT's SHARED BODY | | OBJECT | = TakeObject(Handle); ----------------->| |----------------------| |--------| | | oxoo.... .... .... | | TypeId|<------------------------------o---------| | xxox.... .... .... | | Body | | +--| oooo.... .... .... | | Handle | +----------------+ | | | | Code |<---| libprovider.so |<--load--+ | data .... .... .... | +--------+ +----------------+ +----------------------+
  13. 13. t1h::thread_assign_policy(HIPPEUS_WAITFREE); v | +---------+ | | TLS| | |---------| | | policy| <-----------+ +----index| | +---------+ | | | +--------------------------- | | QUEUE | |------------------------- | | | | +------------+ +---->| ACTOR SLOT| | |------------| | | futex| | | tid| | | ... | | +------------+ | |
  14. 14. void my_service::process(t1h::junction &io) { t1h::batcher batch(io); while(msg= batch.pull()) { /* ... */ batch.push(msg); ----------------+ } | /* batcher's destructorhere */ | } | | | commit/flush* | | +---------------+ | | | ON STACK FIFO |<---+ | +---------------+ v +-------+ | QUEUE | +-------+
  15. 15. +-------------------------------------+ | ALLOT | |-------------------------------------| | battery | +---------+ +---------+ +---------+ | DEPOT_1| | DEPOT_2 | | DEPOT16 | |---------| |---------| ... |---------| | 256 | | 512 | | 16M | +---------+ +---------+ +---------+ +----------+ +------------+ +----+ +----+ | BASKET_1| | ACTOR SLOT |+ |TILE| |TILE| |----------|+ |------------||+ |----|...|----| | usual || | |||+ | | | | +----------+|+ | CACHE FIFO |||| +----+ +----+ | reserve || | ........ |||| +----------+|+ | ..BBBBBB |||| +----+ +----+ |dedicated || | BBBBB... |||| |TILE| |TILE| +----------+| | |||| |----|...|----| | offline | +------------+||| |BBBB| |BBBB| +----------+ +------------+|| +----+ +----+ +------------+| +------------+
  16. 16. +----------+ +----------+ | JUNCTION | | JUNCTION | |----------| |----------| | | | | | in <<<<<<<<<<<QUEUE<<<<<<<<<<< out | | | | | | out >>>>>>>>>>>QUEUE>>>>>>>>>>>in| | | | | | allot ------------+ +----------allot | | | | | | | | options| | | | options| | | v v| | +----------+ +-------------+ +----------+ | ALLOCATOR | |-------------| | BUF BUFBUF| | BUF BUFBUF| | | | BUF BUFBUF| | BUF BUFBUF| +-------------+ • • • •
  17. 17. +----------1 +----------1 | PRODUCER |2 | CONSUMER |2 |----------||3 |----------||3 | push()|||4 | pull()|||4 +----------+||| +----------+||| +----------+|| +----------+|| +----------+| +----------+| +----------+ +----------+ v ^ | | | | | +-------+ | | | QUEUE| | | |-------| | +-------> | | >------+ | | +-------+
  18. 18. ØMQ,
  19. 19. •R&D подразделение в Сколково •решения для крупных операторов связи: BSS,Telcoprotocols, BigData, HA & Highload •≈ 21 годполного цикла: разработка, внедрение и сопровождение •более 100 миллионов абонентовобслуживается при участии наших систем http://www.billing.ru
  20. 20. https://github.com/1Hippeus

×