How to enable compression?

44 views
Skip to first unread message

Felix Ng

unread,
Jan 29, 2015, 8:39:25 PM1/29/15
to tokyocabi...@googlegroups.com
I am trying to enable compression with no luck.

I created 2 kch 

one with no extra options
another one with #opts=c#zcomp=zlib 

then, i insert 1million records, to each of these database, but the size are pretty much the same (value size is around 2kb)

i tried with using *.kct as well, tried zcomp=gz or def, all with same results
I even tried on linux and windows (java + jkyotocabinet.dll)


Sven Hartrumpf

unread,
Feb 1, 2015, 6:09:51 AM2/1/15
to tokyocabi...@googlegroups.com
Felix Ng <feli...@gmail.com> schrieb am 2015-01-29 17:39:
> I am trying to enable compression with no luck.
>
> I created 2 kch
>
> one with no extra options
> another one with #opts=c#zcomp=zlib
>
> then, i insert 1million records, to each of these database, but the size
> are pretty much the same (value size is around 2kb)

Have your verified (e.g. with kchashmgr) that the options are really set?

Small values are never compressed, see manual:
"If the value is bigger than 1KB or more, compression is effective."
So, if your 2 KB value is only an average, many values might not be compressed.

Ciao
Sven

Felix Ng

unread,
Feb 10, 2015, 3:24:13 AM2/10/15
to tokyocabi...@googlegroups.com
Yes, I tried (my test program insert 500k records.  Tried with all values > 1k, 2k, 5k, etc....

in kchashmgr or kctreemgr, i don't see any flag or hints saying that compression was enabled ... 

That's why i wonder it was totally ignore... (I am quite sure i did not disable zlib while compile)
Reply all
Reply to author
Forward
0 new messages