<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    If you are using Java you could store Riak keys as binaries using
    Jackson smile format, supposedly it will compress faster and better
    than default Java serialization, we use it for very large keys (say
    a key with a large collection of entries), the drawback is that you
    won't be able to easily read that key with other clients; say, write
    in Java and read from JavaScript for example.<br>
    <br>
    Application compression usually comes at the cost of performance and
    CPU usage, you surely want to compress without compromising the CPU
    by a lot.<br>
    <b><br>
    </b><b>Reference:</b> <a class="moz-txt-link-freetext" href="http://www.cowtowncoder.com/blog/blog.html">http://www.cowtowncoder.com/blog/blog.html</a><br>
    <br>
    HTH,<br>
    <br>
    Guido.<br>
    <br>
    <br>
    <div class="moz-cite-prefix">On 10/07/13 10:13, damien krotkine
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAM56AsQmXv=7te5k7mhKQsYer4eb=-en0GA4dw6kcfWPY+2sPA@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div class="gmail_extra">
            <div>
              <div>
                <div><br>
                  <div class="gmail_extra">( first post here, hi
                    everybody... )<br>
                    <br>
                  </div>
                  <div class="gmail_extra">If you don't need MR, 2i,
                    etc, then BitCask will be faster. You just need to
                    make sure all your keys fit in memory, which should
                    not be a problem. How many keys do you have and
                    what's their average length ?</div>
                  <br>
                </div>
                <div>About the values,you can save a lot of space by
                  choosing an appropriate serialization. We use
                  Sereal[1] to serialize our data, and it's small enough
                  that we don't need to compress it further (it can
                  automatically use snappy to compress further). There
                  is a php client [2]<br>
                  <br>
                </div>
              </div>
              If you use leveldb, it can compress using snappy, but I've
              been a bit disappointed by snappy, because it didn't work
              well with our data. If you serialize your php object as
              verbose string (I don't know what's the usual way to
              serialize php objects), then you should probably benchmark
              different compressions algorithms on the application side.<br>
              <br>
            </div>
            <br>
            [1]: <a moz-do-not-send="true"
              href="https://github.com/Sereal/Sereal/wiki/Sereal-Comparison-Graphs">https://github.com/Sereal/Sereal/wiki/Sereal-Comparison-Graphs</a><br>
            [2]: <a moz-do-not-send="true"
              href="https://github.com/tobyink/php-sereal/tree/master/PHP">https://github.com/tobyink/php-sereal/tree/master/PHP</a><br>
            <br>
            <div class="gmail_quote">On 10 July 2013 10:49, Edgar Veiga
              <span dir="ltr"><<a moz-do-not-send="true"
                  href="mailto:edgarmveiga@gmail.com" target="_blank">edgarmveiga@gmail.com</a>></span>
              wrote:<br>
              <blockquote class="gmail_quote" style="margin:0px 0px 0px
                0.8ex;border-left:1px solid
                rgb(204,204,204);padding-left:1ex">
                <div dir="ltr">Hello all!
                  <div><br>
                  </div>
                  <div>I have a couple of questions that I would like to
                    address all of you guys, in order to start this
                    migration the best as possible.</div>
                  <div><br>
                  </div>
                  <div>Context:</div>
                  <div>- I'm responsible for the migration of a pure
                    key/value store that for now is being stored on
                    memcacheDB. </div>
                  <div>- We're serializing php objects and storing
                    them. </div>
                  <div>- The total size occupied it's ~2TB.</div>
                  <div><br>
                  </div>
                  <div>- The idea it's to migrate this data to a riak
                    cluster with elevelDB backend (starting with 6
                    nodes, 256 partitions. This thing is scaling very
                    fast).</div>
                  <div>- We only need to access the information by key.
                    <b>We won't need neither map/reduces, searches or
                      secondary indexes</b>. It's a pure key/value
                    store!</div>
                  <div><br>
                  </div>
                  <div>My questions are:</div>
                  <div>- Do you have any riak fine tunning tip regarding
                    this use case (due to the fact that we will only use
                    the key/value capabilities of riak)?</div>
                  <div>
                    - It's expected that those 2TB would be reduced due
                    to the levelDB compression. Do you think we should
                    compress our objects to on the client?</div>
                  <div><br>
                  </div>
                  <div>Best regards,</div>
                  <div>Edgar Veiga</div>
                </div>
                <br>
                _______________________________________________<br>
                riak-users mailing list<br>
                <a moz-do-not-send="true"
                  href="mailto:riak-users@lists.basho.com">riak-users@lists.basho.com</a><br>
                <a moz-do-not-send="true"
href="http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com"
                  target="_blank">http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com</a><br>
                <br>
              </blockquote>
            </div>
            <br>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
riak-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:riak-users@lists.basho.com">riak-users@lists.basho.com</a>
<a class="moz-txt-link-freetext" href="http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com">http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>