summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2021-01-26 14:24:32 +0000
committerlain <lain@soykaf.club>2021-01-26 14:24:32 +0000
commit229acae6c3da541ebb0438cb7f310cdce1df92b3 (patch)
tree8b93f46ac090021e7e53db392ba54a3c48b31fda /docs
parent71166b30a42ad3a8988049992bcab93c7e2ed656 (diff)
parent250e2020987b1fc65251ba9564e41b38ba060391 (diff)
downloadpleroma-229acae6c3da541ebb0438cb7f310cdce1df92b3.tar.gz
pleroma-229acae6c3da541ebb0438cb7f310cdce1df92b3.zip
Merge branch 'develop' into '2435-list-multiple-users'
# Conflicts: # CHANGELOG.md
Diffstat (limited to 'docs')
-rw-r--r--docs/administration/CLI_tasks/user.md8
-rw-r--r--docs/configuration/cheatsheet.md22
-rw-r--r--docs/configuration/postgresql.md27
-rw-r--r--docs/installation/alpine_linux_en.md2
-rw-r--r--docs/installation/arch_linux_en.md2
-rw-r--r--docs/installation/debian_based_en.md2
-rw-r--r--docs/installation/debian_based_jp.md2
-rw-r--r--docs/installation/otp_en.md13
8 files changed, 47 insertions, 31 deletions
diff --git a/docs/administration/CLI_tasks/user.md b/docs/administration/CLI_tasks/user.md
index b57dce0e7..24fdaeab4 100644
--- a/docs/administration/CLI_tasks/user.md
+++ b/docs/administration/CLI_tasks/user.md
@@ -133,22 +133,20 @@
mix pleroma.user sign_out <nickname>
```
-
-## Deactivate or activate a user
+## Activate a user
=== "OTP"
```sh
- ./bin/pleroma_ctl user toggle_activated <nickname>
+ ./bin/pleroma_ctl user activate NICKNAME
```
=== "From Source"
```sh
- mix pleroma.user toggle_activated <nickname>
+ mix pleroma.user activate NICKNAME
```
-
## Deactivate a user and unsubscribes local users from the user
=== "OTP"
diff --git a/docs/configuration/cheatsheet.md b/docs/configuration/cheatsheet.md
index 85551362c..9d4b07bf4 100644
--- a/docs/configuration/cheatsheet.md
+++ b/docs/configuration/cheatsheet.md
@@ -321,9 +321,10 @@ This section describe PWA manifest instance-specific values. Currently this opti
#### Pleroma.Web.MediaProxy.Invalidation.Script
This strategy allow perform external shell script to purge cache.
-Urls of attachments pass to script as arguments.
+Urls of attachments are passed to the script as arguments.
-* `script_path`: path to external script.
+* `script_path`: Path to the external script.
+* `url_format`: Set to `:htcacheclean` if using Apache's htcacheclean utility.
Example:
@@ -549,7 +550,7 @@ the source code is here: [kocaptcha](https://github.com/koto-bank/kocaptcha). Th
* `uploader`: Which one of the [uploaders](#uploaders) to use.
* `filters`: List of [upload filters](#upload-filters) to use.
* `link_name`: When enabled Pleroma will add a `name` parameter to the url of the upload, for example `https://instance.tld/media/corndog.png?name=corndog.png`. This is needed to provide the correct filename in Content-Disposition headers when using filters like `Pleroma.Upload.Filter.Dedupe`
-* `base_url`: The base URL to access a user-uploaded file. Useful when you want to proxy the media files via another host.
+* `base_url`: The base URL to access a user-uploaded file. Useful when you want to host the media files via another domain or are using a 3rd party S3 provider.
* `proxy_remote`: If you're using a remote uploader, Pleroma will proxy media requests instead of redirecting to it.
* `proxy_opts`: Proxy options, see `Pleroma.ReverseProxy` documentation.
* `filename_display_max_length`: Set max length of a filename to display. 0 = no limit. Default: 30.
@@ -570,10 +571,7 @@ Don't forget to configure [Ex AWS S3](#ex-aws-s3-settings)
* `bucket`: S3 bucket name.
* `bucket_namespace`: S3 bucket namespace.
-* `public_endpoint`: S3 endpoint that the user finally accesses(ex. "https://s3.dualstack.ap-northeast-1.amazonaws.com")
* `truncated_namespace`: If you use S3 compatible service such as Digital Ocean Spaces or CDN, set folder name or "" etc.
-For example, when using CDN to S3 virtual host format, set "".
-At this time, write CNAME to CDN in public_endpoint.
* `streaming_enabled`: Enable streaming uploads, when enabled the file will be sent to the server in chunks as it's being read. This may be unsupported by some providers, try disabling this if you have upload problems.
#### Ex AWS S3 settings
@@ -1113,3 +1111,15 @@ Settings to enable and configure expiration for ephemeral activities
* `:enabled` - enables ephemeral activities creation
* `:min_lifetime` - minimum lifetime for ephemeral activities (in seconds). Default: 10 minutes.
+
+## ConcurrentLimiter
+
+Settings to restrict concurrently running jobs. Jobs which can be configured:
+
+* `Pleroma.Web.RichMedia.Helpers` - generating link previews of URLs in activities
+* `Pleroma.Web.ActivityPub.MRF.MediaProxyWarmingPolicy` - warming remote media cache via MediaProxyWarmingPolicy
+
+Each job has these settings:
+
+* `:max_running` - max concurrently runnings jobs
+* `:max_waiting` - max waiting jobs
diff --git a/docs/configuration/postgresql.md b/docs/configuration/postgresql.md
index 6983fb459..e251eb83b 100644
--- a/docs/configuration/postgresql.md
+++ b/docs/configuration/postgresql.md
@@ -1,10 +1,28 @@
-# Optimizing your PostgreSQL performance
+# Optimizing PostgreSQL performance
-Pleroma performance depends to a large extent on good database performance. The default PostgreSQL settings are mostly fine, but often you can get better performance by changing a few settings.
+Pleroma performance is largely dependent on performance of the underlying database. Better performance can be achieved by adjusting a few settings.
-You can use [PGTune](https://pgtune.leopard.in.ua) to get recommendations for your setup. If you do, set the "Number of Connections" field to 20, as Pleroma will only use 10 concurrent connections anyway. If you don't, it will give you advice that might even hurt your performance.
+## PGTune
-We also recommend not using the "Network Storage" option.
+[PgTune](https://pgtune.leopard.in.ua) can be used to get recommended settings. Be sure to set "Number of Connections" to 20, otherwise it might produce settings hurtful to database performance. It is also recommended to not use "Network Storage" option.
+
+## Disable generic query plans
+
+When PostgreSQL receives a query, it decides on a strategy for searching the requested data, this is called a query plan. The query planner has two modes: generic and custom. Generic makes a plan for all queries of the same shape, ignoring the parameters, which is then cached and reused. Custom, on the contrary, generates a unique query plan based on query parameters.
+
+By default PostgreSQL has an algorithm to decide which mode is more efficient for particular query, however this algorithm has been observed to be wrong on some of the queries Pleroma sends, leading to serious performance loss. Therefore, it is recommended to disable generic mode.
+
+
+Pleroma already avoids generic query plans by default, however the method it uses is not the most efficient because it needs to be compatible with all supported PostgreSQL versions. For PostgreSQL 12 and higher additional performance can be gained by adding the following to Pleroma configuration:
+```elixir
+config :pleroma, Pleroma.Repo,
+ prepare: :named,
+ parameters: [
+ plan_cache_mode: "force_custom_plan"
+ ]
+```
+
+A more detailed explaination of the issue can be found at <https://blog.soykaf.com/post/postgresql-elixir-troubles/>.
## Example configurations
@@ -28,4 +46,3 @@ max_worker_processes = 2
max_parallel_workers_per_gather = 1
max_parallel_workers = 2
```
-
diff --git a/docs/installation/alpine_linux_en.md b/docs/installation/alpine_linux_en.md
index 2f8520a78..7eb1718f2 100644
--- a/docs/installation/alpine_linux_en.md
+++ b/docs/installation/alpine_linux_en.md
@@ -125,7 +125,7 @@ sudo -Hu pleroma mix deps.get
* Check the configuration and if all looks right, rename it, so Pleroma will load it (`prod.secret.exs` for productive instance, `dev.secret.exs` for development instances):
```shell
-mv config/{generated_config.exs,prod.secret.exs}
+sudo -Hu pleroma mv config/{generated_config.exs,prod.secret.exs}
```
* The previous command creates also the file `config/setup_db.psql`, with which you can create the database:
diff --git a/docs/installation/arch_linux_en.md b/docs/installation/arch_linux_en.md
index 9cbd3f429..da78c3205 100644
--- a/docs/installation/arch_linux_en.md
+++ b/docs/installation/arch_linux_en.md
@@ -100,7 +100,7 @@ sudo -Hu pleroma mix deps.get
* Check the configuration and if all looks right, rename it, so Pleroma will load it (`prod.secret.exs` for productive instance, `dev.secret.exs` for development instances):
```shell
-mv config/{generated_config.exs,prod.secret.exs}
+sudo -Hu pleroma mv config/{generated_config.exs,prod.secret.exs}
```
* The previous command creates also the file `config/setup_db.psql`, with which you can create the database:
diff --git a/docs/installation/debian_based_en.md b/docs/installation/debian_based_en.md
index 926a85367..c5687a01e 100644
--- a/docs/installation/debian_based_en.md
+++ b/docs/installation/debian_based_en.md
@@ -98,7 +98,7 @@ sudo -Hu pleroma mix deps.get
* Check the configuration and if all looks right, rename it, so Pleroma will load it (`prod.secret.exs` for productive instance, `dev.secret.exs` for development instances):
```shell
-mv config/{generated_config.exs,prod.secret.exs}
+sudo -Hu pleroma mv config/{generated_config.exs,prod.secret.exs}
```
diff --git a/docs/installation/debian_based_jp.md b/docs/installation/debian_based_jp.md
index 2613a86d9..c4bbd4780 100644
--- a/docs/installation/debian_based_jp.md
+++ b/docs/installation/debian_based_jp.md
@@ -98,7 +98,7 @@ sudo -Hu pleroma mix pleroma.instance gen
* コンフィギュレーションを確認して、もし問題なければ、ファイル名を変更してください。
```
-mv config/{generated_config.exs,prod.secret.exs}
+sudo -Hu pleroma mv config/{generated_config.exs,prod.secret.exs}
```
* 先程のコマンドで、すでに `config/setup_db.psql` というファイルが作られています。このファイルをもとに、データベースを作成します。
diff --git a/docs/installation/otp_en.md b/docs/installation/otp_en.md
index 63eda63ca..f36b33c32 100644
--- a/docs/installation/otp_en.md
+++ b/docs/installation/otp_en.md
@@ -89,6 +89,8 @@ RUM indexes are an alternative indexing scheme that is not included in PostgreSQ
#### (Optional) Performance configuration
It is encouraged to check [Optimizing your PostgreSQL performance](../configuration/postgresql.md) document, for tips on PostgreSQL tuning.
+Restart PostgreSQL to apply configuration changes:
+
=== "Alpine"
```
rc-service postgresql restart
@@ -99,17 +101,6 @@ It is encouraged to check [Optimizing your PostgreSQL performance](../configurat
systemctl restart postgresql
```
-If you are using PostgreSQL 12 or higher, add this to your Ecto database configuration
-
-```elixir
-#
-config :pleroma, Pleroma.Repo,
-prepare: :named,
-parameters: [
- plan_cache_mode: "force_custom_plan"
-]
-```
-
### Installing Pleroma
```sh
# Create a Pleroma user