From 5e9720f41c42bcc35d2247cfedf2fb3229d7a087 Mon Sep 17 00:00:00 2001 From: Jiaqiang Xu Date: Wed, 16 Mar 2022 17:38:10 +0800 Subject: [PATCH] Add memcached documentation for Pro. (#74) --- manual/deploy/add_memcached.md | 2 ++ manual/deploy_pro/memcached_options.md | 44 ++++++++++++++++++++++++++ mkdocs.yml | 1 + 3 files changed, 47 insertions(+) create mode 100644 manual/deploy_pro/memcached_options.md diff --git a/manual/deploy/add_memcached.md b/manual/deploy/add_memcached.md index 8b61064f..702b4c40 100644 --- a/manual/deploy/add_memcached.md +++ b/manual/deploy/add_memcached.md @@ -2,6 +2,8 @@ Seahub caches items (avatars, profiles, etc) on the file system in /tmp/seahub_cache/ by default. You can use memcached instead to improve the performance. +There are more memcached configurations in the Pro edition. Please refer to [Memcached Options for Pro Edition](../deploy_pro/memcached_options.md). + First, make sure `libmemcached` library and development headers are installed on your system. **For Seafile 7.1+** diff --git a/manual/deploy_pro/memcached_options.md b/manual/deploy_pro/memcached_options.md new file mode 100644 index 00000000..78d52dc4 --- /dev/null +++ b/manual/deploy_pro/memcached_options.md @@ -0,0 +1,44 @@ +# Memcached Options for Pro Edition + +In Seafile Pro edition, a few advanced features rely on memcached, in addition to the basic memcached usage mentioned in [community edition memcached options](../deploy/add_memcached.md). + +* When clustering is enabled, some information is stored in memcached to allow access from multiple nodes. It includes copy/move progress, zip progress. +* Some information is cached in memcached to improve performance, such as library list, small objects from object storage backends, mapping from library ID to storage backends. + +For historic reasons, the memcached configurations for different features are scattered in different sections in seafile.conf file. We list these options here for quick reference. + +For [clustering](./deploy_in_a_cluster.md), the following options are provided. + +``` +[cluster] +enabled = true +memcached_options = --SERVER= --POOL-MIN=10 --POOL-MAX=100 +``` + +For object storage backends, memcached options can be added in the backend configurations. You can refer to the corresponding documentation for specific backend. For example, when you use S3 backend, + +``` +[block_backend] +name = s3 +# bucket name can only use lowercase characters, numbers, periods and dashes. Period cannot be used in Frankfurt region. +bucket = my-block-objects +key_id = your-key-id +key = your-secret-key +memcached_options = --SERVER= --POOL-MIN=10 --POOL-MAX=100 +``` + +When you enable [multiple storage backend](./multiple_storage_backends.md), you can set the below options to cache mappings from library ID to its backend. This option also enables library list cache feature, which reduces database loads for frequently listing accessible library list. + +``` +[memcached] +memcached_options = --SERVER= --POOL-MIN=10 --POOL-MAX=100 +``` + +Since version 8.0, all memcached options are consolidated to the one below. + +``` +[memcached] +memcached_options = --SERVER= --POOL-MIN=10 --POOL-MAX=100 +``` + +If the above option is set, it'll override all other memcached options. If it's not set, the old and existing options will be used. So it's backward compatible. \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index 9a7ffadd..4f536ecc 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -117,6 +117,7 @@ nav: - Advanced Maintenance Tools: - Real-time Backup Server: deploy_pro/real_time_backup.md - Import Directory To Seafile: deploy_pro/seaf_import.md + - Memcached Options for Pro Edition: deploy_pro/memcached_options.md - License: deploy_pro/seafile_professional_sdition_software_license_agreement.md - Seafile Setup with Docker: - Seafile Community Installation: docker/deploy_seafile_with_docker.md