473,405 Members | 2,176 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,405 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 20 '05 #1
4 2979
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 20 '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 20 '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 20 '05 #4
See the System.GC class to clear memory.

Regards,
John
Nov 20 '05 #5

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

Similar topics

3
by: Ian | last post by:
Hi all, I have a problem. I have an application which needs to work with a lot of data, but not all at the same time. It is arranged as a set of objects, each with lots of data that is created...
7
by: Felix E. Klee | last post by:
Hi, why does the memory consumption of the program attached below increase steadily during execution? Shouldn't vector::reserve() allocate one large memory chunk of memory that doesn't change...
3
by: Ian Taite | last post by:
Hello, I'm exploring why one of my C# .NET apps has "high" memory usage, and whether I can reduce the memory usage. I have an app that wakes up and processes text files into a database...
6
by: Ganesan selvaraj | last post by:
I using C# .net. i want to split the text files based of the some condition. my source text file size may be 4 kb to 4 gb. some time when i split the i got the "out of memory exception. when i...
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...
7
by: Clement | last post by:
hi, i have an asp.net site and is using SQL Server 2k. i realize the aspnet_wp.exe memory usage keep growing and i will receive an error for the pages that call the sql connection. others page...
7
by: Rich Denis | last post by:
Hello, I have been trying to solve a mysterious memory leak problem and was hoping that you could help me out on my stuck point. First a bit of background. We have two app servers in an app...
16
by: JCauble | last post by:
We have a large Asp.net application that is currently crashing our production servers. What we are seeing is the aspnet_wp eat up a bunch of memory and then stop unexpectedly. Does not recycle. ...
7
by: matvdl | last post by:
I have migrated my asp application to asp.net some time ago - but I am still having some difficulties in understanding the best way to mange some tasks. I currently have a page that loads a aspx...
17
by: Cesar | last post by:
Hello people. I'm having a Winform app that contains a webbrowser control that keeps navigating from one page to another permanentrly to make some tests. The problem I'm having is that after a...
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: 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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.