ralphtrent
Programmer
Hi
I am writing a windows service. To do what I have coded it consumes about 30 megs of memory, which seems like a lot for what I am doing. The stange thing is, as soon as I start the service and before i invoke any code, the service takes up almost 8 megs of memory right off the bat.
Does anyone else have issues with Windows Service in 2.0 as far as memory goes? Does anyone have any idea of any tools I can use to track my memory consumption? I have put in code to write an event log message to show how much memory was currently in use but I need a way to minimize the memory.
Here is the general jist of what i am doing.
the reason i read the db mutliple times for the same info is because I thought i would be wasting memory hold and passing a datarow to multiple functions as opposed to just an int holding the record id.
I hope this makes sense, i would post code, but there is to much and its pretty wide spread.
Any help is apprectiated.
Thanks,
RalphTrent
I am writing a windows service. To do what I have coded it consumes about 30 megs of memory, which seems like a lot for what I am doing. The stange thing is, as soon as I start the service and before i invoke any code, the service takes up almost 8 megs of memory right off the bat.
Does anyone else have issues with Windows Service in 2.0 as far as memory goes? Does anyone have any idea of any tools I can use to track my memory consumption? I have put in code to write an event log message to show how much memory was currently in use but I need a way to minimize the memory.
Here is the general jist of what i am doing.
Code:
Read a DB to see how many rows I need to process
foreach row start a new thread.
each thread reads the db again to get information about the work (row) it has to do
I use the row to read a column that holds an interval for my timer. Everytime the interval is hit I read the db again for the same info I already had to see what work is involved
I use that info to read another database to process another request when I get done with that, I send an HTML based email to user and go to sleep again.
while this is going on, in my main thread I query the db once every 30 mintues to see if any new work is out there for me to do
I hope this makes sense, i would post code, but there is to much and its pretty wide spread.
Any help is apprectiated.
Thanks,
RalphTrent