Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: python memory usage
PostPosted: Wed Jan 04, 2012 2:50 pm 
Offline
Junior Member

Joined: Fri Jul 08, 2011 7:46 pm
Posts: 44
Website: http://ericsonwilkinson.me
Location: United States
I ran top recently and filtered by memory usage

Code:
top - 10:48:04 up 150 days,  4:31,  1 user,  load average: 0.00, 0.01, 0.05
Tasks:  79 total,   1 running,  78 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:    435132k total,   334640k used,   100492k free,    39608k buffers
Swap:   262140k total,     6120k used,   256020k free,   195700k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 1172 mysql     20   0 84468  11m 6164 S    0  2.8   0:00.08 mysqld
 2355 root      20   0 58556 7600 1400 S    0  1.7   4:24.56 python
 1153 root      20   0  111m 4472 1164 S    0  1.0   0:00.17 php5-fpm
 1154 www-data  20   0  111m 3996  688 S    0  0.9   0:00.00 php5-fpm
 1155 www-data  20   0  111m 3996  688 S    0  0.9   0:00.00 php5-fpm


Why is python using so much memory? Is that normal? I don't recall seeing python near the top of the list when I've monitored memory usage before.

Should I investigate any long running python scrips that might be running?

Thanks!
Eric


Top
   
 Post subject:
PostPosted: Wed Jan 04, 2012 4:49 pm 
Offline
Senior Member
User avatar

Joined: Sat Aug 30, 2008 1:55 pm
Posts: 1739
Location: Rochester, New York
It depends on what it is doing, I suppose. That's about where I'd expect it to be for a modest Django project.

_________________
Code:
/* TODO: need to add signature to posts */


Top
   
 Post subject:
PostPosted: Wed Jan 04, 2012 4:58 pm 
Offline
Senior Member

Joined: Fri May 02, 2008 8:44 pm
Posts: 1121
Your Python script is only using 7.6MB. It's the RES column that matters.

Also, your total memory usage is just around 100MB (334640k - 39608k - 195700k), so you have a lot of room left.


Top
   
 Post subject: running length
PostPosted: Wed Jan 04, 2012 5:28 pm 
Offline
Junior Member

Joined: Fri Jul 08, 2011 7:46 pm
Posts: 44
Website: http://ericsonwilkinson.me
Location: United States
Should I be concerned with the running time?

hybinet wrote:
Your Python script is only using 7.6MB. It's the RES column that matters.

Also, your total memory usage is just around 100MB (334640k - 39608k - 195700k), so you have a lot of room left.


Top
   
 Post subject:
PostPosted: Wed Jan 04, 2012 5:59 pm 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
It depends what the process actually is, lots of things use python, what does
Code:
 ps u -p 2355
output?

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
 Post subject: ps output
PostPosted: Fri Jan 06, 2012 1:53 pm 
Offline
Junior Member

Joined: Fri Jul 08, 2011 7:46 pm
Posts: 44
Website: http://ericsonwilkinson.me
Location: United States
aha, it's the denyhosts script. ok, looks like nothing to worry about then, definitely want that one running.

Code:
#ps u -p 2355
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root      2355  0.0  1.7  58556  7608 ?        S     2011   4:27 python /usr/sbin/denyhosts --daemon --purge --config=/etc/den



Thanks for your help!
:D


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group