Don’t overpay Adobe for the Commerce Cloud (Magento 2 Hosting) performance issues.
In this article, I want to discuss different ways that we have seen Adobe commerce customers unnecessarily padding Adobe’s bank account with expensive Commerce Cloud costs.
Using Larger Instance Sizes Than Needed
The great thing about running your Magento in the Adobe Commerce Cloud is Adobe makes it easy to resize(scale) vertically and use a bigger instances size. Instead of procuring new hardware and then migrating your Magento 2 to the new machine, Adobe lets you upgrade your database with more CPU and RAM with only a support request. But there is a limit to how much faster your Magento 2 and MySQL can get by scaling vertically, especially if you do not fix core MAgento 2 issues and adjust its configuration as you change the system’s hardware. But we see customers blindly overpaying for their Magento instance sizes without first checking whether they can optimize in the Magento codebase and their MySQL for its current instance size.
Part of what makes Magento 2 Commerce Cloud so enigmatic is that their performance and scalability are highly dependent on MySQL/MariaDB configurations. Further exacerbating this problem is that the default configurations of MySQL are bad. Know that the defaults always produce suboptimal results, even if they are “pre-tuned” by Magento workers. However, Adobe Cloud uses Platform.SH is on top of AWS as a base and it is not clear can they break it on a part or just using AS IS.
This is an example of how default configuration can cost you, we ran another experiment on two MySQL databases installed one on EC2 instance outside of MAgento Cloud (8 vCPUs, 32GB RAM) and other default installation on Magento Cloud AWS EC2 instances (16 vCPUs, 64GB RAM).
MySQL DB on the smaller instance achieves the same throughput performance as the larger Magento Cloud instance still using the default Magento configuration. That means if your Magento database is using the default configuration, you could be paying for Adobe 50% more than you need to for it.
IOPs — I/O operations/sec (more is better)
Adobe Cloud uses General Purposed IOPs for MySQL SSD storage
Amazon EBS provides seven-volume types: Provisioned IOPS SSD (io2 Block Express, io2, and io1), General Purpose SSD (gp3 and gp2), Throughput Optimized HDD (st1), and Cold HDD (sc1). These volume types differ in performance characteristics and price, allowing you to tailor your storage performance and cost to the needs of your applications. The average latency between EC2 instances and EBS is single-digit milliseconds. For more performance information, see the EBS product details page. For more information about Amazon EBS performance guidelines.
How does burst work on General Purpose SSD (gp2) volumes?
General Purpose SSD (gp2) volumes that are under 1,000 GB receive burst IOPS performance up to 3,000 IOPS for at least 30 min of sustained performance. Additionally, gp2 volumes deliver a consistent performance of 3 IOPS per provisioned GB. For example, a 500 GB volume is capable of driving 1,500 IOPS consistently, and bursting to 3,000 IOPS for 60 minutes (3,000 IOPS * 60 seconds * 30 minutes / 1,500 IOPS / 60 seconds).
So, using Provisioned IOPs (PIOPs) is an essential optimization in AWS to ensure that your MySQL databases achieve consistent read/write performance. It is common to approach to improving Magento MySQL performance problems that seem to be related to disk I/O is to increase PIOPs but Adobe Cloud doesn't have this option. Also, you can increase SSD size to 400GB to increase baseline EBS IOPS. Default Magento Cloud size of the instance is 9Gb it has 100 IOPs baseline performance and 3000 burstable performance. If to reserve 400GB your baseline performance will be 1200 IOPs. However, beyond 10k PIOPs, MySQL performance does not improve for our write-heavy workload.
Also, it is good to have a dedicated server for MySQL to have stable and predictable performance. But, in the Magento cloud, all services/software (PHP, MySQL, NFS GlusterFS, Redis, Magento Crons, RebitMQ, Zookeeper, HaProxy, ElasticSearch, Nginx) are installed in some instance.
With Magento Commerce cloud, you have committed to bad performance.