Start a new topic

Dynamic memory management

[This topic is migrated from our old forums. The original author name has been removed]
[Attachment has been removed.]

I've had dbVis open for a few days, ran some code, opened connections, closed connections, pinned tabs, unpinned them, etc. But dbVis seems to never release memory when objects are closed. Look at the screenshot --- dbVis takes up more than half of gig of memory. You can also see another thread of dbVis that only taks up 32k of memory, that I recently started. Please advise... Product: DbVisualizer Personal 6.1.1.4 Build: #1330 (2008/09/22 18:21) Java VM: Java HotSpot(TM) Client VM Java Version: 1.6.0_05 Java Vendor: Sun Microsystems Inc. OS Name: Windows XP OS Arch: x86 OS Version: 5.1

[This reply is migrated from our old forums. The original author name has been removed]

Re: Dynamic memory management
The reason i set -xmx to 1024m is because I was getting out of memory errors . I'll keep an eye on the Activity Monitor and will report anything unusual..
[This reply is migrated from our old forums.]

Re: Dynamic memory management
Alex, Just to make sure we are talking about the same monitor; we are interested in the Debug Window memory monitor. I assume you means so too with "Activity Monitor". Regards Roger
[This reply is migrated from our old forums. The original author name has been removed]
[Attachment has been removed.]

Re: Dynamic memory management
Roger, dbVis has allocated 1.21Gb of system's resources.., Debug window shows 260M of 989M ... Bit of inconsistency there as well.. ?:| I only have 4 tabs open, with only one tab having data in the grid. After closing the data grid tab, VM hasnt changed in the Task Manager, Debug window now shows 199M of 989M
[This reply is migrated from our old forums. The original author name has been removed]

Re: Dynamic memory management
.. What I can remember, although I do not remember the VM size before this, is that I had kicked off a bad sequel (Sybase) that would produce cartesian product (i forgot to remove group by clause) select * from table group by field so, after 10 sec i realized that and tried to Stop it by clicking on the Stop button. The button would react to the click by changing its state to disabled, but after some time would get enabled again and the query would not stop... So, i disconnected from the server and reconnected again... not sure when the bad sequel actually finished and not sure if it caused the leak .. just a thought... thanks guys!
[This reply is migrated from our old forums.]

Re: Dynamic memory management
Alex, How many tabs you have open is of less interest, more importantly is what they are holding in terms of data. Also, the memory meter in the Debug Window show the current usage including data that is about to be freed. To force freeing unused memory you need to click the green icon next to the meter. That will give more accurate figures. For the task manager observation please read the following I posted in 2009: >From a Java application perspective we have few parameters to control the overall memory usage for the Java VM process. What we can control and already do in the dbvis.vmoptions file is setting the max available heap for the Java application (DbVisualizer). Whenever this is reached an OutOfMemoryException is displayed in DbVisualizer. What figures are displayed in the monitoring tools in respective OS are of less interest for us since we cannot really comment what are shown since those include all bits and pieces required to run the Java VM process. >So for us is the heap our main concern. If the used memory reported in the Tools->Debug Window constantly increase until an OOME is displayed then there is certainly a memory leak in DbVisualizer. How the memory is reported and why it tend to increase even though you are for example re-execute the same query over and over again is due to how the garbage collector in Java is freeing the memory and how often it decides to do so. (You may force GC by clicking the green recycle arrow next to the memory meter). Regards Roger
[This reply is migrated from our old forums. The original author name has been removed]

Re: Dynamic memory management
Roger, Only one of the tabs had some data with about 100 , 200 rows... definately not something that would require 1.2Gb of vm
[This reply is migrated from our old forums.]

Re: Dynamic memory management
Hi Alex, The size of the VM process is not an indication of a problem in DbVisualizer. The process grows as needed and may not release memory to the OS as the application needs decreases (it depends on the VM implementation). The only size information of interest to find out if there is a memory leak is the size you see in the debug window. Only if it grows and never decreases after you close editors, result sets, etc (after clicking the Free Memory button next to the size bar), there is a problem in DbVisualizer. Best Regards, Hans
[This reply is migrated from our old forums. The original author name has been removed]

Re: Dynamic memory management
Roger, That is what was reported earier (Posted: Jan 22, 2009 7:55 AM ) by myself and Ed, I believe. Please check those posts.. Thanks..
[This reply is migrated from our old forums.]

Re: Dynamic memory management
Alex, Please clarify what I should check in the old forum posts. Regards Roger
[This reply is migrated from our old forums. The original author name has been removed]

Re: Dynamic memory management
Roger, In the last post Hans said: +"...The only size information of interest to find out if there is a memory leak is the size you see in the debug window. *_Only if it grows and never decreases after you close editors, result sets, etc _(after clicking the Free Memory button next to the size bar), there is a problem in DbVisualizer*."+ And I said that is what I tried reporting back on 2009 post: Jan 22, 2009 7:55 AM : +".... Even the Debug Window memory indicator does not indicate that the memory is being released when the tabs & connections are closed.."+ +" I suspect similar behaviour here.+ +Opened a connection, did a query, closed the connection. Repeated once.+ +Memory usage increased with each query and even while quiet with no connections open."+
[This reply is migrated from our old forums.]

Re: Dynamic memory management
Alex, Thanks for the clarification. When you restore to the initial state, do you then also close all open result sets in the SQL Commander? Regards Roger
[This reply is migrated from our old forums. The original author name has been removed]

Re: Dynamic memory management
Roger, Even if i close the result set window, the mem is not released
[This reply is migrated from our old forums. The original author name has been removed]

Re: Dynamic memory management
Hello, I downloaded a free trial version(for 30 days) of DBVis Personal 8.0.11 because I would like to by a full verion, but I also have problems with memory usage. After getting memory errors I have set -xmx to 1024m. That did not help. Than I've updated JAVA to new verion 7 (build 1.7.0_09-b05). And that also didn't help. Eaven trying .bat file - dbviscmd.bat didn't help. Am I wrong or It seems to me that this problem is still not fixed? My Computer: Windows XP (32bit), 2GB RAM JAVA verion 7 (build 1.7.0_09-b05) I am working in DB2 and my select result has 52.000 rows. Thanks, best regards Sing
[This reply is migrated from our old forums. The original author name has been removed]

Re: Dynamic memory management
Sorry Alex...this was ment for you Roger B.: " Hello, I downloaded a free trial version(for 30 days) of DBVis Personal 8.0.11 because I would like to by a full verion, but I also have problems with memory usage. After getting memory errors I have set -xmx to 1024m. That did not help. Than I've updated JAVA to new verion 7 (build 1.7.0_09-b05). And that also didn't help. Eaven trying .bat file - dbviscmd.bat didn't help. Am I wrong or It seems to me that this problem is still not fixed? My Computer: Windows XP (32bit), 2GB RAM JAVA verion 7 (build 1.7.0_09-b05) I am working in DB2 and my select result has 52.000 rows. Thanks, best regards Sing " Thanks, best regards
[This reply is migrated from our old forums.]

Re: Dynamic memory management
Sing, If you execute the 52K select, does the memory then peak at once resulting in a memory issue or does it occur after repetitive runs? Can you please share a use case that illustrates what happens? Regards Roger