-
Notifications
You must be signed in to change notification settings - Fork 872
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Memory Issues with 32 Bit java #7586
Comments
Hi @EricSchreiner what is your disk cache size? |
Hi @Laa
|
@EricSchreiner I suppose it means that you have 4GB disk cache. Which is above of capabilities of 32 JVM. Also, I strongly do not recommend to disable first level cache About your settings:
it may cause a lot of strange exceptions in your application.
mvrbtree is removed long time ago from distribution and this parameter is not needed.
is the legacy of 1.x version of the implementation of txs and not used any more. So you can remove them too.
is always true and can not be changed, even if you directly set it to false. So this parameter can be removed too.
is not valid anymore, this parameter is always true and can not be changed. The same for Back to your main issue. I suggest you set P.S. BTW what is your expected DB size, according to tests which you already performed do you already have some expectations. By DB size, I mean size on disk in GBs or MBs? |
Hi @Laa You wrote I should reduce DISK_CACHE_SIZE to 800m. Is this related to XX:MaxDirectMemorySize? If yes how? Can I set DISK_CACHE_SIZE and XX:MaxDirectMemorySize to 128mb? For your understanding: We have thousands of users runnig PicApport not having the XX:MaxDirectMemorySize set. Lots of them are using a RaspberyPI with just one Gig of physical memory. To answer your questions. My test database contains about 50.000 Photos (metadata and thumbnails) . I also have a test system with one million Photos (for this we have a 64 Bit engine but I have not tried it yet with V2.2.xx) |
@EricSchreiner I see I suppose I can help you to run a database without -xx:maxdirectmemory set. But now we are busy. I will be back to this issue on next Tuesday. |
OK |
Hi @EricSchreiner, There are basically only three options that affect/limit the memory usage of OrientDB:
The disk cache allocates memory from JVM's off-heap "direct" memory. So to avoid OOMs Regarding your test box with less than 2GB of RAM mentioned in the emails. Try to set In case of 1GB RaspberyPI box with already configured |
Hi @taburet, |
It should work, AFAIU, but in a wrong way :) Why it may behave differently specifically at 16GB?
Seems like it will be 16GB and that may be a problem. Will check this.
Yes, exactly. |
@EricSchreiner did you see messages like "32 bit JVM is detected. Lowering disk cache size from X to Y" in the logs? |
Hi @taburet |
@taburet one more thing about why using 32-Bit on a machine with 16 Gig of Ram. Well this is our Test-environment. Also my laptop I use for testing has 32 gig of RAM and I also need to test installations I have received from users . |
@EricSchreiner yes, I understand your needs. The strange thing is that according to the provided log file there is no auto-configuration done on OrientDB side at all, but it must be done, sine disk cache is not configured. I will investigate more on this. |
Hi @EricSchreiner could you try this build https://drive.google.com/file/d/0B2oZq2xVp841eklKTmVLMW1kMTQ/view?usp=sharing |
HI @Laa see logfile.... |
Hi @EricSchreiner @robfrank as I can see Lucene exception was reproduced the same as in issue #7585 which @EricSchreiner is referenced. I will mark this issue as blocked till issue #7585 will be resolved. Actually I suppose that OOM is fixed and it allows to reproduce Lucene issue but we need to be 100% sure. |
@EricSchreiner that is very likely could you try this one https://oss.sonatype.org/content/repositories/snapshots/com/orientechnologies/orientdb-spatial/2.2.26-SNAPSHOT/orientdb-spatial-2.2.26-20170810.160653-15.jar ? |
@EricSchreiner the problem referenced in #7585 is solved from 2.2.25. I supposed you updated to latest 2.2.25. So please take the latest snapshot of spatial as well. |
@Laa now the log with orientdb-spatial-2.2.26-20170810.160653-15.jar |
So Lucene issue still persist . Will wait for fix . |
Hi @Laa, hi @robfrank, |
@EricSchreiner ok so probably it was just an issue with a mix of libraries of different versions, I am waiting for your final conclusion. |
Hi @EricSchreiner any update on this? |
Hi @Laa seems to be OK so far. I've attached two logfiles from the same database started with 32Bit and 64Bit. The only thing I see is, that sometimes it takes a very long time to shutdown the database. This seem to be new. |
@EricSchreiner cool. What do you mean by takes too long time to shut down? Does it take on both instances or on 32 bit only? |
@EricSchreiner I will close this issue because seems like it is fixed. But please open a new issue if you think something is wrong with the shutdown, may be it is a bug may be not let see. If you will be able to create profiler snapshot it will be cool if not we will provide instructions for very good and free one, but of course without handy GUI. |
@santo-it for release notes: "On 32 bit systems because the high level of memory fragmentation ODB can not allocate memory by big chunks, so it always allocates memory with page-size granularity. It will decrease performance but will avoid throwing of OOM in case of allocation of direct memory". |
@Laa thank you for your support...... |
OrientDB Version: 2.2.23
Java Version: 1.8.0_131 32Bit
OS: Windows 10
Hi @lvca ,
When I use your recomended settings with a 32 Bit (1.8.0_131) Runtime I get the out of memory immmediately (with -XX:MaxDirectMemorySize=128m it just comes later)
Here are the relevant settings:
VER @ 10:42:50.358 java.runtime.version: 1.8.0_131-b11
VER @ 10:42:50.358 java.version: 1.8.0_131
VER @ 10:42:50.358 java.vm.version: 25.131-b11
VER @ 10:42:50.358 java.vm.vendor: Oracle Corporation
VER @ 10:42:50.358 java.vm.name: Java HotSpot(TM) Client VM
VER @ 10:42:50.358 java.specification.version: 1.8
VER @ 10:42:50.358 java.vm.specification.version: 1.8
VER @ 10:42:50.359 os.name: Windows 10
VER @ 10:42:50.359 os.version: 10.0
VER @ 10:42:50.359 os.arch: x86
MSG @ 10:42:50.359 java.runtime totalMemory=16mb maxMemory=1037mb freeMemory=11mb processors=8
MSG @ 10:42:50.361 java.runtime.argument: -Xmx1024m
MSG @ 10:42:50.361 java.runtime.argument: -XX:MaxDirectMemorySize=1G
MSG @ 10:42:50.361 java.runtime.argument: -Dpicapport.home=C:\ProgramData\Contecon
MSG @ 10:42:50.361 java.runtime.argument: -DTRACE=DEBUG
Here is the error during the start database
MSG @ 10:42:52.372 PicApportDBService.createDatabaseDirectory: C:\Users\Eric.picapport\db
MSG @ 10:42:52.373 PicApportDBService.startDatabase:plocal:C:/Users/Eric/.picapport/db/db.2.2.23
EXCEP@ ============================================================
EXCEP@ Exception at: 2017-07-26 10:42:52
EXCEP@ Msg:
EXCEP@ null
EXCEP@ ------------------------------------------------------------
EXCEP@ java.lang.OutOfMemoryError
EXCEP@ at sun.misc.Unsafe.allocateMemory(Native Method)
EXCEP@ at java.nio.DirectByteBuffer.(DirectByteBuffer.java:127)
EXCEP@ at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:311)
EXCEP@ at com.orientechnologies.common.directmemory.OByteBufferPool.allocateBuffer(OByteBufferPool.java:328)
EXCEP@ at com.orientechnologies.common.directmemory.OByteBufferPool.acquireDirect(OByteBufferPool.java:279)
EXCEP@ at com.orientechnologies.orient.core.storage.cache.local.OWOWCache.load(OWOWCache.java:769)
EXCEP@ at com.orientechnologies.orient.core.storage.cache.local.twoq.O2QCache.updateCache(O2QCache.java:1107)
EXCEP@ at com.orientechnologies.orient.core.storage.cache.local.twoq.O2QCache.doLoad(O2QCache.java:346)
EXCEP@ at com.orientechnologies.orient.core.storage.cache.local.twoq.O2QCache.allocateNewPage(O2QCache.java:397)
EXCEP@ at com.orientechnologies.orient.core.storage.impl.local.paginated.atomicoperations.OAtomicOperation.commitChanges(OAtomicOperation.java:434)
EXCEP@ at com.orientechnologies.orient.core.storage.impl.local.paginated.atomicoperations.OAtomicOperationsManager.endAtomicOperation(OAtomicOperationsManager.java:468)
EXCEP@ at com.orientechnologies.orient.core.storage.impl.local.paginated.atomicoperations.OAtomicOperationsManager.endAtomicOperation(OAtomicOperationsManager.java:412)
EXCEP@ at com.orientechnologies.orient.core.storage.impl.local.paginated.base.ODurableComponent.endAtomicOperation(ODurableComponent.java:116)
EXCEP@ at com.orientechnologies.orient.core.storage.impl.local.paginated.OPaginatedCluster.create(OPaginatedCluster.java:195)
EXCEP@ at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.addClusterInternal(OAbstractPaginatedStorage.java:4136)
EXCEP@ at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.doAddCluster(OAbstractPaginatedStorage.java:4117)
EXCEP@ at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.create(OAbstractPaginatedStorage.java:459)
EXCEP@ at com.orientechnologies.orient.core.storage.impl.local.paginated.OLocalPaginatedStorage.create(OLocalPaginatedStorage.java:127)
EXCEP@ at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.create(ODatabaseDocumentTx.java:438)
EXCEP@ at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.create(ODatabaseDocumentTx.java:398)
EXCEP@ at de.contecon.picapport.db.PicApportDBService.createDBSchema(Unknown Source)
EXCEP@ at de.contecon.picapport.db.PicApportDBService.startDatabase(Unknown Source)
EXCEP@ at de.contecon.picapport.db.PicApportDBService.startDatabase(Unknown Source)
EXCEP@ at de.contecon.picapport.PicApport.startDatabase(Unknown Source)
EXCEP@ at de.contecon.picapport.PicApport.init(Unknown Source)
EXCEP@ at de.contecon.picapport.PicApport.main(Unknown Source)
EXCEP@ at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
EXCEP@ at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
EXCEP@ at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
EXCEP@ at java.lang.reflect.Method.invoke(Method.java:498)
EXCEP@ at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:389)
EXCEP@ at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:328)
EXCEP@ at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
EXCEP@ at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
EXCEP@ at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
EXCEP@ at java.lang.reflect.Method.invoke(Method.java:498)
EXCEP@ at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:767)
The text was updated successfully, but these errors were encountered: