Giter Club home page Giter Club logo

lib-redis's Introduction

Redis for Unikraft

This is the port of Redis for Unikraft as external library.

Build

Redis depends on the following libraries, that need to be added to Makefile in this order:

  • pthreads, e.g. pthread-embedded
  • libc, e.g. newlib
  • network stack, e.g. lwip

Before you proceed to writing your own application, you can use the main() function provided in the Redis glue code by enabling it in its configuration menu.

Root filesystem

The steps for creating and using a filesystem are the same as the ones used for nginx. However, it is not mandatory to use a configuration file because Redis has its own default values.

Running modes

We currently support the Redis server and CLI. You may find a main() implementation example which shows how to call the main functions of server and CLI. If no custom parameters are passed, then the CLI will try to connect to the local Redis server. In order to do this you need to enable the loopback interface (e.g. Loopback interface configuration option under lwip menu).

Further information

Please refer to the README.md as well as the documentation in the doc/ subdirectory of the main unikraft repository.

lib-redis's People

Contributors

alex-devis avatar clupuishere avatar craciunoiuc avatar john-ted avatar lascubogdan96 avatar nderjung avatar razvand avatar skuenzer avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lib-redis's Issues

Wrong timestamp in server logs

The timestamps in the server logs are not correct.

Example for ARM: -748823 Jan 1970 -19:-36:00.145
Example for x86: 28 Jul 2015 07:49:05.074

On ARM, the timestamps are wrong because the gettimeofday call does not function properly.
On x86, I tracked it down to this call to the redis version of localtime with the server.timezone parameter, which is subtracted from the timestamp. The server.timezone variable has the value 263675520, which corresponds to a shift of about 8 years, consistent with the change from 2023 to 2015.

Unikraft Redis stops processing requests (crashes) on increased load.

Hello,

I was recently trying Redis on the new Unikraft version, and I noticed that it crashes (stops processing) requests when run under an increased workload. This happens when running a redis-benchmark with more requests. After it crashes, it doesn't respond to either ping or redis-cli. I noticed similar behaviour with Nginx on the new UK version.

To reproduce, I started the Redis instance with the unikraft-upb/scripts for redis. I then run a simple redis-benchmark with 10 million GET and SET requests.

Unikraft redis doesn't start with `kraft run`, works correctly when started with Qemu

Hello, I noticed that when starting redis with the run option (instead of run_qemu) in the MUSL scripts it gives this error:

0:M 05 Dec 2022 19:40:42.023 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
0:M 05 Dec 2022 19:40:42.026 # Redis version=5.0.6, bits=64, commit=c5ee3442, modified=1, pid=0, just started
0:M 05 Dec 2022 19:40:42.031 # Configuration loaded
0:M 05 Dec 2022 19:40:42.097 # You requested maxclients of 10000 requiring at least 10032 max file descriptors.
0:M 05 Dec 2022 19:40:42.102 # Server can't set maximum open files to 10032 because of OS error: No such file or directory.
0:M 05 Dec 2022 19:40:42.107 # Current maximum open files is 1024. maxclients has been reduced to 992 to compensate for low ulimit. If you need higher maxclients increase 'ulimit -n'.
0:M 05 Dec 2022 19:40:42.116 # Fatal: Can't initialize Background Jobs.

It works all good when started directly with Qemu, so I guess this is not a big issue, but I wanted to report it still in case it helps with something else.

I have used this script for setup/build/run/run_qemu: https://github.com/unikraft-upb/scripts/blob/main/musl/do-redis

`select()` and `poll()` error since release 0.10

Since the 0.10 release there is an poll() and select()-related error, due to missing inclusion if posix-event and posix-socket:

/home/razvan/projects/unicore/unikraft-my/apps/app-redis.git/build/redis_kvm-x86_64.o: In function `redisContextWaitReady':
/home/razvan/projects/unicore/unikraft-my/apps/app-redis.git/build/libredis/origin/redis-5.0.6/deps/hiredis/net.c:213: undefined reference to `poll'
/home/razvan/projects/unicore/unikraft-my/apps/app-redis.git/build/redis_kvm-x86_64.o: In function `aeApiPoll':
/home/razvan/projects/unicore/unikraft-my/apps/app-redis.git/build/libredis/origin/redis-5.0.6/src/ae_select.c:84: undefined reference to `select'
/home/razvan/projects/unicore/unikraft-my/apps/app-redis.git/build/redis_kvm-x86_64.o: In function `aeWait':
/home/razvan/projects/unicore/unikraft-my/apps/app-redis.git/build/libredis/origin/redis-5.0.6/src/ae.c:485: undefined reference to `poll'

The Config.uk file needs to be updated to use LIBPOSIX_SOCKET and LIBPOSIX_EVENT.

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.