Giter VIP home page Giter VIP logo

fastio's Introduction

fastio

FastIO is an asynchronous I/O interface that has been developed based on our previous work, SAIO. This project is built upon the concept of the io_uring kernel subsystem. In FastIO, system calls are handled by kernel workers in a polling manner, which eliminates the need for trapping into the kernel. Additionally, FastIO uses wq-worker to offload tasks that handle data not stored in cache, thus reducing the number of CPU mode switches. This approach improves the performance of system call-intensive applications, such as key-value servers. Through evaluations, we have demonstrated that FastIO can linearly scale the throughput of network servers, such as Redis.

Build from source

git clone https://github.com/eecheng87/fastio.git && cd fastio

# choose target, echos server or redis
make config TARGET=echo
make config TARGET=redis

# build kernel module
sudo make

# load kernel module
make reload

# buildl echo server & launch it
cd echo && make
./proactor_echo_server 12345

configure the value of max_ker_worker in fastio.conf to spawn varied number of kernel workers.

Performance

We compare the throughput (RPS) of conventional echo-server and the proactor-like echo-server on the top of FastIO. We choose rust_echo_bench as client. Both server and client are running on eMAG 8180 powered Ampere Arm server with 32 physical cores.

type/connection numbers 25
epoll 82896
fastio (1) 82802
fastio (2) 161260
fastio (3) 257491
fastio (4) 301168
fastio (5) 393052

fastio (*) refers to server running with * kernel workers.

fastio's People

Contributors

eecheng87 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

fastio's Issues

Random crash while launching the server

Here is the kernel log:

