Skip to content

Support xcache backend #438

Closed
Closed

Description

@vaneyli

The related topic is at #357 .
The code is at xcache

Client is from here with some patches.
remote.c
xcache.h

Server is a new distributed memory database which can store the compile results.

Activity

  1. changed the title [-]ccache-cloud which enable ccache to store cache on cloud[/-] [+]Support xcache backend[/+] on Jul 3, 2019
  2. afbjorklund commented on Sep 3, 2019

    @afbjorklund
    Contributor

    Can you try to summarize the biggest differences between “xcache” and memcached ? Thanks.

  3. vaneyli commented on Sep 4, 2019

    @vaneyli
    Author

    Can you try to summarize the biggest differences between “xcache” and memcached ? Thanks.

    Thanks to your questions :)

    Enable the ccache to be distributed is my goal last year. It can enable thousands of engineers to share a single buiding cache which could save plenty of time!

    Thanks to your work! I found the memcached-based ccache from your branch. I used it. it works well.

    Before to use it in the product enviroment, I should make sure everything is ok and understond.

    I found the distributed client of memcached is old and almostly without maintained and the version of client and server shoud be matched.
    Before I wrote xcache. I have read the all the source codes of the memcached and some codes and design of the redis. They are both good database.

    For the appear of the redis, the memcached is outdated. I think it's the main reason for why the memcached is rarely updated.

    There are difference between xcache and memcached:

    • xcache is designed to be distributed without client need

    • xcache can expand the memory any time but memcached decides it at starting

    • xcache can store any size of item and the new version of memcached also can.

    • xcache can backup from one server to another

    • xcache cann't store item to disk but memcached can. It's useless for building

    • xcache can dynamically switch or set parmater of recycling but memcached decide it at starting

    • both xcache and memcached use lock which is a bad choice. It make code complicated which is hard to be maintained by community. The redis choose a better choice which just use single thread.

  4. afbjorklund commented on Sep 4, 2019

    @afbjorklund
    Contributor

    For the appear of the redis, the memcached is outdated.

    Using memcached still has higher performance than using Redis (especially when using moxi), the main drawback for the general case is the lack of advanced features and the limited default size (1M / value).

    But you are probably right about the support level and popularity...

    The other suggested database (Kyoto Tycoon as backed by Kyoto Cabinet) seemed to be suffering from a fate similar to memcached and memcachedb. There are more people using MongoDB and Redis.

    The best supported version of memcached is most likely Couchbase.

  5. afbjorklund commented on Sep 4, 2019

    @afbjorklund
    Contributor

    Lockless memcached was explored further in: http://www.lmdb.tech/bench/memcache/
    With the sample code in https://github.com/LMDB/memcachedb (mostly untouched since)

    After the new storage structure is in place, it should be easy to switch between stores ?
    And a lot of people are still using disk (or even NFS) as their primary storage for ccache.

  6. vaneyli commented on Sep 5, 2019

    @vaneyli
    Author

    Thanks to give so many informations about ecosystem of memcached.

    1: After the new storage structure is in place, it should be easy to switch between stores ?
    As you said. the switch I think should be needed. Two reason: a: different people have different requirments. b: Multi-backends supported would make the it popular, it's a good idea for ecosystem.

    I think we both have the same idea: making the ccache to be distributed is a great useful :)
    Of cource. the process could be fetch local cache firstly and then fetch from the remote.

    cache is important field in CI. You have memtioned the NFS above. I would like to discuss another topic If you have time. : the distributed building . Such as distcc, bazel and gradle and so on.
    Should I open a new issue or switch to other place?

    thanks :)

  7. afbjorklund commented on Sep 5, 2019

    @afbjorklund
    Contributor

    Ccache already has full Distcc integration, even though it could need some more user documentation...

    If you want to discuss caching in those other projects, it is probably better to do it there. Maybe something like “related projects” ?

  8. vaneyli commented on Sep 5, 2019

    @vaneyli
    Author

    1: Distcc is old and it uses the poll in network which will fail when more than 1024 connections. The better choice is epoll.
    2: the balance proxy is "gethost" who also is suffering the same reason above. Also the gethost distcc and ccache cann't be used together.

    Do you have some ideas on distributed building? Any other solutions on it?

    thanks :)

  9. afbjorklund commented on Sep 6, 2019

    @afbjorklund
    Contributor

    Do you have some ideas on distributed building? Any other solutions on it?

    I have some ideas, but I think they are off-topic for this particular github issue.

  10. vaneyli commented on Sep 7, 2019

    @vaneyli
    Author

    what’s the better place or way to go on further topic on distributed building? Open a new issue on ccache named “Talking on Distributed building”? or where should i open the topic? Distcussed by email?

    Thanks. :)

  11. afbjorklund commented on Sep 7, 2019

    @afbjorklund
    Contributor

    @vaneyli : we have had some discussions both in ccache and in distcc but the discussions transcend both of the individual projects. I would be happy to have a discussion about this, over email or in meeting.

    There's some history, both projects originated as subprojects under Samba (of all things).

    They were started by different people, in what now seems a very long time ago (17+ years!):

    But then they took different paths and different governance, only to end up here on GitHub.

    They still work well together, and occasionally someone describes how to use them in more detail(*).
    But what you are talking about is more of a generic "build forum", where these are only one possibility ?

    Send me an email, and we'll plan something.
    You'll find it on https://github.com/afbjorklund


    * https://developers.redhat.com/blog/2019/05/15/2-tips-to-make-your-c-projects-compile-3-times-faster/

    ... Specifically, I’ll show how to set up and use containers running a distcc server to distribute the compilation load over a heterogeneous cluster of nodes (development laptop, old desktop PC, and a Mac). To improve the speed of recompilation, I will use ccache.

    Or my own older little writeups on how to configure the software: (ccache/memcached/distcc/distccd)

  12. jrosdahl commented on Jul 28, 2021

    @jrosdahl
    Member

    Closing this now as I don't think that an xcache-specific backend is of interest for ccache.

  13. added
    status: won't fix
    and removed on Jul 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue: featurestatus: won't fix

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions