Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 6 of 6 total
Thread Memory Keep On Growing And Growing
Thu, Oct 19 2006 4:51 AMPermanent Link

jerry
We recently ported an application from advantage to dbisam.
We are using the C/S mode.
We noticed throughout the application, that the local workstations memory use of
application increases throughout the session.
All we are doing is opening tables and master detail.
This is happening on all workstation XP,2000.
we are just connecting on a LAN.
I tested a one form project.
Before I opened session and table the memory read 480 kb.
After opening table, memory went up to 1500 KB,
Then when i closed and freed the session and table, the memory only went down to 1300.
I am wondering why does dbisam no free the memory. I tried flushing buffers with no success.
I might be doing something wrong, because with advantage we never had memory rising like this.
Is there any way to reduce the memory use of the local workstations?
Thu, Oct 19 2006 5:36 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

jerry


DBISAM does release its memory - there'd be a lot of angry customer's if it didn't.

Can you

1) try using DBSys to open the table and see what happens when you close it.
2) post your test project to the binaries so we can have a look at what's being done.

Roy Lambert
Thu, Oct 19 2006 1:56 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Jerry,

<< Before I opened session and table the memory read 480 kb. After opening
table, memory went up to 1500 KB,
Then when i closed and freed the session and table, the memory only went
down to 1300. >>

Where are you getting the "memory" figure ?  Are you looking at virtual
memory usage, AllocMemSize variable in Delphi, etc. ?  If you're looking at
virtual memory usage, then what you're seeing is normal.  The Delphi memory
manager (and most sub-allocator memory managers like the DBISAM memory
manager, FastMM, NexusMM) grab large blocks of virtual memory and then
sub-allocate them in smaller chunks for individual memory requests in the
application.  This is much faster and more efficient than having the
application constantly hitting the virtual memory system for all
allocations.  The difference between your application with Advantage and now
with DBISAM is most likely simply down to the fact that Advantage allocated
memory in a different way, i.e. using the Windows heap allocation calls
instead of the Delphi memory manager.

--
Tim Young
Elevate Software
www.elevatesoft.com

Fri, Oct 20 2006 7:29 PMPermanent Link

Jerry
"Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote:

Jerry,

<< Before I opened session and table the memory read 480 kb. After opening
table, memory went up to 1500 KB,
Then when i closed and freed the session and table, the memory only went
down to 1300. >>

Where are you getting the "memory" figure ?  Are you looking at virtual
memory usage, AllocMemSize variable in Delphi, etc. ?  If you're looking at
virtual memory usage, then what you're seeing is normal.  The Delphi memory
manager (and most sub-allocator memory managers like the DBISAM memory
manager, FastMM, NexusMM) grab large blocks of virtual memory and then
sub-allocate them in smaller chunks for individual memory requests in the
application.  This is much faster and more efficient than having the
application constantly hitting the virtual memory system for all
allocations.  The difference between your application with Advantage and now
with DBISAM is most likely simply down to the fact that Advantage allocated
memory in a different way, i.e. using the Windows heap allocation calls
instead of the Delphi memory manager.

--
Tim Young
Elevate Software
www.elevatesoft.com

I was debugging certain parts of our program and noticed the memory increases after opening
a table with a blob image inside.

the table with the blob field is a detail of the master table so when i scroll between the
master table
the memory increases by 30 MB. I suggest my whole memory issue is with the databinding of
blob fields. I am not even editing the table or anything just scrolling.
the db control is a dbimage.

Is there any special thing I have to do to view and manipulate blobs in dbisam without
effecting memory.
like i said before I did not change anything just ported over from advantage. No code
changes except
for queries.

Mon, Oct 23 2006 1:53 PMPermanent Link

Jerry
Jerry <jerry@mygymsoftware.com> wrote:

"Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote:

Jerry,

<< Before I opened session and table the memory read 480 kb. After opening
table, memory went up to 1500 KB,
Then when i closed and freed the session and table, the memory only went
down to 1300. >>

Where are you getting the "memory" figure ?  Are you looking at virtual
memory usage, AllocMemSize variable in Delphi, etc. ?  If you're looking at
virtual memory usage, then what you're seeing is normal.  The Delphi memory
manager (and most sub-allocator memory managers like the DBISAM memory
manager, FastMM, NexusMM) grab large blocks of virtual memory and then
sub-allocate them in smaller chunks for individual memory requests in the
application.  This is much faster and more efficient than having the
application constantly hitting the virtual memory system for all
allocations.  The difference between your application with Advantage and now
with DBISAM is most likely simply down to the fact that Advantage allocated
memory in a different way, i.e. using the Windows heap allocation calls
instead of the Delphi memory manager.

--
Tim Young
Elevate Software
www.elevatesoft.com

I was debugging certain parts of our program and noticed the memory increases after opening
a table with a blob image inside.

the table with the blob field is a detail of the master table so when i scroll between the
master table
the memory increases by 30 MB. I suggest my whole memory issue is with the databinding of
blob fields. I am not even editing the table or anything just scrolling.
the db control is a dbimage.

Is there any special thing I have to do to view and manipulate blobs in dbisam without
effecting memory.
like i said before I did not change anything just ported over from advantage. No code
changes except
for queries.


Has anyone had this problem or know what might be causing?
Mon, Oct 23 2006 5:24 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Jerry,

<< I was debugging certain parts of our program and noticed the memory
increases after opening a table with a blob image inside. >>

I understand.  However, you still haven't told me *where* you're looking at
the memory figures ?  Are you looking at them in the task manager ?  If so,
what column in the task manager ?

<< the table with the blob field is a detail of the master table so when i
scroll between the master table the memory increases by 30 MB. I suggest my
whole memory issue is with the databinding of blob fields. I am not even
editing the table or anything just scrolling. the db control is a dbimage.
>>

How big is the actual image ?  When loading BLOBs for display, DBISAM will
load them into memory for the time it takes for the DBImage to display it,
and then the memory is freed.

<< Is there any special thing I have to do to view and manipulate blobs in
dbisam without effecting memory. >>

Impossible to do.  Displaying a BLOB image will affect memory, period.

<< like i said before I did not change anything just ported over from
advantage. No code changes except for queries. >>

The two products handle memory management completely differently, so you
can't compare one with the other necessarily in terms of memory consumption.
Advantage uses DLLs that are, I believe, coded in C, not Delphi like DBISAM.
Therefore, the two are using completely different memory managers with
different sub-allocation schemes, etc.  Finally, I being very vague and
general here because I still don't know what kind of memory consumption
we're talking about (see above)

--
Tim Young
Elevate Software
www.elevatesoft.com

Image