Testing the Oracle OCI APEX Service

Search for a command to run...

Julian News
Great Write up.
You should probably clarify something, though.
When you say "When you load a page with two dynamic actions, the page will make three requests.", I believe that this is only true if the DA in question performs some type of server-side action or call-back.
You absolutely need to be aware that any call-back to the server spawns a connection. So, pages which use heavy SQL or PL/SQL based DAs can mean heavy connection use.
But fully client side DAs (to hide/show, etc) do not add to the connection requirements.
Pedantic, I know, but worth talking about.
What I learned is you better open your Dev-Tools and see how many parallel DB requests you actually have on a site. You probably will be surprised. Since my pages are DA heavy with DB calls, I roughly calculate a single page call with 5 parallel users 😌
Introduction One of the marquee features of APEX 26.1 was AI Interactive Reports. When I started testing this new feature, I was interested to see what was going on behind the scenes. In this post, I

Introduction One of the marquee features of APEX 26.1 is APEX AI Agents. APEX AI Agents allow you to use an LLM and your own PL/SQL and JS tools to perform actions on your data instead of just chattin

Introduction In my previous post, I looked at logging APEX AI Agent requests and responses with Request and Response handlers. Logging is the first step because it shows you what is actually moving th

Introduction Logging is one of the first things you need when building serious AI Agents. Without it, debugging quickly becomes guesswork. You can see the final answer, but not always why the model ch

Context management patterns from building agents in Oracle APEX

Oracle recently announced a change in the pricing for the OCI Autonomous type services (ATP, APEX, JSON, etc.). The major change was that you now buy compute in units of ECPU rather than OCPU. Link to ECPU FAQ.
This change means that according to the OCI pricing calculator, you can now provision an OCI APEX Application Development Service for less than half the previous cost, all be it with less computing power, memory, and storage. This is still fantastic news, as we can spin up a fully supported, fully backed-up APEX instance for around $138 a month.

As I had an OCI APEX Service, which I wanted to change from 1 OCPU to 2 ECPUs, I did some basic testing before and after to see how much performance I would lose for the cost savings.
Here is what my setup looked like before and after the change from 1 OCPU to 2 ECPUs:
| Option | Before | After |
| CPU | 1 OCPU | 2 ECPU |
| Storage | 1 TB | 256 GB |
| Backup Storage | 1 TB | 256 GB |
| Backup Retention | 60 Days | 30 Days |
| Autoscaling | Off | Off |
| OCI Load Balancer | 10 GB | 10 GB |
| OCI Vanity URL | Yes | Yes |
I used the WA State EV car population dataset for my test data. The download creates a 36 MB CSV file from which I created a table with 18 columns and 150,483 records.
REST API 500 Records (Not Indexed)
REST API 91 Records (Indexed)
APEX IR 50 Records (Not Indexed)
I used the Postman 'Run Collection' tool to run a Postman collection containing the above three requests. Postman will spin up a number of virtual threads, and each thread will execute each of the requests in the collection one at a time until the test is complete.
With Postman, you can use different load profiles to simulate different load types. I used three profiles to simulate three different load types in my testing.
This simple test simulates ten users constantly cycling through the requests for 2 minutes.

This test simulates a fixed load of 5 users for 20 seconds. Then, steadily increase the load to 25 users over the next 20 seconds and hold for 40 seconds, and then steadily decrease the load from 25 to 5 over the next 20 seconds, maintaining a fixed load of 5 users for 20 seconds.

This test simulates a fixed load of 15 users for 20 seconds. Then, steadily increase the load to 50 users over the next 20 seconds and hold for 40 seconds, and then steadily decrease the load from 50 to 15 over the next 20 seconds, maintaining a fixed load of 15 users for 20 seconds.

Unfortunately, per the OCI terms of service, I cannot publish benchmarks, so I cannot share the specifics in this post. I can, however, share my conclusions.
Considering the performance is supposed to be half, throughput is not impacted as much as you would think. This is likely because these tests are not very compute-intensive.
Even with a peak of 50 simultaneous users, I never received a single error!
With ten simultaneous users, average response times are almost the same when comparing 1 OCPU to 2 ECPUs.
Average Response becomes more erratic when we reach a 25-user peak load, with an average response time reduction of 25%.
Compute Autoscaling scales up to 3X your ECPUs (6 ECPUs in my case) when demand increases. I turned Autoscaling on and found performance was not much better than having just 2 ECPUs with no autoscaling. I think the reason for this can be found in this post from SQL Maria.
However, when Auto Scale kicks in, you do not get additional memory, or a higher degree of parallelism, since the goal of Auto Scale is to help you deal with a rapid increase in concurrent queries/workload. Once the demand drops off you want the system to go right back to what it was before.
As my tests do not really tax the CPU, it makes sense that Autoscaling has little impact.
The Postman load test tool only allows you up to 100 virtual users. I ran the test with 100 virtual users flat out for 1 minute, and although response times were erratic and throughput suffered, it soldiered on with zero failed requests!
I am sure many of you want me to tell you how many users the APEX service with 2 ECPUs can handle. Unfortunately, I cannot do that 😔. I can, however, give you my thoughts on what these tests mean to me.
Oracle increases database memory as you increase the number of ECPUs. Reducing from 1 OCPU to 2 ECPUs would have reduced the database memory and impacted performance.
Consider how memory-intensive your workload is before going to 2 ECPUs.
You must be careful when testing with virtual users. In my peak load test, I simulated 50 users, all hitting go simultaneously for 2 minutes.
If you think about your APEX Apps, how many users all hit go simultaneously?
So, even though you may have 1,000 registered users, you may only need to accommodate ten active users simultaneously.
If your workload is CPU-intensive and you experience sporadic bursts of activity, consider using Autoscaling to keep your overall ECPU count (and costs) down.
I think 2 ECPU instances are a no-brainer for development and test environments.
I also believe they can be used in many production use cases, specifically those where you expect 20 or fewer simultaneous users (this could be thousands of registered users).
Reduce the storage allocation to save on storage costs.

Reduce backup retention days to save on backup storage costs.
