 |
 |
Memory Leak? (dFold)
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Aug 2001
Status:
Offline
|
|
Greetings,
I ran into a problem yesterday. Found out my G4 crawled to a halt and pretty much stopped crunching sometime yesterday at around 227K folds. When terminal finally opened I ran TOP and learned that the dfold engine was using over 350MB of ram. With only 448MB installed, virtual ram was being really nasty to me. Naturally after nicely exiting the program my system came back to life. Love UNIX!
I have noticed already this morning that the client has grown to over 96MB in size. Anyone else seen this happen on their Macs?
Cheers!
RIP
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Apr 2002
Location: Bellevue, Wa
Status:
Offline
|
|
Originally posted by rkadowns:
<STRONG>Greetings,
I ran into a problem yesterday. Found out my G4 crawled to a halt and pretty much stopped crunching sometime yesterday at around 227K folds. When terminal finally opened I ran TOP and learned that the dfold engine was using over 350MB of ram. With only 448MB installed, virtual ram was being really nasty to me. Naturally after nicely exiting the program my system came back to life. Love UNIX!
I have noticed already this morning that the client has grown to over 96MB in size. Anyone else seen this happen on their Macs?
Cheers!
RIP</STRONG>
Hello,
I too have noticed the same problem and can only exit and restart to clear it out .

|
|
Team MacNN
DFold
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Jan 2002
Location: Mile High City
Status:
Offline
|
|
I don't know how to run Top, but checked the process viewer and sure enough, my iBook was up to 53.5% of memory after 1 days, and my Power Mac was up to almost 55% after 1.5 days. quit and restarted and it dropped back down to a nice respectable 8% on the iBook with 256 mb RAM and 4% on the PowerMac with 512k Ram.
"Houston, we have a problem."
That would explain why e-mail and web browsing was getting sluggish. Looks like it is going to need daily restarts. I will check my Windows machines to see if they exhibit a similar problem. Will someone with more knowledge then me about these things please report it on the Distributed Folding bugs forum.
http://bane.free-dc.org/forum/forumd...amp;forumid=31
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Aug 2001
Status:
Offline
|
|
In the meantime, is anyone with the knowledge willing to create a script that would exit cleanly and restart the client every 24 hours or so?
I'll attemt to modify the Ubero script to do this one day when I find the time.
|
|
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Apr 2002
Location: In front of monitor above keyboard.
Status:
Offline
|
|
Originally posted by rkadowns:
<STRONG>Greetings,
I ran into a problem yesterday. Found out my G4 crawled to a halt and pretty much stopped crunching sometime yesterday at around 227K folds. When terminal finally opened I ran TOP and learned that the dfold engine was using over 350MB of ram. With only 448MB installed, virtual ram was being really nasty to me. Naturally after nicely exiting the program my system came back to life. Love UNIX!
I have noticed already this morning that the client has grown to over 96MB in size. Anyone else seen this happen on their Macs?
Cheers!
RIP</STRONG>
Just checked mine and the two processes were using up 1 GB of memory.
You might want to let Howard (Brian the fist) know that there is an issue.
He has been very responsive to the Dfold community.
Thanks for letting us all know that there was a problem.
|
|
Tag ur it.
|
| |
|
|
|
 |
|
 |