eecheng@emag-server ~/fastio (main)> sudo dmesg
[94546.460802] lioo exit
[94546.511532] lioo init
[95380.904428] Localize: Disable
[95380.907413] MAX_TABLE_ENTRY: 64
[95380.910555] MAX_TABLE_LEN: 10
[95380.913517] MAX_USR_WORKER: 1
[95380.916473] MAX_KER_WORKER: 1
[95380.919435] AFF_OFF: 0
[95380.921849] Pin 10 pages in worker-0, for SQ registration
[95380.927263] Q[0][0]=000000000b404838
[95380.930845] Q[0][1]=00000000ac1ac1df
[95380.934417] Q[0][2]=000000005158bc3a
[95380.937996] Q[0][3]=000000007a7d027a
[95380.941591] Q[0][4]=00000000432ffee3
[95380.945171] Q[0][5]=0000000065fdac00
[95380.948748] Q[0][6]=000000001f8bf3d8
[95380.952311] Q[0][7]=00000000ab75e67e
[95380.955881] Q[0][8]=00000000400df8bf
[95380.959457] Q[0][9]=00000000d36044ca
[95380.963593] In main-worker, pid = 31445, bound at cpu 0, cur_cpupid = 0
[95380.963608] wq-6 is launching, running on CPU-13
[95380.963624] wq-8 is launching, running on CPU-5
[95380.963630] wq-9 is launching, running on CPU-3
[95380.963634] wq-10 is launching, running on CPU-18
[95380.963641] wq-11 is launching, running on CPU-7
[95380.963646] wq-13 is launching, running on CPU-5
[95380.963651] wq-14 is launching, running on CPU-3
[95380.963656] wq-15 is launching, running on CPU-18
[95380.963660] wq-16 is launching, running on CPU-7
[95380.963665] wq-17 is launching, running on CPU-5
[95380.963670] wq-18 is launching, running on CPU-3
[95380.963674] wq-19 is launching, running on CPU-18
[95380.963679] wq-20 is launching, running on CPU-7
[95380.963683] wq-21 is launching, running on CPU-5
[95380.963688] wq-22 is launching, running on CPU-3
[95380.963693] wq-23 is launching, running on CPU-18
[95380.963697] wq-24 is launching, running on CPU-7
[95380.963702] wq-25 is launching, running on CPU-5
[95380.963706] wq-26 is launching, running on CPU-3
[95380.963711] wq-27 is launching, running on CPU-18
[95380.963716] wq-28 is launching, running on CPU-7
[95380.963720] wq-29 is launching, running on CPU-5
[95380.963725] wq-30 is launching, running on CPU-3
[95380.963730] wq-31 is launching, running on CPU-18
[95380.963753] Pin 10 pages in worker-0, for CQ registration
[95380.963757] Q[0][0]=00000000da15e8e7
[95380.963760] Q[0][1]=000000009ee206ce
[95380.963761] Q[0][2]=000000000cf9da49
[95380.963763] Q[0][3]=00000000e873dbd1
[95380.963764] Q[0][4]=000000006222de05
[95380.963766] Q[0][5]=000000001c3f1bd7
[95380.963767] Q[0][6]=00000000cc32fafe
[95380.963769] Q[0][7]=000000006534cca2
[95380.963770] Q[0][8]=00000000b9a82ac0
[95380.963772] Q[0][9]=000000006a924d20
[95380.970265] Unable to handle kernel access to user memory outside uaccess routines at virtual address 0000000000000000
[95380.972554] wq-12 is launching, running on CPU-9
[95380.972566] wq-0 is launching, running on CPU-15
[95380.972582] wq-1 is launching, running on CPU-16
[95380.972589] wq-2 is launching, running on CPU-21
[95380.972593] wq-3 is launching, running on CPU-23
[95380.972598] wq-4 is launching, running on CPU-24
[95380.972602] wq-7 is launching, running on CPU-30
[95380.972603] wq-5 is launching, running on CPU-28
[95381.169496] Mem abort info:
[95381.172278]   ESR = 0x96000004
[95381.175320]   EC = 0x25: DABT (current EL), IL = 32 bits
[95381.180619]   SET = 0, FnV = 0
[95381.183660]   EA = 0, S1PTW = 0
[95381.186789]   FSC = 0x04: level 0 translation fault
[95381.191653] Data abort info:
[95381.194520]   ISV = 0, ISS = 0x00000004
[95381.198342]   CM = 0, WnR = 0
[95381.201297] user pgtable: 4k pages, 48-bit VAs, pgdp=0000000dec5a4000
[95381.207725] [0000000000000000] pgd=0000000000000000, p4d=0000000000000000
[95381.214506] Internal error: Oops: 96000004 [#71] SMP
[95381.219459] Modules linked in: mlioo(OE) binfmt_misc nls_iso8859_1 acpi_ipmi joydev input_leds ipmi_ssif xgene_hwmon cppc_cpufreq sch_fq_codel dm_multipath scsi_dh_rdac scsi_dh_emc scsi_dh_alua ipmi_devintf ipmi_msghandler ramoops reed_solomon pstore_blk pstore_zone efi_pstore ip_tables x_tables autofs4 btrfs blake2b_generic zstd_compress raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx uas hid_generic xor xor_neon usbhid hid usb_storage raid6_pq libcrc32c raid1 raid0 multipath linear ast drm_vram_helper drm_ttm_helper dwc3 ttm drm_kms_helper ulpi udc_core syscopyarea crct10dif_ce sysfillrect ghash_ce sysimgblt sha2_ce fb_sys_fops cec sha256_arm64 sha1_ce rc_core igb drm i2c_algo_bit i2c_xgene_slimpro ahci_platform gpio_dwapb xhci_plat_hcd aes_neon_bs aes_neon_blk aes_ce_blk crypto_simd cryptd aes_ce_cipher [last unloaded: mlioo]
[95381.295163] CPU: 0 PID: 31445 Comm: proactor_echo_s Tainted: G      D    OE     5.15.0-52-generic #58-Ubuntu
[95381.304978] Hardware name: MiTAC RAPTOR EV-883832-X3-0001/RAPTOR, BIOS 1.6 06/28/2020
[95381.312795] pstate: a04000c5 (NzCv daIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[95381.319744] pc : __wake_up_common+0x64/0x184
[95381.324008] lr : __wake_up_common_lock+0x88/0xe0
[95381.328613] sp : ffff800021853cc0
[95381.331915] x29: ffff800021853cc0 x28: 0000000000000000 x27: 0000000000000000
[95381.339039] x26: 0000000000000000 x25: 0000000000000003 x24: 0000000000000000
[95381.346163] x23: 0000000000000001 x22: ffff800021853d70 x21: ffff800001951cb8
[95381.353287] x20: 0000000000000000 x19: 0000000000000001 x18: 0000000000000000
[95381.360411] x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000
[95381.367535] x14: 0000000000000001 x13: ffff80000aa1b2e0 x12: 0000000000000000
[95381.374658] x11: 0000000000000004 x10: 0000000000000050 x9 : ffff80000830f5d8
[95381.381783] x8 : 00000000000000f2 x7 : 0000000000000000 x6 : ffffffffffffffe8
[95381.388907] x5 : ffff800021853d70 x4 : 0000000000000000 x3 : 0000000000000000
[95381.396030] x2 : 0000000000000001 x1 : 0000000000000000 x0 : 0000000000000000
[95381.403155] Call trace:
[95381.405589]  __wake_up_common+0x64/0x184
[95381.409500]  __wake_up_common_lock+0x88/0xe0
[95381.413758]  __wake_up+0x24/0x30
[95381.416974]  main_worker+0x570/0xc54 [mlioo]
[95381.421236]  ret_from_fork+0x10/0x20
[95381.424804] Code: 54000740 a90153f3 2a0203f7 52800018 (f9400cd3)
[95381.430886] ---[ end trace ac79efefa1166e4f ]---

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.