gotosocial/vendor/codeberg.org/gruf
kim 00adf18c24
[feature] simpler cache size configuration (#2051)
* add automatic cache max size generation based on ratios of a singular fixed memory target

Signed-off-by: kim <grufwub@gmail.com>

* remove now-unused cache max-size config variables

Signed-off-by: kim <grufwub@gmail.com>

* slight ratio tweak

Signed-off-by: kim <grufwub@gmail.com>

* remove unused visibility config var

Signed-off-by: kim <grufwub@gmail.com>

* add secret little ratio config trick

Signed-off-by: kim <grufwub@gmail.com>

* fixed a word

Signed-off-by: kim <grufwub@gmail.com>

* update cache library to remove use of TTL in result caches + slice cache

Signed-off-by: kim <grufwub@gmail.com>

* update other cache usages to use correct interface

Signed-off-by: kim <grufwub@gmail.com>

* update example config to explain the cache memory target

Signed-off-by: kim <grufwub@gmail.com>

* update env parsing test with new config values

Signed-off-by: kim <grufwub@gmail.com>

* do some ratio twiddling

Signed-off-by: kim <grufwub@gmail.com>

* add missing header

* update envparsing with latest defaults

Signed-off-by: kim <grufwub@gmail.com>

* update size calculations to take into account result cache, simple cache and extra map overheads

Signed-off-by: kim <grufwub@gmail.com>

* tweak the ratios some more

Signed-off-by: kim <grufwub@gmail.com>

* more nan rampaging

Signed-off-by: kim <grufwub@gmail.com>

* fix envparsing script

Signed-off-by: kim <grufwub@gmail.com>

* update cache library, add sweep function to keep caches trim

Signed-off-by: kim <grufwub@gmail.com>

* sweep caches once a minute

Signed-off-by: kim <grufwub@gmail.com>

* add a regular job to sweep caches and keep under 80% utilisation

Signed-off-by: kim <grufwub@gmail.com>

* remove dead code

Signed-off-by: kim <grufwub@gmail.com>

* add new size library used to libraries section of readme

Signed-off-by: kim <grufwub@gmail.com>

* add better explanations for the mem-ratio numbers

Signed-off-by: kim <grufwub@gmail.com>

* update go-cache

Signed-off-by: kim <grufwub@gmail.com>

* library version bump

Signed-off-by: kim <grufwub@gmail.com>

* update cache.result{} size model estimation

Signed-off-by: kim <grufwub@gmail.com>

---------

Signed-off-by: kim <grufwub@gmail.com>
2023-08-03 11:34:35 +02:00
..
go-atomics [chore] consolidate caching libraries (#704) 2022-07-10 17:18:21 +02:00
go-bitutil [performance] processing media and scheduled jobs improvements (#1482) 2023-02-13 18:40:48 +00:00
go-bytes update dependencies (#296) 2021-11-13 12:29:08 +01:00
go-bytesize [chore]: Bump codeberg.org/gruf/go-bytesize from 1.0.0 to 1.0.2 (#1285) 2022-12-27 08:28:44 +00:00
go-byteutil [chore] transport improvements (#1524) 2023-02-18 17:02:19 +01:00
go-cache/v3 [feature] simpler cache size configuration (#2051) 2023-08-03 11:34:35 +02:00
go-debug [performance] processing media and scheduled jobs improvements (#1482) 2023-02-13 18:40:48 +00:00
go-errors/v2 [performance] tweak http client error handling (#1718) 2023-04-29 18:44:20 +02:00
go-fastcopy [performance] media processing improvements (#1288) 2023-01-11 12:13:13 +01:00
go-fastpath [chore]: Bump codeberg.org/gruf/go-store/v2 from 2.0.9 to 2.0.10 (#1160) 2022-11-28 09:01:53 +00:00
go-hashenc [bugfix] Fix remote media pruning failing if media already gone (#548) 2022-05-08 18:49:45 +01:00
go-iotools [performance] wrap httpclient response body to ensure drained before close (#1854) 2023-06-02 10:34:52 +02:00
go-kv [chore]: Bump codeberg.org/gruf/go-kv from 1.6.0 to 1.6.1 (#1619) 2023-03-13 07:52:13 +00:00
go-logger/v2 [chore] update dependencies, bump to Go 1.19.1 (#826) 2022-09-28 18:30:40 +01:00
go-mangler pull in latest go-kv, go-cache (#1530) 2023-02-19 10:36:38 +01:00
go-maps [feature] Read + Write tombstones for deleted Actors (#1005) 2022-11-11 12:18:38 +01:00
go-mutexes [performance] media processing improvements (#1288) 2023-01-11 12:13:13 +01:00
go-pools [bugfix] Fix remote media pruning failing if media already gone (#548) 2022-05-08 18:49:45 +01:00
go-runners bump go-runners version to fix possible race in Processing{Media,Emoji} (#1646) 2023-03-24 23:07:50 +00:00
go-sched [performance] processing media and scheduled jobs improvements (#1482) 2023-02-13 18:40:48 +00:00
go-store/v2 bump go-store version (includes minio) (#1657) 2023-03-30 22:39:55 +01:00