Bringing together the Apache Cassandra experts from the community and DataStax.

Want to learn? Have a question? Want to share your expertise? You are in the right place!

Not sure where to begin? Getting Started

 

question

stephen9834 avatar image
stephen9834 asked Erick Ramirez commented

Getting message in logs "Maximum memory usage reached (6251610112), cannot reserve size of 4194304"

Below Message seen in logs

INFO  [CoreThread-0] 2020-12-08 12:34:30,743  NoSpamLogger.java:95 - Maximum memory usage reached (6251610112), cannot reserve size of 4194304
DEBUG [CoreThread-0] 2020-12-08 12:34:30,744  NoSpamLogger.java:92 - Requested buffer size 4.000KiB has been allocated directly due to buffer pool exhausted
INFO  [CoreThread-2] 2020-12-08 12:35:00,800  NoSpamLogger.java:95 - Maximum memory usage reached (6251610112), cannot reserve size of 4194304
DEBUG [CoreThread-2] 2020-12-08 12:35:00,801  NoSpamLogger.java:92 - Requested buffer size 4.000KiB has been allocated directly due to buffer pool exhausted
INFO  [CoreThread-1] 2020-12-08 12:35:32,442  NoSpamLogger.java:95 - Maximum memory usage reached (6251610112), cannot reserve size of 4194304
DEBUG [CoreThread-1] 2020-12-08 12:35:32,442  NoSpamLogger.java:92 - Requested buffer size 4.000KiB has been allocated directly due to buffer pool exhausted
INFO  [CoreThread-1] 2020-12-08 12:36:03,738  NoSpamLogger.java:95 - Maximum memory usage reached (6251610112), cannot reserve size of 4194304
DEBUG [CoreThread-1] 2020-12-08 12:36:03,738  NoSpamLogger.java:92 - Requested buffer size 4.000KiB has been allocated directly due to buffer pool exhausted
INFO  [CoreThread-1] 2020-12-08 12:36:40,741  NoSpamLogger.java:95 - Maximum memory usage reached (6251610112), cannot reserve size of 4194304
DEBUG [CoreThread-1] 2020-12-08 12:36:40,742  NoSpamLogger.java:92 - Requested buffer size 4.000KiB has been allocated directly due to buffer pool exhausted

Not able to understand this message could you help in this ?

jvm
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Erick Ramirez avatar image
Erick Ramirez answered Erick Ramirez commented

The entry gets logged when the memory buffer for the file cache is full so requests to reserve memory from the pool can't be satisfied. This is indicative that read requests are filling up the file cache quicker than the buffer segments can be recycled.

The size available to the file buffers is determined by the file cache size parameter file_cache_size_in_mb. You can increase it by explicitly setting the size in cassandra.yaml or setting the JVM option -XX:MaxDirectMemorySize.

For details, see Tuning the JVM. Cheers!

2 comments Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Thanks for super quick response !! @Erick Ramirez we have enough free ram but still we are continuously observing this message in logs and we haven't defined file_cache_size_in_mb parameter in cassandra.yml . could you guide on how to decide value of this parameter ?

0 Likes 0 ·

I can only provide you general guidance in this Q&A forum. See the document I linked.

As I stated in other posts, if you need a recommendation specific to your environment as a DSE customer then you will need to log a ticket with DataStax Support so one of our engineers can assist you. This forum isn't a replacement for support. Cheers!

0 Likes 0 ·