You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Tarik Hrnjica <th...@deep.rent> on 2022/09/20 12:43:05 UTC
Performance tweaks in database-per-user scenario
Hi everyone,
we use the database-per-user pattern in a mobile-centric environment. Each database is replicated to one or more end-user devices, and possibly also to other users' databases (collaborative editing). This has been working well until we recently started to experience severe performance drops during replication tasks.
Could you provide some guidance on how to optimize CouchDB for many, highly replicated databases? I'm looking for general recommendations on which configuration options we can tweak before scaling horizontally.
Kind regards,
Tarik
Re: Performance tweaks in database-per-user scenario
Posted by Willem van der Westhuizen <wi...@kwantu.net>.
Thank you for this. Please indicate how high max_dbs_open is? Do you use
clouseau as well?
On 2022/09/20 15:06, Hoël Iris wrote:
> I do the following:
>
> - default q and n
> - high [couchdb].max_dbs_open (and high system ulimit)
> - [couchdb].update_lru_on_read = false (I’m not sure about this one)
> - [replicator].use_checkpoints = false (I’m not sure about this one too)
> - Low compaction parameters: [smoosh.ratio_dbs].min_size = 131072,
> [smoosh.ratio_views].min_size
> = 131072, [smoosh.slack_dbs].min_size = 131072,
> [smoosh.slack_views].min_size
> = 131072
> - SSD with high IO per second
>
>
> Le mar. 20 sept. 2022 à 14:45, Tarik Hrnjica <th...@deep.rent> a écrit :
>
>> Hi everyone,
>>
>>
>> we use the database-per-user pattern in a mobile-centric environment. Each
>> database is replicated to one or more end-user devices, and possibly also
>> to other users' databases (collaborative editing). This has been working
>> well until we recently started to experience severe performance drops
>> during replication tasks.
>>
>>
>> Could you provide some guidance on how to optimize CouchDB for many,
>> highly replicated databases? I'm looking for general recommendations on
>> which configuration options we can tweak before scaling horizontally.
>>
>>
>> Kind regards,
>>
>>
>> Tarik
>>
>>
Re: Performance tweaks in database-per-user scenario
Posted by Hoël Iris <ho...@tolteck.com>.
I do the following:
- default q and n
- high [couchdb].max_dbs_open (and high system ulimit)
- [couchdb].update_lru_on_read = false (I’m not sure about this one)
- [replicator].use_checkpoints = false (I’m not sure about this one too)
- Low compaction parameters: [smoosh.ratio_dbs].min_size = 131072,
[smoosh.ratio_views].min_size
= 131072, [smoosh.slack_dbs].min_size = 131072,
[smoosh.slack_views].min_size
= 131072
- SSD with high IO per second
Le mar. 20 sept. 2022 à 14:45, Tarik Hrnjica <th...@deep.rent> a écrit :
> Hi everyone,
>
>
> we use the database-per-user pattern in a mobile-centric environment. Each
> database is replicated to one or more end-user devices, and possibly also
> to other users' databases (collaborative editing). This has been working
> well until we recently started to experience severe performance drops
> during replication tasks.
>
>
> Could you provide some guidance on how to optimize CouchDB for many,
> highly replicated databases? I'm looking for general recommendations on
> which configuration options we can tweak before scaling horizontally.
>
>
> Kind regards,
>
>
> Tarik
>
>