summaryrefslogtreecommitdiff
path: root/internal/config/defaults.go
diff options
context:
space:
mode:
authorLibravatar kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>2023-08-14 17:08:19 +0100
committerLibravatar GitHub <noreply@github.com>2023-08-14 17:08:19 +0100
commit815b5291e034864052771cd3561fea479027e00f (patch)
tree18e3d49c441fb15e1f05ea2611e9c5c96b0be86f /internal/config/defaults.go
parent[fix] Update CSP header for blob images (upload preview) and dev livereload (... (diff)
downloadgotosocial-815b5291e034864052771cd3561fea479027e00f.tar.xz
[bugfix] fix inconsistent calculated cache sizes (#2115)v0.11.0
* use calculated exampleTime instead of `time.Now()` to ensure no locale data, retweak cache ratios * update envparsing test * update default cache memory to 100MiB * fix envparsing with latest cache target default --------- Signed-off-by: kim <grufwub@gmail.com>
Diffstat (limited to 'internal/config/defaults.go')
-rw-r--r--internal/config/defaults.go26
1 files changed, 13 insertions, 13 deletions
diff --git a/internal/config/defaults.go b/internal/config/defaults.go
index b78362973..536f1b0a3 100644
--- a/internal/config/defaults.go
+++ b/internal/config/defaults.go
@@ -129,7 +129,7 @@ var Defaults = Configuration{
// Rough memory target that the total
// size of all State.Caches will attempt
// to remain with. Emphasis on *rough*.
- MemoryTarget: 200 * bytesize.MiB,
+ MemoryTarget: 100 * bytesize.MiB,
// These ratios signal what percentage
// of the available cache target memory
@@ -145,32 +145,32 @@ var Defaults = Configuration{
// when TODO items in the size.go source
// file have been addressed, these should
// be able to make some more sense :D
- AccountMemRatio: 18,
- AccountNoteMemRatio: 0.1,
+ AccountMemRatio: 5,
+ AccountNoteMemRatio: 1,
ApplicationMemRatio: 0.1,
- BlockMemRatio: 3,
+ BlockMemRatio: 2,
BlockIDsMemRatio: 3,
BoostOfIDsMemRatio: 3,
EmojiMemRatio: 3,
EmojiCategoryMemRatio: 0.1,
- FollowMemRatio: 4,
+ FollowMemRatio: 2,
FollowIDsMemRatio: 4,
FollowRequestMemRatio: 2,
FollowRequestIDsMemRatio: 2,
InReplyToIDsMemRatio: 3,
InstanceMemRatio: 1,
- ListMemRatio: 3,
- ListEntryMemRatio: 3,
+ ListMemRatio: 1,
+ ListEntryMemRatio: 2,
MarkerMemRatio: 0.5,
MediaMemRatio: 4,
- MentionMemRatio: 5,
- NotificationMemRatio: 5,
+ MentionMemRatio: 2,
+ NotificationMemRatio: 2,
ReportMemRatio: 1,
- StatusMemRatio: 18,
- StatusFaveMemRatio: 5,
+ StatusMemRatio: 5,
+ StatusFaveMemRatio: 2,
StatusFaveIDsMemRatio: 3,
- TagMemRatio: 3,
- TombstoneMemRatio: 2,
+ TagMemRatio: 2,
+ TombstoneMemRatio: 0.5,
UserMemRatio: 0.25,
WebfingerMemRatio: 0.1,
VisibilityMemRatio: 2,