Commit Graph

123 Commits

Author SHA1 Message Date
Dmitry Simonenko f4c09af3df odyssey: allocate temp buffer for tls writev support 2019-01-24 16:46:46 +03:00
Dmitry Simonenko 49795088f7 odyssey: optimize relay processing 2019-01-24 15:35:07 +03:00
Dmitry Simonenko 6c0a1f09f8 odyssey: major rework of io architecture
This patch intend is to improve overall io performance, reduce
cpu and system usage.

Machinarium:

IO read/write logic is highly simplified and now based on conditions
instead of previously made internal readahead buffer and msg
queues. This allows to give user more control over io operations and
avoid doing undesired readahead copying.

Above that, TLS implementation reworked to use async logic instead of
separate BIO layer.

Direct pooling functions removed.

New objects machine_cond_t and machine_iov_t objects.

Odyssey:

Introduced readahead, io and relay objects.

Relay allows to connect two io handles for direct data retransmission
without double copying.

Removed configuration options no longer needed:
packet_read_size, packet_write_queue
2019-01-23 18:43:52 +03:00
Dmitry Simonenko 9e0152417f odyssey: rework and optimize parameters setting logic 2018-12-13 14:18:20 +03:00
Dmitry Simonenko 9d6dea5d92 odyssey: major parameter settings optimization 2018-12-12 16:07:25 +03:00
Dmitry Simonenko 2e03af9c88 odyssey: major router and shared logic rework
Goal is to improve overall performance during massive peaks
of connecting clients.

This patch makes router a shared structure, instead of
being run in separate system worker thread/coroutine.

Now router and each route object is protected by
separate mutex. Worker threads directly access router object
without calls to separate thread.
2018-12-06 17:23:15 +03:00
Dmitry Simonenko 7807fd91f2 machinarium: implement readahead-less mode 2018-11-29 18:04:13 +03:00
Dmitry Simonenko 9115d60117 machinarium: rework time update logic 2018-11-27 16:19:16 +03:00
Dmitry Simonenko 9e37d1eff8 odyssey: add support for BoringSSL 2018-11-23 17:07:39 +03:00
Dmitry Simonenko 6b91e6e609 machinarium: try PTHREAD_CANCEL_DISABLE/DEFERRED to avoid __libc calls 2018-11-22 18:44:53 +03:00
Dmitry Simonenko dd3e984431 machinarium: reduce clock_update runs and do timer optimizations 2018-11-22 18:03:25 +03:00
Dmitry Simonenko f92e1039fe machinarium: avoid errno setting to reduce __errno_location() calls 2018-11-22 17:42:29 +03:00
Dmitry Simonenko dc89a7a54b machinarium: try to avoid ERR_clear_error() to reduce lock contention 2018-11-21 18:32:43 +03:00
Dmitry Simonenko 6c13cad1fa machinarium: avoid caching messages from other workers 2018-11-20 19:08:27 +03:00
Dmitry Simonenko c61c1e81f7 machinarium: rework msg_cache/coroutine_cache per machine thread 2018-11-19 17:52:37 +03:00
Dmitry Simonenko 648962ffd7 machinarium: use unsigned int for sleeplock 2018-11-15 15:25:50 +03:00
Dmitry Simonenko 7c7fdf557d machinarium: switch to sleeplock instead of pthread_mutex_t 2018-11-15 15:22:38 +03:00
Dmitry Simonenko 2d4f61f923 odyssey: introduce packet_write_queue 2018-11-13 18:29:25 +03:00
Dmitry Simonenko a18f2eae68 machinarium: switch to mutexes to reduce hot spots cpu usage 2018-10-26 18:41:55 +03:00
Dmitry Simonenko fbc037aa23 odyssey: implement packet retransmission in chunks; packet_read_size 2018-10-23 16:51:30 +03:00
Dmitry Simonenko 14d4a7f478 odyssey: add cache_msg_gc_size option and disable default caching 2018-09-26 18:18:17 +03:00
Dmitry Simonenko cd076462eb odyssey: implement and use shared parameters state 2018-09-25 18:40:50 +03:00
Dmitry Simonenko ff648f66cd odyssey: minor fixes 2018-09-14 15:18:55 +03:00
Dmitry Simonenko 5895b8d170 odyssey: rework client parameters setup logic 2018-09-13 17:43:39 +03:00
Dmitry Simonenko de824a3373 odyssey: implement msg_cache gc for oversized msgs 2018-09-05 16:04:36 +03:00
Dmitry Simonenko 62deb8bddf odyssey: make packet readers per one event only 2018-09-05 15:30:53 +03:00
Dmitry Simonenko b8d65d7225 odissey: warning fixes 2018-08-31 16:18:59 +03:00
Dmitry Simonenko 7392a65ce4 machinarium: add msg_cache stat info 2018-08-30 17:23:14 +03:00
Dmitry Simonenko f3b755a748 kiwi: fix message size in kiwi_be_write_error_as() 2018-08-29 16:23:28 +03:00
Dmitry Simonenko e18724100e machinarium: fix obj cast in machine_write_batch() 2018-08-29 16:07:08 +03:00
Dmitry Simonenko da7e6ea7a5 odyssey: major io rework and refactoring
This patch moves Odyssey from stream based write caching
to message driven. All write operations are delayed
and happen on a group of messages.

