# Deduplicate cron is taking too long, any way to speed up?

**URL:** <https://forum.mautic.org/t/deduplicate-cron-is-taking-too-long-any-way-to-speed-up/21983>\
**Category:** Product Support\
**Tags:** mautic-3, mautic-4\
**Created:** [December 11, 2021, 1:26pm UTC](https://forum.mautic.org/t/deduplicate-cron-is-taking-too-long-any-way-to-speed-up/21983 "2021-12-11T13:26:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mita.michael](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mita.michael/32/4846_2.png) [@mita.michael](https://forum.mautic.org/u/mita.michael)\
**Post date:** [December 11, 2021, 1:26pm UTC](https://forum.mautic.org/t/deduplicate-cron-is-taking-too-long-any-way-to-speed-up/21983/1 "2021-12-11T13:26:30Z")

</div>

**Your software**  
My Mautic version is: 4.0.1  
My PHP version is: 7.4  
My Database type and version is: MariaDB 10.5.13

Running on 20.04 Ubuntu DO 8GB 80GB 4vCPUs

**Your problem**  
My problem is: Running deduplicate is taking a LOOONG time on 134k contacts

These errors are showing in the log: N/A

Steps I have tried to fix the problem: Tried installing the custom deduplicate plugin but theres an issue with 4.0.1

Is there a way to increase the deduplicate cron speed ? Increasing batch limit like with the segments updates ? Also is there any way to increase the speed of other cron jobs well?

---

<div class="post-metadata">

**Author:** ![EJL](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ejl/32/12155_2.png) [@EJL](https://forum.mautic.org/u/EJL)\
**Post date:** [December 11, 2021, 5:15pm UTC](https://forum.mautic.org/t/deduplicate-cron-is-taking-too-long-any-way-to-speed-up/21983/2 "2021-12-11T17:15:29Z")

</div>

Post your my.conf to determine your database server settings. It takes a good amount of tuning to get adequate performance from a database server.

What are your max settings in your php.ini as well?

---

<div class="post-metadata">

**Author:** ![mita.michael](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mita.michael/32/4846_2.png) [@mita.michael](https://forum.mautic.org/u/mita.michael)\
**Post date:** [December 13, 2021, 1:00pm UTC](https://forum.mautic.org/t/deduplicate-cron-is-taking-too-long-any-way-to-speed-up/21983/3 "2021-12-13T13:00:06Z")

</div>

Hey, I have defaults on in php and mariadb. But your post did prompt me to look into memory allocation so as a result I changed

`innodb_buffer_pool_size` to 80% of RAM  
` key_buffer_size` to 20M

---

<div class="post-metadata">

**Author:** ![mita.michael](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mita.michael/32/4846_2.png) [@mita.michael](https://forum.mautic.org/u/mita.michael)\
**Post date:** [December 14, 2021, 3:46pm UTC](https://forum.mautic.org/t/deduplicate-cron-is-taking-too-long-any-way-to-speed-up/21983/4 "2021-12-14T15:46:38Z")

</div>

![image](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/1/1e785751999eae837545627a14972923ddcd2298.png)

The longer it runs the slower it gets

---

<div class="post-metadata">

**Author:** ![mita.michael](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mita.michael/32/4846_2.png) [@mita.michael](https://forum.mautic.org/u/mita.michael)\
**Post date:** [February 15, 2022, 2:57pm UTC](https://forum.mautic.org/t/deduplicate-cron-is-taking-too-long-any-way-to-speed-up/21983/5 "2022-02-15T14:57:35Z")

</div>

Bump, any thoughts on this?
