Search code examples
google-cloud-sqlpostgresql-13

Where this read/write operations limit being set on CloudSQL?


Is this value configurable by us, or this is limit by GCP?

chart limit

Other question is that write apparently are more than the limit after paralelizing from 1 to 10 threads more (only increase throughput by 2x, last few minutes from the chart above), what could be the possible cause of this?


Solution

  • I've managed to test whether read/write speed is configurable and I arrived with a conclusion that it is. You can change the read/write speed by changing the storage capacity.

    Please check the images below:

    This is a screenshot before changing the storage capacity:

    And this is after changing the capacity:

    I also noticed that if you're using HDD, write speed is higher than read speed:

    You can only change storage capacity if an instance is already deployed. You can only select storage type when creating a new instance.

    With regards write speed is over the limit, we can't make specific claims when changing thread value. There are several factors that this may cause:

    • Workload performance could impact read/write speed depending on the characteristics of the workload. Workloads which are heavily multi-threaded or take advantage of high levels of parallelism may experience performance improvements when hyper-threading is enabled. Single-threaded or those with limited parallelism may see little to no benefit.
    • Enabling hyper-threading increases the number of logical CPU cores only visible to the OS, which could result in increased context-switching overhead and potential resource contention or conflict over a shared resources between components, i.e., CPU, storage, RAM. This may have a slight impact on the performance of certain workloads.

    It is recommended to monitor the performance metrics and conduct thorough testing before performing changes to the thread count in a Cloud SQL PostgreSQL instance.