joerghoh commented on code in PR #2978:
URL: https://github.com/apache/jackrabbit-oak/pull/2978#discussion_r3500748353
##########
oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/spi/persistence/persistentcache/AbstractPersistentCache.java:
##########
@@ -31,27 +31,68 @@
import java.io.Closeable;
import java.util.Set;
import java.util.UUID;
+import java.util.concurrent.BlockingQueue;
import java.util.concurrent.Callable;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
+import java.util.concurrent.LinkedBlockingQueue;
+import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicLong;
public abstract class AbstractPersistentCache implements PersistentCache,
Closeable {
private static final Logger logger =
LoggerFactory.getLogger(AbstractPersistentCache.class);
public static final int THREADS =
Integer.getInteger("oak.segment.cache.threads", 10);
+ public static final int WRITE_QUEUE_SIZE =
Integer.getInteger("oak.segment.cache.writeQueueSize", THREADS * 100);
Review Comment:
> Writing to disk will be limited to the performance of the IO system and
does not scale much with the number of threads that are writing
This is definitely true for the classic hard drives (aka "spinning rust"),
but not anymore for NVME-SSDs. You get the full IOPS only when you execute
operations at a massive scale (IIRC 256 concurrent threads). And this is
applicable for both read and write. Assuming a modern operating system also the
filesystem should be able to handle that.
For that I strongly recommend to keep these 10 as default.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]