Re: Higher TOAST compression.

Поиск
Список
Период
Сортировка
От Laurent Laborde
Тема Re: Higher TOAST compression.
Дата
Msg-id 8a1bfe660907200804n108a8779wfdbedeee0cbd359c@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Higher TOAST compression.  (Laurent Laborde <kerdezixe@gmail.com>)
Ответы Re: Higher TOAST compression.  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Список pgsql-hackers
Hi again !

I also take a look at another possibility to improve compression.

There is two compression strategy :
static const PGLZ_Strategy strategy_default_data = {   256,                        /* Data chunks less than 256 bytes
arenot                                * compressed */   6144,                       /* Data chunks >= 6K force
compression,unless                                * compressed output is larger than input */   20,
   /* Below 6K, compression rates below 20% mean                                * fallback to uncompressed */   128,
                   /* Stop history lookup if a match of 128 bytes                                * is found */   10
                    /* Lower good match size by 10% at every                                * lookup loop iteration */
 
};
const PGLZ_Strategy *const PGLZ_strategy_default = &strategy_default_data;


static const PGLZ_Strategy strategy_always_data = {   0,                          /* Chunks of any size are compressed
*/  0,   0,                          /* It's enough to save one single byte */   128,                        /* Stop
historylookup if a match of 128 bytes                                * is found */   6                           /*
Lookharder for a good match */
 
};
const PGLZ_Strategy *const PGLZ_strategy_always = &strategy_always_data;

1) "strategy_always_data" seems to never be used.
2) the default strategy could be more aggressive (with a higher cpu cost)

Additionally, we use a patched version that modify the default strategy.
If i understand correctly, instead of being more aggresive on
compression, it is *LESS* aggresive :

static const PGLZ_Strategy strategy_default_data = {       32,                             /* Data chunks less than 32
bytes are not compressed */       1024 * 1024,    /* Data chunks over 1MB are not compressed either */       25,
                    /* Require 25% compression
 
rate, or not worth it */       1024,                   /* Give up if no compression in the first 1KB */       128,
             /* Stop history lookup if a match of
 
128 bytes is found */       10                              /* Lower good match size by
10% at every loop iteration */
};
const PGLZ_Strategy *const PGLZ_strategy_default = &strategy_default_data;

Isn't it ?

What about setting "PGLZ_strategy_always" as the default strategy
(insane cpu cost ?) ?
Or something in-between ?

Thank you.

-- 
Laurent Laborde
Sysadmin @ http://www.over-blog.com/


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Joshua Brindle
Дата:
Сообщение: Re: [PATCH] SE-PgSQL/tiny rev.2193
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: [PATCH] SE-PgSQL/tiny rev.2193