mirror of
1
Fork 0
gotosocial/vendor/github.com
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
..
DmitriyVTitov/size [feature] simpler cache size configuration (#2051) 2023-08-03 11:34:35 +02:00
KimMachineGun/automemlimit [chore]: Bump github.com/KimMachineGun/automemlimit from 0.2.5 to 0.2.6 (#1723) 2023-05-01 11:01:36 +02:00
abema/go-mp4 [chore] update go-mp4 to latest commit (#2028) 2023-07-27 10:31:36 +02:00
aymerick/douceur Grand test fixup (#138) 2021-08-12 21:03:24 +02:00
buckket/go-blurhash migrate go version to 1.17 (#203) 2021-09-10 14:42:14 +02:00
bytedance/sonic [chore]: Bump github.com/gin-gonic/gin from 1.9.0 to 1.9.1 (#1855) 2023-06-01 22:20:16 +01:00
cenkalti/backoff/v4 feat: initial tracing support (#1623) 2023-05-09 18:19:48 +01:00
chenzhuoyu/base64x [chore] Update gin to v1.9.0 (#1553) 2023-02-25 12:12:40 +00:00
cilium/ebpf [chore]: Bump github.com/KimMachineGun/automemlimit from 0.2.4 to 0.2.5 (#1666) 2023-04-03 11:16:17 +02:00
containerd/cgroups/v3 [chore]: Bump github.com/KimMachineGun/automemlimit from 0.2.4 to 0.2.5 (#1666) 2023-04-03 11:16:17 +02:00
coreos [chore]: Bump github.com/coreos/go-oidc/v3 from 3.5.0 to 3.6.0 (#1840) 2023-05-29 13:55:51 +01:00
cornelk/hashmap [chore] bump gruf/go-store to v2 (#953) 2022-11-05 11:10:19 +00:00
davecgh/go-spew Grand test fixup (#138) 2021-08-12 21:03:24 +02:00
disintegration/imaging [bugfix] Fix thumbnails not taking exif rotation into account (#746) 2022-08-10 14:05:14 +02:00
docker/go-units [feature] Inherit resource limits from cgroups (#1336) 2023-01-17 20:59:04 +00:00
dsoprea [bugfix] Fix images not being processed correctly sometimes (#437) 2022-03-21 19:46:51 +01:00
dustin/go-humanize [chore]: Bump github.com/minio/minio-go/v7 from 7.0.48 to 7.0.49 (#1567) 2023-02-27 10:21:58 +01:00
fsnotify/fsnotify [chore]: Bump github.com/spf13/viper from 1.13.0 to 1.14.0 (#1003) 2022-11-08 11:30:29 +01:00
gabriel-vasile/mimetype [chore]: Bump github.com/go-playground/validator/v10 (#1812) 2023-05-22 09:17:48 +02:00
gin-contrib [chore] update dependencies, bump to Go 1.19.1 (#826) 2022-09-28 18:30:40 +01:00
gin-gonic/gin [chore]: Bump github.com/gin-gonic/gin from 1.9.0 to 1.9.1 (#1855) 2023-06-01 22:20:16 +01:00
go-errors/errors Update dependencies (#333) 2021-11-27 15:26:58 +01:00
go-fed/httpsig move to ssb gofed fork (#298) 2021-11-13 17:29:43 +01:00
go-jose/go-jose/v3 [chore]: Bump github.com/coreos/go-oidc/v3 from 3.4.0 to 3.5.0 (#1322) 2023-01-09 08:23:49 +00:00
go-logr [chore] Update a bunch of database dependencies (#1772) 2023-05-12 14:33:40 +02:00
go-playground [chore]: Bump github.com/go-playground/form/v4 from 4.2.0 to 4.2.1 (#1994) 2023-07-21 14:22:13 +00:00
go-xmlfmt/xmlfmt Upstep Go dependencies (#340) 2021-12-12 15:47:51 +01:00
goccy/go-json [chore]: Bump github.com/gin-gonic/gin from 1.9.0 to 1.9.1 (#1855) 2023-06-01 22:20:16 +01:00
godbus/dbus/v5 [feature] Inherit resource limits from cgroups (#1336) 2023-01-17 20:59:04 +00:00
golang [chore] update latest deps, ensure readme up to date (#1873) 2023-06-05 10:15:05 +02:00
golang-jwt/jwt migrate go version to 1.17 (#203) 2021-09-10 14:42:14 +02:00
google/uuid migrate go version to 1.17 (#203) 2021-09-10 14:42:14 +02:00
gorilla [feature] Add opt-in RSS feed for account's latest Public posts (#897) 2022-10-08 14:00:39 +02:00
grpc-ecosystem/grpc-gateway/v2 feat: initial tracing support (#1623) 2023-05-09 18:19:48 +01:00
h2non/filetype Update dependencies (#333) 2021-11-27 15:26:58 +01:00
hashicorp/hcl Implement Cobra CLI tooling, Viper config tooling (#336) 2021-12-07 13:31:39 +01:00
inconshreveable/mousetrap [chore]: Bump github.com/spf13/cobra from 1.6.1 to 1.7.0 (#1686) 2023-04-10 12:14:21 +02:00
jackc [chore]: Bump github.com/jackc/pgconn from 1.14.0 to 1.14.1 (#2024) 2023-07-24 10:14:16 +00:00
jinzhu/inflection migrate go version to 1.17 (#203) 2021-09-10 14:42:14 +02:00
json-iterator/go Update dependencies (#333) 2021-11-27 15:26:58 +01:00
kballard/go-shellquote Add SQLite support, fix un-thread-safe DB caches, small performance f… (#172) 2021-08-29 16:41:41 +02:00
klauspost [chore]: Bump github.com/minio/minio-go/v7 from 7.0.60 to 7.0.61 (#2041) 2023-07-31 09:47:25 +01:00
leodido/go-urn [chore]: Bump github.com/go-playground/validator/v10 (#1812) 2023-05-22 09:17:48 +02:00
magiconair/properties [chore]: Bump github.com/spf13/viper from 1.14.0 to 1.15.0 (#1375) 2023-01-23 10:24:00 +01:00
mattn/go-isatty [chore] bump db dependencies (#1366) 2023-01-22 12:26:47 +01:00
microcosm-cc/bluemonday [chore]: Bump github.com/microcosm-cc/bluemonday from 1.0.24 to 1.0.25 (#2021) 2023-07-24 10:24:03 +00:00
miekg/dns [chore]: Bump github.com/miekg/dns from 1.1.54 to 1.1.55 (#1929) 2023-06-26 22:35:40 +02:00
minio [chore]: Bump github.com/minio/minio-go/v7 from 7.0.60 to 7.0.61 (#2041) 2023-07-31 09:47:25 +01:00
mitchellh/mapstructure [chore] update dependencies, bump to Go 1.19.1 (#826) 2022-09-28 18:30:40 +01:00
modern-go Update dependencies (#333) 2021-11-27 15:26:58 +01:00
oklog/ulid Grand test fixup (#138) 2021-08-12 21:03:24 +02:00
opencontainers/runtime-spec [feature] Inherit resource limits from cgroups (#1336) 2023-01-17 20:59:04 +00:00
pelletier/go-toml/v2 [chore]: Bump github.com/gin-gonic/gin from 1.9.0 to 1.9.1 (#1855) 2023-06-01 22:20:16 +01:00
pkg/errors [feature] add rate limit middleware (#741) 2022-08-31 12:06:14 +02:00
pmezard/go-difflib Grand test fixup (#138) 2021-08-12 21:03:24 +02:00
quasoft/memstore Grand test fixup (#138) 2021-08-12 21:03:24 +02:00
remyoudompheng/bigfft [chore] Update uptrace/bun and modernc/sqlite dependencies (#1598) 2023-03-06 11:00:53 +01:00
rs/xid [chore]: Bump github.com/minio/minio-go/v7 from 7.0.53 to 7.0.55 (#1844) 2023-05-29 13:47:11 +01:00
sirupsen/logrus [chore]: Bump github.com/minio/minio-go/v7 from 7.0.60 to 7.0.61 (#2041) 2023-07-31 09:47:25 +01:00
spf13 [chore] update latest deps, ensure readme up to date (#1873) 2023-06-05 10:15:05 +02:00
stretchr/testify [chore]: Bump github.com/stretchr/testify from 1.8.2 to 1.8.3 (#1842) 2023-05-29 13:47:57 +01:00
subosito/gotenv [chore]: Bump github.com/spf13/viper from 1.14.0 to 1.15.0 (#1375) 2023-01-23 10:24:00 +01:00
superseriousbusiness [chore] Update activity dependency (#2031) 2023-07-27 20:54:30 +02:00
tdewolff [chore]: Bump github.com/tdewolff/minify/v2 from 2.12.6 to 2.12.7 (#1927) 2023-06-26 09:34:00 +00:00
tmthrgd/go-hex Grand test fixup (#138) 2021-08-12 21:03:24 +02:00
twitchyliquid64/golang-asm [chore] Update gin to v1.9.0 (#1553) 2023-02-25 12:12:40 +00:00
ugorji/go/codec [chore]: Bump github.com/gin-gonic/gin from 1.9.0 to 1.9.1 (#1855) 2023-06-01 22:20:16 +01:00
ulule/limiter/v3 [chore]: Bump github.com/ulule/limiter/v3 from 3.11.1 to 3.11.2 (#1841) 2023-05-29 13:54:05 +01:00
uptrace [chore] update latest deps, ensure readme up to date (#1873) 2023-06-05 10:15:05 +02:00
vmihailenco Update dependencies (#333) 2021-11-27 15:26:58 +01:00
wagslane/go-password-validator migrate go version to 1.17 (#203) 2021-09-10 14:42:14 +02:00
yuin/goldmark [chore]: Bump github.com/yuin/goldmark from 1.5.4 to 1.5.5 (#2023) 2023-07-24 10:21:14 +00:00