This removes necessity to do IO and wait for write completion during calls
from SSL_write() context. Write timings should behave more predictable now and
number of used syscalls should be also decreased.

This patch also simplifies caching management. All clients are simply
reusing cached messages without prolonged contention.

Several configuration options are no longer used:
pipeline, cache, cache_chunk
2018-08-28 17:43:46 +03:00
Dmitry Simonenko 389b71bbdb machinarium: add machine_write_batch() 2018-08-28 17:32:35 +03:00
Dmitry Simonenko 5e7007d151 kiwi: use machine_msg_t* for read functions 2018-08-27 15:28:52 +03:00
Dmitry Simonenko 87abaa2f79 kiwi: add kiwi_read_startup_size() 2018-08-27 14:57:13 +03:00
Dmitry Simonenko b870c0e3a1 odyssey: rework odyssey_stress for new io api 2018-08-23 17:12:28 +03:00
Dmitry Simonenko f09ab98d9e kiwi: add kiwi_read_size() 2018-08-23 17:10:18 +03:00
Dmitry Simonenko 35b1064ff0 machinarium: introduce machine_read_to() 2018-08-23 16:32:57 +03:00
Dmitry Simonenko 82e6c1a7a6 odyssey: remove shapito library 2018-08-23 16:24:07 +03:00
Dmitry Simonenko f973a20397 kiwi: add README.md 2018-08-23 16:21:39 +03:00
Dmitry Simonenko 7ac8dc0b10 kiwi: import implementation 2018-08-23 16:17:15 +03:00
Dmitry Simonenko d89bdc633c machinarium: add size arg to machine_msg_create() 2018-08-23 15:12:40 +03:00
Dmitry Simonenko 02662c95ed kiwi: introduce 2018-08-23 13:09:03 +03:00
Dmitry Simonenko 81067e2c1f machinarium: fix write error state validation 2018-08-23 12:27:19 +03:00
Dmitry Simonenko 9e8261a5c1 machinarium: remove size from machine_msg_create() 2018-08-22 17:32:41 +03:00
Dmitry Simonenko fe28d57aec machinarium: rewrite write logic using msg queue/flush 2018-08-22 16:36:28 +03:00
Dmitry Simonenko 7a39407aaf machinarium: rework machine_read() using machine_msg_t* 2018-08-22 15:32:57 +03:00
Dmitry Simonenko 1ab4cd9482 machinarium: allow dynamic msg resize/write 2018-08-22 15:19:06 +03:00
Dmitry Simonenko f77d7ccf02 odyssey: set nodelay for tls_read_var test 2018-08-15 14:57:32 +03:00
Dmitry Simonenko ef5fd84fb8 machinarium: implement machine_eventfd() 2018-07-17 17:22:09 +03:00
Dmitry Simonenko fb023d42cb odyssey: add unix socket support. fix #31 2018-07-02 18:41:17 +03:00