### Elasticsearch Version

8.6.0-SNAPSHOT

### Installed Plugins

_No response_

### Java Version

_bundled_

### OS Version

N/A

### Problem Description

We see 8.6.0 master nodes (512MB heap) repeatedly dying with OOME when attempting to do a snapshot with GCS snapshot repository. This is not reproducible with prior versions and we suspect that this is caused by https://github.com/elastic/elasticsearch/pull/90282.

### Steps to Reproduce

1. Start a cluster in a containerized environment; master nodes have 1GB of memory, 512MB of heap
2. Setup a GCS snapshot repository
3. Create a snapshot of the cluster.
4. The master node will OOM with the following message:

```
[5383.050s][warning][gc,alloc] elasticsearch[i6][snapshot][T#26]: Retried waiting for GCLocker too often allocating 256 words
[5383.053s][warning][gc,alloc] elasticsearch[i6][snapshot][T#14]: Retried waiting for GCLocker too often allocating 1029 words
java.lang.OutOfMemoryError: Java heap space
```

### Logs (if relevant)

_No response_
server/src/test/java/org/elasticsearch/threadpool/ThreadPoolTests.java
public void testBoundedByBelowMin() {
        int min = randomIntBetween(0, 32);
        int max = randomIntBetween(min + 1, 64);
        int value = randomIntBetween(Integer.MIN_VALUE, min - 1);
        assertThat(ThreadPool.boundedBy(value, min, max), equalTo(min));
    }
    public void testBoundedByAboveMax() {
        int min = randomIntBetween(0, 32);
        int max = randomIntBetween(min + 1, 64);
        int value = randomIntBetween(max + 1, Integer.MAX_VALUE);
        assertThat(ThreadPool.boundedBy(value, min, max), equalTo(max));
    }
    public void testBoundedByBetweenMinAndMax() {
        int min = randomIntBetween(0, 32);
        int max = randomIntBetween(min + 1, 64);
        int value = randomIntBetween(min, max);
        assertThat(ThreadPool.boundedBy(value, min, max), equalTo(value));
    }
    public void testOneEighthAllocatedProcessors() {
        assertThat(ThreadPool.oneEighthAllocatedProcessors(1), equalTo(1));
        assertThat(ThreadPool.oneEighthAllocatedProcessors(4), equalTo(1));
        assertThat(ThreadPool.oneEighthAllocatedProcessors(8), equalTo(1));
        assertThat(ThreadPool.oneEighthAllocatedProcessors(32), equalTo(4));
    }
    public void testAbsoluteTime() throws Exception {
        TestThreadPool threadPool = new TestThreadPool("test");
        try {
            long currentTime = System.currentTimeMillis();
            long gotTime = threadPool.absoluteTimeInMillis();