From 38681aba64fd78c92abcd5c546ce0f4900ba478a Mon Sep 17 00:00:00 2001 From: Ben Wilson Date: Fri, 4 Aug 2023 18:30:31 -0400 Subject: [PATCH] more cache --- src/services/app.service.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/services/app.service.ts b/src/services/app.service.ts index 1ba4a3c..a0e9a61 100644 --- a/src/services/app.service.ts +++ b/src/services/app.service.ts @@ -18,12 +18,12 @@ export class AppService implements OnModuleInit { async onModuleInit() { //https://phiresky.github.io/blog/2020/sqlite-performance-tuning/ - //100 MB DB cache - await this.dataSource.query(`PRAGMA cache_size = -100000;`); + //500 MB DB cache + await this.dataSource.query(`PRAGMA cache_size = -500000;`); //Normal is still completely corruption safe in WAL mode, and means only WAL checkpoints have to wait for FSYNC. await this.dataSource.query(`PRAGMA synchronous = normal;`); - //1Gb - await this.dataSource.query(`PRAGMA mmap_size = 1000000000;`); + //3Gb + await this.dataSource.query(`PRAGMA mmap_size = 3000000000;`); } @Cron(CronExpression.EVERY_HOUR)