|
Forum Regular
Join Date: Oct 2001
Location: Tbilisi, Georgia
Status:
Offline
|
|
Thanks for pointing this out. I had been running mine for 60 hours straight, and it was eating up a lot.....
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Dec 2001
Location: Atlanta, GA, USA
Status:
Offline
|
|
Originally posted by rkadowns:
<STRONG>In the meantime, is anyone with the knowledge willing to create a script that would exit cleanly and restart the client every 24 hours or so?</STRONG>
That's probably overkill for something like this. You could write a script that watches memory usage and when the dfold process goes over some threshold, you restart it. However, I think a simple cron job that stops and restarts it every 24 hours would be just as effective and a lot less complex.
|
|
Mac Pro 2x 2.66 GHz Dual core, Apple TV 160GB, two Windows XP PCs
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Dec 2001
Location: Atlanta, GA, USA
Status:
Offline
|
|
Originally posted by Shaktai:
<STRONG>I don't know how to run Top, but checked the process viewer and sure enough, my iBook was up to 53.5% of memory after 1 days, and my Power Mac was up to almost 55% after 1.5 days. quit and restarted and it dropped back down to a nice respectable 8% on the iBook with 256 mb RAM and 4% on the PowerMac with 512k Ram.
</STRONG>
Top is essentially the same thing as the process viewer (well, actually the reverse is more accurate), but it is run in the terminal. Open a terminal window, type "top", and hit return.
If you're a UNIX person, you keep Terminal.app in your dock, so it's a lot more convenient than the process viewer.
|
|
Mac Pro 2x 2.66 GHz Dual core, Apple TV 160GB, two Windows XP PCs
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Jan 2002
Location: Mile High City
Status:
Offline
|
|
Originally posted by Arkham_c:
<STRONG>
Top is essentially the same thing as the process viewer (well, actually the reverse is more accurate), but it is run in the terminal. Open a terminal window, type "top", and hit return.
If you're a UNIX person, you keep Terminal.app in your dock, so it's a lot more convenient than the process viewer.</STRONG>
Cool, and much quicker to get to. Tried it out and it works fast Thanks, I am learning more every day.
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Aug 2001
Status:
Offline
|
|
Originally posted by Shaktai:
<STRONG>
Cool, and much quicker to get to. Tried it out and it works fast Thanks, I am learning more every day.</STRONG>
TOP is pretty CPU intensive for what its purpose is. It uses about 8% of your cpu just sitting there so I wouldn't recommend having it running all the time.
Also, if you cd to the directory you have dfold in and type " ./foldit & " you will be able to have dfold running and terminal.app closed. If you are concerned that dfold may have died, you can watch the progress txt file or run top temporarily to check cpu utilization.
|
|
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Sep 2001
Location: California
Status:
Offline
|
|
Thanks for the heads up. I'm going to check my computer when I get home from work tonight. I haven't noticed anything weird but then again I've been fiddling with the client and so have been turning it off and on.
-e
|
|
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Feb 2002
Location: Silly Valley, Ca
Status:
Offline
|
|
Try this
put in a file:
@reboot cd /Applications/distribfold/; ./foldit &
0 2 * * * rm /Applications/distribfold/foldtrajlite.lock
10 2 * * * cd /Applications/distribfold/; ./foldit &
Then as root (sudo -s) do
crontab NameOfFile
This will set foldit to run at reboot, kill the client gracefully at 2 am (removing the .lock file is like hitting Q and waiting for it to send the results), and then at 2:10am relaunch foldit in the background.
I am assuming 10 minutes is enough time for the agent to send its units and quit. You should experiement and see if it takes longer.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Jan 2002
Location: Mile High City
Status:
Offline
|
|
Originally posted by rkadowns:
<STRONG>
TOP is pretty CPU intensive for what its purpose is. It uses about 8% of your cpu just sitting there so I wouldn't recommend having it running all the time.
Also, if you cd to the directory you have dfold in and type " ./foldit & " you will be able to have dfold running and terminal.app closed. If you are concerned that dfold may have died, you can watch the progress txt file or run top temporarily to check cpu utilization.</STRONG>
You make it all sound so easy. Actually it is, but you explain it in plain english terms that this old brain can understand. Thanks. I am going to try that, and I know how to check the progress file. Now that I know how to run top, I fell like I have made some progress.
One question, after starting up with ./foldit &, how do you quit the client? -- Edit: Never mind, I think I see the answer in Mikkyo's script.
[ 04-12-2002: Message edited by: Shaktai ]
|
|
|
| |
|
|
|
 |
|
 |
|
Junior Member
Join Date: Apr 2001
Location: London, UK
Status:
Offline
|
|
Originally posted by rkadowns:
<STRONG>
I have noticed already this morning that the client has grown to over 96MB in size. Anyone else seen this happen on their Macs?
RIP
</STRONG>
I can see the memory taken by the client growing in size. However, could it be that this is merely the work that the client has done being cached in memory? Hence the memory usage should be increasing as you do more work.
I have yet to see how the memory behaves when the client uploads the work to the project servers. I would expect the memory used to drop. If the memory does not drop when work is uploaded then there is indeed a leak.
I tend to stop and restart the client periodically. I have noticed that the client doesn't always upload all the work. There could well be some sort of timeout on the upload process. As I'm on a dialup this seems to happen often. The more work I've done the more likely it doesn't all get uploaded. It is possible that in the cases where it's hogging loads of memory there is lots of work not yet uploaded. Next time you see it using a lot checkout the progress.txt file and see if there is a lot of work waiting to be uploaded.
|
|
|
| |
|
|
|
 |
|
 |
|
Moderator Emeritus 
Join Date: Dec 2000
Location: College Park, MD
Status:
Offline
|
|
Originally posted by wheeles:
<STRONG>
I can see the memory taken by the client growing in size. However, could it be that this is merely the work that the client has done being cached in memory? Hence the memory usage should be increasing as you do more work.
I have yet to see how the memory behaves when the client uploads the work to the project servers. I would expect the memory used to drop. If the memory does not drop when work is uploaded then there is indeed a leak.
I tend to stop and restart the client periodically. I have noticed that the client doesn't always upload all the work. There could well be some sort of timeout on the upload process. As I'm on a dialup this seems to happen often. The more work I've done the more likely it doesn't all get uploaded. It is possible that in the cases where it's hogging loads of memory there is lots of work not yet uploaded. Next time you see it using a lot checkout the progress.txt file and see if there is a lot of work waiting to be uploaded.</STRONG>
It stores work on the hard drive.
|
|
|
| |
|
|
|
 |
|
 |
