Skip to content

aurelienbottazini/test-sqlite-performance

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
go
 
 
 
 
 
 
js
 
 
 
 
 
 
 
 
 
 
 
 

The goal of this repo is to test sqlite3 performance when used with a webserver. I try to have implementations that are as fast as possible with as few dependencies as possible.

I am not an expert in all the languages tested. I do my best effort to have a reasonable implementation. I did try to use each language properly and to find ways to make it fast. If I failed it is also a sign the language is not that simple to use in a performant way. I was able in at least some of the languages to serve for each case scenario to serve millions of request/30 seconds.

Server features:

  • /hello to return an hello world string
  • /visits to return a 204 no content reponse and save a visit in an sqlite table
  • /stats to return a count from the visits table

Run

  • cd inside language directory
  • make build
  • make serve

Test commands

  • wrk -t12 -c400 -d30 http://0.0.0.0:3030/hello
  • wrk -t12 -c400 -d30 http://0.0.0.0:3030/visit
  • wrk -t12 -c400 -d30 http://0.0.0.0:3030/stats

Results

ClojureScript

  • hello: 2.146.785
  • visit: 1.272.862
  • stats: 1.681.424

Rust 2021

Memory does not go up after successive runs. 16 Mo

  • hello: 4.665.344
  • visit: 599.205
  • stats: 1.748.789

Clojure

  • hello: 2.829.808
  • visit: 88.600
  • stats: 1.705.588

js node 18.15.0

  • hello: 2.007.203
  • visit: 1.293.715
  • stats: 1.794.942

bun 0.6.8

  • hello: 4.707.980, memory: 38 Mo
  • visit: 1.571.157, memory: 45 Mo
  • stats: 2.611.391, memory: 31 Mo -> memory grows after several runs

deno 1.34.2

  • hello: 1.857.104
  • visit: 2.595
  • stats: 782.207

Ruby

  • hello: 9.699.995
  • visit: 1.022.697 (194.959 with db busy errors)
  • stats: 6.758.355

Go 1.18.1

  • #3 hello: 4.518.796
  • visit: crashes
  • stats: did not test because of visit crash

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published