gem5-users@gem5.org

The gem5 Users mailing list

View all threads

Running memcached on gem5

TS
Thomas, Samuel
Wed, Jul 20, 2022 11:13 PM

Hi all,

I am working on a project where we would like to evaluate our hardware
using memcached. We are working from gem5 version 21.1.0 (i.e., commit
87c121fd954ea5a6e6b0760d693a2e744c2200de) and or all intents and purposes,
our python configuration script is essentially equivalent to the fs.py (all
changes happen below the memory bus).

I installed the memcached library and uploaded a test binary called
``memcached_client'' that I wrote (C++ that uses libmemcached) onto a gem5
disk image, and would like to run the server and client locally in parallel
together in the same simulation. I have the following as my run.rcS script:

#!/bin/sh

memcached -u root -p 1234 -vvv &
sleep 2 && /memcached_client

This setup works as anticipated locally.

Because I ran memcached with verbose output, I can see that it boots the
server correctly -- but the client fails to add any keys to the server
(memcached error code A TIMEOUT OCCURRED). This suggests that,
although localhost:1234 was added to the list of memcached servers, the
client itself cannot actually connect to the server.

My hypothesis is that gem5 doesn't support the interface that memcached
servers provide, whereby clients connect via ports. Is it possible to
confirm or deny this? Furthermore, has anyone successfully run memcached on
gem5? Is our environment setup correct, or did you take a different
approach?

In the worst case, we can always resort to evaluating on similar workloads
with Redis :-(

As always, thank you in advance for your help!

Best,
Sam

Hi all, I am working on a project where we would like to evaluate our hardware using memcached. We are working from gem5 version 21.1.0 (i.e., commit 87c121fd954ea5a6e6b0760d693a2e744c2200de) and or all intents and purposes, our python configuration script is essentially equivalent to the fs.py (all changes happen below the memory bus). I installed the memcached library and uploaded a test binary called ``memcached_client'' that I wrote (C++ that uses libmemcached) onto a gem5 disk image, and would like to run the server and client locally in parallel together in the same simulation. I have the following as my run.rcS script: ``` #!/bin/sh memcached -u root -p 1234 -vvv & sleep 2 && /memcached_client ``` This setup works as anticipated locally. Because I ran memcached with verbose output, I can see that it boots the server correctly -- but the client fails to add any keys to the server (memcached error code ```A TIMEOUT OCCURRED```). This suggests that, although localhost:1234 was added to the list of memcached servers, the client itself cannot actually connect to the server. My hypothesis is that gem5 doesn't support the interface that memcached servers provide, whereby clients connect via ports. Is it possible to confirm or deny this? Furthermore, has anyone successfully run memcached on gem5? Is our environment setup correct, or did you take a different approach? In the worst case, we can always resort to evaluating on similar workloads with Redis :-( As always, thank you in advance for your help! Best, Sam