Skip to content

Commit

Permalink
nc-limits: adjust db size
Browse files Browse the repository at this point in the history
Signed-off-by: nachoparker <[email protected]>
  • Loading branch information
nachoparker committed Aug 2, 2020
1 parent dda010b commit 06017a4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
7 changes: 5 additions & 2 deletions bin/ncp/CONFIG/nc-limits.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,11 @@ configure()
sed -i "s|^pm =.*|pm = static|" "$CONF"
sed -i "s|^pm.max_children =.*|pm.max_children = $PHPTHREADS|" "$CONF"

# DATABASE MEMORY
AUTOMEM=$(( TOTAL_MEM * 40 / 100 ))
# DATABASE MEMORY (25%)
AUTOMEM=$(( TOTAL_MEM * 25 / 100 ))
# Maximum MySQL Memory Usage = innodb_buffer_pool_size + key_buffer_size + (read_buffer_size + sort_buffer_size) X max_connections
# leave 16MiB for key_buffer_size and a bit more
AUTOMEM=$(( AUTOMEM - (16 + 32) * 1024 * 1024 ))
local CONF=/etc/mysql/mariadb.conf.d/91-ncp.cnf
local CURRENT_DB_MEM=$(grep "^innodb_buffer_pool_size" "$CONF" | awk '{ print $3 }')
echo "Using $AUTOMEM memory for the database"
Expand Down
8 changes: 5 additions & 3 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@

[v1.28.1](https://github.com/nextcloud/nextcloudpi/commit/2528f18) (2020-08-02) nc-ramlogs: pin version
[v1.28.2](https://github.com/nextcloud/nextcloudpi/commit/a2e6356) (2020-08-02) nc-limits: adjust db size

[v1.28.0](https://github.com/nextcloud/nextcloudpi/commit/99cfe9b) (2020-07-23) upgrade to NC18.0.7
[v1.28.1](https://github.com/nextcloud/nextcloudpi/commit/dda010b) (2020-08-02) nc-ramlogs: pin version

[v1.28.0 ](https://github.com/nextcloud/nextcloudpi/commit/99cfe9b) (2020-07-23) upgrade to NC18.0.7

[v1.27.0 ](https://github.com/nextcloud/nextcloudpi/commit/3c96d2e) (2020-07-05) upgrade to NC18.0.6

[v1.26.2, master](https://github.com/nextcloud/nextcloudpi/commit/337ffeb) (2020-06-13) ncp-autoupdate: cronjob write to the log only (#1144)
[v1.26.2 ](https://github.com/nextcloud/nextcloudpi/commit/337ffeb) (2020-06-13) ncp-autoupdate: cronjob write to the log only (#1144)

[v1.26.1 ](https://github.com/nextcloud/nextcloudpi/commit/4e79386) (2020-06-13) ncp-web: fix port checking

Expand Down

0 comments on commit 06017a4

Please sign in to comment.