Questions tagged [directmemory]

20 questions
9
votes
1 answer

Setting MaxDirectMemory and MaxHeapMemory for Java Applications

For my Java application, I was trying to limit the heap memory and direct memory usage using command line options. I came across the following VMware article when I was trying to understand more about the Java application memory layout. From the…
GoT
  • 530
  • 1
  • 13
  • 35
6
votes
3 answers

How much data is too much for on-heap java cache? When should I start to think about off-heap cache?

How much data is too much for on-heap cache like ehcache? I'm getting a 24GB RAM server. I'll probably start off devoting 2-4 GB for caching but may end up devoting 20GB or so to cache. At what point should I worry that GC for on-heap cache will…
Continuation
  • 12,722
  • 20
  • 82
  • 106
4
votes
3 answers

Using DMA to access High Speed Serial Port

I use serialport component in c# and it works well! But the question is how can it be faster to handle high speed (e.g. 2 Mbps) data transfers. As I have researched about this, I have found that memory can be accessed directly (using DMA like this…
Mohammad Gohari
  • 241
  • 3
  • 12
4
votes
1 answer

How to free memory using Java Unsafe, using a Java reference?

Java Unsafe class allows you to allocate memory for an object as follows, but using this method how would you free up the memory allocated when finished, as it does not provide the memory address... Field f =…
newlogic
  • 807
  • 8
  • 25
3
votes
1 answer

Is off-heap cache DirectMemory ready for production? Is it active?

DirectMemory seems to be the only open source off-heap cache for Java. Is it ready for production? Is it an active, viable project? I looked at its mailing list archive and it's very low volume.
Continuation
  • 12,722
  • 20
  • 82
  • 106
3
votes
0 answers

Why does Java need to copy heap memory from(to) direct memory when involving IO system call?

Why does Java need to copy heap memory from(to) direct memory when involving IO system call? Some articles say that's because of the GC, but I don't understand it clearly. And if it's truly because of the GC, do other languages have this problem,…
lookno
  • 41
  • 1
3
votes
3 answers

Using huge pages and DirectByteBuffer in java hotspot jvm on Linux

What I would like to do I need to use direct memory to avoid the GC moving things around. I would like to enable huge pages for those. So far The flag -XX:+UseLargePages works fine when using heap Buffer (non-direct ByteBuffers), but does not work…
2
votes
1 answer

How to get Direct Memory Snapshot of a Netty 4 Application

I have a Netty Based Server which handles numerous HTTP Request asynchronously. Objective - Expose Direct Memory Usage of the application. Now I understand the Reference Counting is one way of exposing memoryusage. But for each request, few objects …
vkohli
  • 65
  • 7
2
votes
1 answer

Efficient way to find who allocates direct memory

I am working on a JAVA project that integrates many components from many teams. Today, we observe strong direct-memory consumption but we are unable to find where it is allocated. I am looking for an efficient way (tool) to investigate such a…
Philippe MESMEUR
  • 737
  • 8
  • 22
2
votes
1 answer

Buffer vs Unsafe - Outside JVM

I have a requirement to use a space in the available RAM which the GC has no control on. I read a few articles on the same which gave me the introduction on two approaches. They are specified in the following code. package com.directmemory; import…
userx
  • 3,713
  • 5
  • 32
  • 38
1
vote
2 answers

spark shuffle memory error: failed to allocate direct memory

When performing a couple of joins on spark data frames (4x) I get the following error: org.apache.spark.shuffle.FetchFailedException: failed to allocate 16777216 byte(s) of direct memory (used: 4294967296, max: 4294967296) Even when setting: --conf…
Georg Heiler
  • 16,916
  • 36
  • 162
  • 292
1
vote
1 answer

Why it is recommended to use only Heap Buffers with [byte] operations in ChannelOutboundHandler.?

We are working on open-sourcing an api gateway and using Netty as underlying framework. I came across Norman Maurer slides. In one of the slides, he mentioned Only use heap buffers if need to operate on byte[] in ChannelOutboundHandler! By…
vkohli
  • 65
  • 7
1
vote
1 answer

How would I invoke a Java method using a long memory address?

Lets say I had a memory address which was a long in Java, If I know that memory address was a function pointer, how could I invoke the function at this address? The reason I am interested in this is for dealing with off-heap objects. I am to create…
newlogic
  • 807
  • 8
  • 25
0
votes
0 answers

javax.ws.rs.ProcessingException: reactor.netty.ReactorNetty$InternalNettyException: io.netty.util.internal.OutOfDirectMemoryError: failed to allocate

I am seeing reactor.netty.ReactorNetty$InternalNettyException: io.netty.util.internal.OutOfDirectMemoryError: failed to allocate 16777216 byte(s) of direct memory (used: 1056964615, max: 1073741824) issue while calling an external client B from my…
S2K
  • 107
  • 1
  • 11
0
votes
0 answers

Could redis overwrite direct memory using by Java?

I am using Apache Arrow Java API, which access the direct memory. I am also using Redis, when this Java API accessing direct memory, Redis xstream continues to grow in memory. I found occasionally, Arrow would calculate the wrong result of following…
Litchy
  • 623
  • 7
  • 23
1
2