473,386 Members | 1,699 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Memory Usage and Page File Usage - Help!

RH
Hi,

I am building a windows application that has a feature that retrieves a set
of records when a button is clicked. When the records are being retrieved I
experience a complete system degradation, including other programs that
become unresponsive.

Here's what I found while the retrieval process is running:

Using the Windows Task Manager, I can see the the "Page File (PF) Usage"
indicator under the Performance tab increase in value from 360 MB to over
often over 1 GB when returning 3000-6000 records.

The "Mem Usage" indicator under the Processes tab increases from 40,000K to
over 300,000K.

When the operation is done, the memory usage levels remain the same and the
response time for my whole computer remains slow. Only until after the
application is closed does the memory usage levels go back down and my
computer returns to its normal response time.

Also, I'm not sure if this matters but the table that contains these records
has a column of type "text" which may contain data in the size of 100-5000
characters.

Any help on what is going on and suggestions on how to fix this would be
appreciated. Thanks!


Nov 16 '05 #1
4 6444
You did not say how you were obtaining the data.

My application can put 5000 records of about 300 bytes each from the SQL
server on another machine in a few seconds. Text will take longer per
records because of the way it's fetched but I have a few windows that
display 'ntext' from the SQL and at about 1000 records and 2k size I have
not noticed anything like you are talking about.

I don't pay a lot of attention to memory allication but any application
written in .NET seems to use more then I am use to. They say the memory is
returned but I have noticed this is not very often. My application seems to
be pretty good about not allocating more memory if I just reload the new
data and dispose of the old so when you hit your peak it should not go above
that point. The application I am working on is MDI and basically unless I
load an awful lot of records 10K+ with several windows I don't have a memory
problem on a system with 1Gig.

You can try calling gagbage disposal if it continues to be a problem.

Sample code might also help someone that knows more about this then I.

Hope this helps,
John
Nov 16 '05 #2
RH,

I assume you are using a DataSet to store all of this data. Is it
really required to have all of that information in memory, or are you
processing all of that data and then just letting it go? I can't imagine
you binding a UI element to 3000 records.

What are you trying to do that you need all 3000 records in memory at
once?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"RH" <rh******@cog.com> wrote in message
news:eb*************@tk2msftngp13.phx.gbl...
Hi,

I am building a windows application that has a feature that retrieves a set of records when a button is clicked. When the records are being retrieved I experience a complete system degradation, including other programs that
become unresponsive.

Here's what I found while the retrieval process is running:

Using the Windows Task Manager, I can see the the "Page File (PF) Usage"
indicator under the Performance tab increase in value from 360 MB to over
often over 1 GB when returning 3000-6000 records.

The "Mem Usage" indicator under the Processes tab increases from 40,000K to over 300,000K.

When the operation is done, the memory usage levels remain the same and the response time for my whole computer remains slow. Only until after the
application is closed does the memory usage levels go back down and my
computer returns to its normal response time.

Also, I'm not sure if this matters but the table that contains these records has a column of type "text" which may contain data in the size of 100-5000
characters.

Any help on what is going on and suggestions on how to fix this would be
appreciated. Thanks!


Nov 16 '05 #3
RH
These records are being stored in a collection and they are not being bound
to a UI element. These records contain a column of type "text" that contains
XML data which will be parsed later on in the process.

Just now I have modified my code to work with smaller chunks of 500 records
at a time instead of the whole lot of 3000+ records. But it made no
difference in that after being done with a chunk of 500 records, the memory
usage did not reset or clear. Instead, it grew every time a new chuck of
records were being processed.

Any suggestions? Is there a way to explicity release the data in memory once
the code is done with it?

Thanks in advance.
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:ua**************@TK2MSFTNGP09.phx.gbl...
RH,

I assume you are using a DataSet to store all of this data. Is it
really required to have all of that information in memory, or are you
processing all of that data and then just letting it go? I can't imagine
you binding a UI element to 3000 records.

What are you trying to do that you need all 3000 records in memory at
once?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"RH" <rh******@cog.com> wrote in message
news:eb*************@tk2msftngp13.phx.gbl...
Hi,

I am building a windows application that has a feature that retrieves a set
of records when a button is clicked. When the records are being retrieved I
experience a complete system degradation, including other programs that
become unresponsive.

Here's what I found while the retrieval process is running:

Using the Windows Task Manager, I can see the the "Page File (PF) Usage"
indicator under the Performance tab increase in value from 360 MB to

over often over 1 GB when returning 3000-6000 records.

The "Mem Usage" indicator under the Processes tab increases from 40,000K

to
over 300,000K.

When the operation is done, the memory usage levels remain the same and

the
response time for my whole computer remains slow. Only until after the
application is closed does the memory usage levels go back down and my
computer returns to its normal response time.

Also, I'm not sure if this matters but the table that contains these

records
has a column of type "text" which may contain data in the size of 100-5000 characters.

Any help on what is going on and suggestions on how to fix this would be
appreciated. Thanks!



Nov 16 '05 #4
See the System.GC class to clear memory.

Regards,
John
Nov 16 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Jeff Roughgarden | last post by:
We are hosting a 140 GB database on SQL Server Version 7 and Windows 2000 Advanced Server on an 8-cpu box connected to a 15K rpm RAID 5 SAN, with 4 GB of RAM (only 2 GB of which seem to be visible...
6
by: tony | last post by:
hi. how can i force a process /objects / to be always in memory and not in page files in the hd. is there a way to do that in programming ?
4
by: RH | last post by:
Hi, I am building a windows application that has a feature that retrieves a set of records when a button is clicked. When the records are being retrieved I experience a complete system...
39
by: cj | last post by:
I have a 2005 TCP/IP server that creates a new thread to handle each incoming TCP/IP request. Once the request has been answered by the thread the TCP/IP socket is disconnected and the sub/thread...
0
by: Learning.Net | last post by:
I have a window application that uses ActiveX browser component for testing web site automatically using mshtml. Though application is running fine but there is abnormally high page file usage....
1
by: santhescript01 | last post by:
I have a window application that uses ActiveX browser component for testing web site automatically using mshtml. Though application is running fine but there is abnormally high page file usage....
1
by: George2 | last post by:
Hello everyone, On Windows Server 2003, task manager there is a term called PF (Page File) and it has a related curve. Task manager also has another term called commit charge. 1. I think PF...
0
by: George2 | last post by:
Hello everyone, I am not sure whether I am wrong or the Windows Internals Book 4th version is wrong. Here is what the book says in Chapter 7, Memory Management from Page 444 to Page 445 ...
5
by: cfps.Christian | last post by:
Is there a way to tell a process to specifically use the page file for object storage? Our problem is we are loading objects that need to be stored during application runtime but not actually...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.