|
Junior Member
Join Date: Apr 2001
Location: London, UK
Status:
Offline
|
|
Originally posted by Scotttheking:
<STRONG>
It stores work on the hard drive.</STRONG>
True. There does seem to be a delay between the client doing work and writing it to a bzip file on the disk. That would explain why work is lost if the process isn't properly halted. When I first looked at this client it seemed like every 10k before it wrote to the disk. With a change of protein it looks like every 5k now. I'll have to confirm that, however.
|
|
|
| |
|
|
|
 |
|
 |
|
Grizzled Veteran
Join Date: Sep 2000
Location: Florida
Status:
Offline
|
|
I'll have to keep close tabs on mt G4 if I want to win the competitiion. BTW I use this command to keep it running in the background with the teminal app closed.
<BLOCKQUOTE><font size="1"face="Geneva, Verdana, Arial">code:</font><HR><pre><font size=1 face=courier>./foldtrajlite -f protein -n native -qt & </font>[/code]
basically it starts the client just like the foldit script does, and then the & is to have it run in the background, otherwise the script runs in the background, and that doesn't always work.
|
|
-- SBS --
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Aug 2001
Status:
Offline
|
|
The client uploads every 5K folds processed. The progress file indicated 277K processed when I noticed the slowdown and memory loss. I believe the ship is taking in water.
RIP
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Aug 2001
Status:
Offline
|
|
Originally posted by rkadowns:
<STRONG>The client uploads every 5K folds processed. The progress file indicated 277K processed when I noticed the slowdown and memory loss. I believe the ship is taking in water.
RIP</STRONG>
I forgot to mention that the client was sitting idle when the problem was discovered.
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: May 2001
Location: Switzerland
Status:
Offline
|
|
Cheers for the heads up about the issue...
I just left my G4 (2 instances of the the client) and my iMac folding for 2 days while I went away...
Just came back and found that everything had ground to a halt at around the 75,000 fold mark....I couldn't quit foldit or the terminal except by force quitting! However, upon restart it uploaded data to the server so I'm guessing that I did'nt lose too much work. The only problem is, I don't know when the terminal 'crashed' and how much crunching time has been wasted...
Guess I'll have to keep a closer eye on the machhines from now on...
Marc
|
|
|
| |
|
|
|
 |
|
 |
|
Grizzled Veteran
Join Date: Sep 2000
Location: Florida
Status:
Offline
|
|
since '"top" is pretty CPU intensive, use this instead "top -d" it displays slightly less info, but uses <1% of the CPU!
|
|
-- SBS --
|
| |
|
|
|
 |
|
 |
|
Forum Regular
Join Date: Oct 2001
Location: Tbilisi, Georgia
Status:
Offline
|
|
Just to let our programming-savvy comrades know: Howard Feldman posted a reply over in the DF forum. He has the memory leak too, but needs some memory leak detection software to properly locate it. I have no idea what he is talking about, since I know zero programming. But perhaps somebody else could help him out?
Cheers,
Howard's reply is here
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Apr 2002
Location: Bellevue, Wa
Status:
Offline
|
|
I had just given a comand for leaks
/usr/bin/leaks over in the d fold forum
i think might help
there is a man page for it too. 
|
|
Team MacNN
DFold
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Aug 2001
Status:
Offline
|
|
Below is a reply from Brian the Fist when I notified him of the leak.
"Yes, I saw the thread. It appears this is isolated to Mac OS X though as it definitely does not occur on Windows or Linux. Since the code is essentially identical, this means the leak is likely in a system library or possibly curses so there's not much I could do about it. I don't really have any serious debugging experience on OS X so I don't know what sort of free memory-leak detection software is available for it but if someone can suggest such a package Ill run it on our Mac and then at least see what is leaking.
But like I said, likely not in my code.Below is a reply from Brian the Fist when I notified him of the leak. If anyone is willing to assist with his request it would be greatly appreciated."
My last experience with programming was on the Commodore 64. Any help on the technical side of things would be great.
RIP
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Aug 2001
Status:
Offline
|
|
I have not been able to deturmine totaly yet, but it seems this new protien does not leak, or leak as bad as the old. 
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Jan 2002
Location: Mile High City
Status:
Offline
|
|
Originally posted by rkadowns:
<STRONG>I have not been able to deturmine totaly yet, but it seems this new protien does not leak, or leak as bad as the old.  </STRONG>
Doesn't leak as bad I think is the most correct.
Looks like it will only need a restart every 3 to 7 days, depending on how much memory you have. My Power Mac with 512 mb RAM is increasing about 4-5% per day. My iBook with only 256 mb RAM is increasing at about 8-9% per day.
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Apr 2002
Location: Bellevue, Wa
Status:
Offline
|
|
Originally posted by Shaktai:
<STRONG>
Doesn't leak as bad I think is the most correct.
Looks like it will only need a restart every 3 to 7 days, depending on how much memory you have. My Power Mac with 512 mb RAM is increasing about 4-5% per day. My iBook with only 256 mb RAM is increasing at about 8-9% per day.</STRONG>
On mine a PowerMac 384MB ram it doesn't use as much as previous client and it clears itself out, seems much better.
|
|
Team MacNN
DFold
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|