Git Product home page Git Product logo

Comments (8)

manjuraj avatar manjuraj commented on May 23, 2024

@mimingan

good catch about missing fc_client.h and fc_server.h files. I uploaded a new distribution with a fix for missing files. See: https://code.google.com/p/fatcache/downloads/list

Regarding writing to ssd, it seems like your fatcache instance is working as expected. If you read through the README.md, you will notice that fatcache first writes to memory and then batch writes slabs to ssd. I don't see any error in the log file that you uploaded

Could you describe the issue you are encountering in detail?

from fatcache.

mimingan avatar mimingan commented on May 23, 2024

@manjuraj

Thank you for your reply to us so quickly. Sorry, I do not describe the problem in detail.

Accordance with the above method, I run the fatcache.

The "set" and "get" commands execution is a failure.

For example:

printf "set zhangyan 0 0 5\r\n12345\r\n" | nc 127.0.0.1 11211

printf "set zhang07 0 0 6\r\n123456\r\n" | nc 127.0.0.1 11211

printf "set zhang900 0 0 3\r\n456\r\n" | nc 192.168.1.3 11211

printf "get zhang07\r\n" | nc 127.0.0.1 11211

And so on. Repeatedly executed several times, the above commands are a failure .

from fatcache.

mimingan avatar mimingan commented on May 23, 2024

@manjuraj

Thank you for your reply.

I downloaded the fatcache-0.1.1.tar.gz.

Now, the "set" and "get" commands execution is OK, thanks.

testing...

from fatcache.

mimingan avatar mimingan commented on May 23, 2024

@manjuraj

I use the 'set' command of libmemcached, write a data to fatcache, spending 600 - 1000 ms.(very slowly)
use mcperf the same as libmemcached.
I didn't know why. can you tell me, thanks.
have I wrong usage ?

from fatcache.

manjuraj avatar manjuraj commented on May 23, 2024

Is the backing store a ssd or disk?
You can also look at the perf results in notes/ folder to get an idea on how to use fatcache

from fatcache.

mimingan avatar mimingan commented on May 23, 2024

In practical work, we feel the fatcache very low performance . testing is as follows,
//code
uint32_t flags = 0;
time_t dur_time = 0;
struct timeval start = {0}, end = {0};
gettimeofday(&start, NULL);
rc = memcached_set(memc_, key.c_str(), key.length(), value.c_str(), value.length(), dur_time, flags);
gettimeofday(&end, NULL);
printf("cache 'set' cmd time: %ld ms.", diff_time(&start, &end) / 1000);

  1. connect to a fatcache (127.0.0.1:11211)
    Start the fatcache.
    /usr/local/fatcache/bin/fatcache -d -o /usr/local/fatcache/log/fatcache.log -D /dev/sdb

log:
Wed Aug 14 09:34:00 2013 [common/memcached/mycache.cpp]:[93]:[set_key_value] cache 'set' cmd time: 1000 ms.
Wed Aug 14 09:34:01 2013 [common/memcached/mycache.cpp]:[93]:[set_key_value] cache 'set' cmd time: 999 ms.
Wed Aug 14 09:34:01 2013 [common/memcached/mycache.cpp]:[93]:[set_key_value] cache 'set' cmd time: 999 ms.
Wed Aug 14 09:34:01 2013 [common/memcached/mycache.cpp]:[93]:[set_key_value] cache 'set' cmd time: 1000 ms.
Wed Aug 14 09:34:01 2013 [common/memcached/mycache.cpp]:[93]:[set_key_value] cache 'set' cmd time: 1000 ms.
Wed Aug 14 09:34:01 2013 [common/memcached/mycache.cpp]:[93]:[set_key_value] cache 'set' cmd time: 999 ms.
Wed Aug 14 09:34:01 2013 [common/memcached/mycache.cpp]:[93]:[set_key_value] cache 'set' cmd time: 1000 ms.
Wed Aug 14 09:34:01 2013 [common/memcached/mycache.cpp]:[93]:[set_key_value] cache 'set' cmd time: 0 ms.
Wed Aug 14 09:34:02 2013 [common/memcached/mycache.cpp]:[93]:[set_key_value] cache 'set' cmd time: 999 ms.
Wed Aug 14 09:34:02 2013 [common/memcached/mycache.cpp]:[93]:[set_key_value] cache 'set' cmd time: 999 ms.
Wed Aug 14 09:34:02 2013 [common/memcached/mycache.cpp]:[93]:[set_key_value] cache 'set' cmd time: 999 ms.
Wed Aug 14 09:34:02 2013 [common/memcached/mycache.cpp]:[93]:[set_key_value] cache 'set' cmd time: 999 ms.
Wed Aug 14 09:34:02 2013 [common/memcached/mycache.cpp]:[93]:[set_key_value] cache 'set' cmd time: 999 ms.

  1. connect to a memcached (192.168.1.3:11211)
    log:
    Wed Aug 14 11:04:02 2013 [common/memcached/mycache.cpp]:[93]:[set_key_value] cache 'set' cmd time: 0 ms.
    Wed Aug 14 11:04:02 2013 [common/memcached/mycache.cpp]:[93]:[set_key_value] cache 'set' cmd time: 0 ms.
  2. Large concurrent case
    /usr/local/mcperf/bin/mcperf --sizes=u100,100 --num-calls=10000 --num-conns=100 --call-rate=1000 --conn-rate=10000 --method=set --server=192.168.1.3 --port=11211
    Total: connections 100 requests 1000000 responses 1000000 test-duration 10.010 s
    Request rate: 99904.8 req/s (0.0 ms/req)
    Request size [B]: avg 129.0 min 129.0 max 129.0 stddev 0.00
    Response rate: 99904.8 rsp/s (0.0 ms/rsp)
  3. only execute once 'set' command.
    The fatcache is very slow. spending 1000 ms,
    but the memcached is far less than 1 ms.
  4. Have you done once 'set' command to test?
    Thanks for your reply.

from fatcache.

manjuraj avatar manjuraj commented on May 23, 2024

@mimingan

please read this: https://github.com/twitter/fatcache/blob/master/notes/performance.md and this: https://github.com/twitter/fatcache/blob/master/notes/intel-ssd-320-specification.pdf and this: https://github.com/twitter/fatcache/blob/master/notes/spec.md

your backing store must be SSD. On your SSD figure out what its read and write latencies and your latency numbers would be something similar for a 4K read / write.

hth, let me know if you how the testing works out

from fatcache.

manjuraj avatar manjuraj commented on May 23, 2024

closing this for now. feel free to reopen if you have questions

from fatcache.

Related Issues (17)

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.