Slow Sending Performance - Any Advice on Optimization?

Sion_Bricoux

Beginner
Sep 1, 2024
2
0
1
Hi everyone,

I'm experiencing some slow sending performance with the app and was hoping to get some advice.

I attempted to send a batch of 50,000 emails, with a batch size set at 10,000. However, the sending process feels too slow. Here's a snapshot of the progress:

50271 Emails Total (4071 / 50271 sent) - 8.1% complete (after 35 minutes, only 8% done)
I have 20 sending Nodes.


For this drop, I used batches and set the schedule page with a value of -1, but the sending speed is still disappointing.

Does anyone have suggestions on how to speed this up, or insights into how the sending process works behind the scenes? I'd appreciate any optimization tips or a better understanding of how the app handles bulk sending.

For reference, my server is quite capable, so I don't think hardware is the bottleneck:

  • 8 vCPU Cores
  • 24 GB RAM
  • 300 GB NVMe
  • 32 TB Traffic
Thanks in advance!
 

wasif

Administrator
Staff member
Apr 9, 2019
594
114
43
@Sion_Bricoux, the server specs don't look bad.

Let me explain the purpose of batch size:
Batch size doesn’t necessarily speed up the sending process. Instead, it helps keep the SMTP connection open and handles MySQL queries like incrementing counters before the batch goes out. Setting the batch size to 10,000 isn’t ideal, as most SMTP providers won’t accept that many emails in one go without reopening a new connection.

Now, about the slow sending:
Several factors could be affecting the speed, such as:
  • Server specs
  • Server optimization
  • PHP memory_limit
  • MySQL InnoDB buffer size
  • Size of the bandwidth pipe
  • SMTP server feeding capacity
  • The distance between Mumara and your SMTP server
  • Number of threads used for the campaign (I'd recommend sticking to around 5 threads, which is usually optimal for this server)
In your case, I have a doubt that your SMTP server is either placed in another country or not letting you feed more than a capacity. Moreover, set the batch to 100 which is optimal.

Can you also let me know the values for memory_limit and innodb_buffer_pool_size?
 

Sion_Bricoux

Beginner
Sep 1, 2024
2
0
1
@wasif, Thank you for your detailed explanation. I appreciate the insights into how batch size works and the factors affecting sending speed. Here's the information you requested, along with some additional details:

memory_limit = 12G
[mysqld]
innodb_buffer_pool_size = 12G
max_connections = 5000


I've also adjusted the batch size to 100 as you suggested.

Is the max_connections value of 5000 appropriate for my setup, or should it be adjusted?
 

wasif

Administrator
Staff member
Apr 9, 2019
594
114
43
Did you set these values recently, or were they already configured? Also, please ensure to restart the services after applying the changes. A connection limit of 5000 should be fine, especially when working with multiple threads, as a higher limit can prevent bottlenecks. Have you noticed any performance improvements after making these adjustments?
 

wasif

Administrator
Staff member
Apr 9, 2019
594
114
43
@Sion_Bricoux I've reviewed your ticket and examined your server. Currently, your Mumara domain is using Cloudflare's proxy, which is routing all database queries through Cloudflare. A clear indication of this can be seen in the snapshot below.

1728654320756.png

When I accessed your logs table, Cloudflare obstructed email visibility and took some time to decrypt the email addresses. This same issue is happening internally as well. To resolve this, I recommend disabling the Cloudflare proxy for the subdomain where Mumara is installed. This should significantly improve performance.