[Tutor] same python script now running much slower

William Ray Wing wrw at mac.com
Tue Dec 31 02:27:39 CET 2013


On Dec 30, 2013, at 7:54 PM, "Protas, Meredith" <ProtasM at vision.ucsf.edu> wrote:

> Thanks for all of your comments!  I am working with human genome information which is in the form of many very short DNA sequence reads.  I am using a script that sorts through all of these sequences and picks out ones that contain a particular sequence I'm interested in.  Because my data set is so big, I have the data on an external hard drive (but that's where I had it before when it was faster too).
> 
> As for how much slower it is running, I don't know because I keep having to move my computer before it is finished.  The size of the data is the same, the script has not been modified, and the data is still in the same place.  Essentially, I'm doing exactly what I did before (as a test) but it is now slower.
> 
> How would I test your suggestion, Bill, that the script is paging itself to death?  The data has not grown and I don't think the number of processes occupying memory has changed.
> 
> By the way, I am using a Mac and I've tried two different computers.  
> 
> Thanks so much for all of your help!
> 
> Meredith
> 

Meredith,  look in your Utilities folder for an application called Activity Monitor.  Launch it and then in the little tab bar close to the bottom of the window, select System Memory.  This will get you several statistics, but the quick and dirty check is the pie chart to the right of the stats.  If the green wedge is tiny or nonexistent, then you've essentially run out of "free" physical memory and the system is almost certainly paging.

As a double check, reboot your Mac (which I assume is a laptop).  Relaunch the Activity Monitor and again, select System Memory.  Right now, immediately after a reboot, the green wedge should be quite large, possibly occupying 3/4 of the circle.  Now launch your script again and watch what happens.  If the wedge shrinks down to zero, you've found the problem and we need to figure out why and what has changed.
-------------

If memory use is NOT the problem, then we need to know more about the context.  What version of Mac OS are you running?  Are you running the system version of python or did you install your own?  Did you recently upgrade to 10.9 (the version of python Apple ships with 10.9 is different from the one that came on 10.8)?

-------------

Finally, I assume the Mac has both USB and Firewire ports.  Most Mac-compatible external drives also have both USB and Firewire.  Is there an chance that you were using Firewire to hook up the drive previously and are using USB now?

Hope this helps (or at least helps us get closer to an answer).

-Bill



More information about the Tutor mailing list