Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Way to increase performance (big thread allocation) #53
Native.detach(false) in some callbacks help me to significantly increase performance.
The problem is every call from native code JNA allocates java Thread class and init it. So in case of extensive usage i get 1TB allocated young garbage per minute.
Native.detach(false) helps me to solve problem.
This is interesting, though it's not really clear if the fuse-jna library should be doing this by default, or what mechanism it should have so that the user filesystem can express which callbacks should be detach(false)'d or not, and when.
Do you have benchmarks on the performance difference, on one of the example filesystems for example?
No i tested in with my own filesystem, but you can easily reproduce you with memoryFs, FS benchmark (fio for example) and memory allocation profiler (Java mission control for example ).
Maybe it also possible fix it with properly thread initialization with Native.setCallbackThreadInitializer, but detach(false) is easiest solution.
Also, it might be interested for you to look at some related issues https://groups.google.com/forum/#!topic/gstreamer-java/DCDCPjf7uME