a Python programming environment providing object and heap memory sizing, profiling and analysis.
Questions tagged [guppy]
24 questions
9
votes
3 answers
The memory usage reported by guppy differ from ps command
I am profiling my twisted server. It uses much more memory than I expected. Its memory usage grows over time.
ps -o pid,rss,vsz,sz,size,command
PID RSS VSZ SZ SZ COMMAND
7697 70856 102176 25544 88320 twistd -y broadcast.tac
As you…

Fang-Pen Lin
- 13,420
- 15
- 66
- 96
7
votes
4 answers
Not able to plot graph: matplotlib is needed for plotting
I am able to generate *.dat file:
vikas@server:~/memory_profiler-0.36$ ./mprof run --python test_sl.py
vikas@server:~/memory_profiler-0.36$ ls *.dat
mprofile_20151001035123.dat
But when I am trying to plot graph then it is saying "matplotlib is…

vikas
- 901
- 3
- 10
- 13
6
votes
1 answer
Simple way to get current memory usage from Guppy
tl/dr: how do I get the current memory usage of my python program using Guppy? Is there a simple command?
I'm trying to track memory usage in a python program using guppy. This is my first usage of guppy, so I'm not very sure of how it behaves. …

Joel
- 22,598
- 6
- 69
- 93
5
votes
1 answer
Guppy/Heapy on Windows with Python 2.7.6
I just intalled guppy 0.1.10. Then typing in Ipython 2.1.0
from guppy import hpy
hp = hpy()
makes the console crash, i.e. windows tells me, that python.exe just crashed. Is there any workaround? Or a heapy alternative?

HeinzKurt
- 612
- 9
- 18
4
votes
2 answers
How can I print all rows using python's guppy
I am using python's guppy in order to see heap usage in a python program. I do:
h = hpy
hp = h.heap()
print hp
and this is the produced output:
Partition of a set of 339777 objects. Total size = 51680288 bytes.
Index Count % Size %…

Nwlis
- 63
- 6
3
votes
0 answers
Cannot install Guppy into my project
I'm currently facing a weird issue that I cannot successfully install guppy package into my project using the command:
pip install guppy
The console ends up with:
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic…

Tin Nguyen
- 399
- 1
- 6
- 16
3
votes
1 answer
Memory leak with Django + Django Rest Framework + mod_wsgi
I have the following code where I have a function based view which uses a ModelSerializer to serialize data. I am running this with apache + mod_wsgi (with 1 worker thread, 1 child threads and 1 mod_wsgi threads for the sake of simplicity).
With…

Divick
- 1,213
- 1
- 20
- 44
3
votes
1 answer
Size of objects in memory during an IPython session (with Guppy?)
I recall reading that it is hard to pin down the exact memory usage of objects in Python. However, that thread is from 2009, and since then I have read about various memory profilers in Python (see the examples in this thread). Also, IPython has…

Amelio Vazquez-Reina
- 91,494
- 132
- 359
- 564
2
votes
1 answer
not able to plot graph
I am able to generate *.dat file. Post that when I attempt to plot the graph using mprof, it's throwing exception:
vikas@server:~/memory_profiler-0.36$ ./mprof plot --output=plot.png
Using last profile data.
Traceback (most recent call last):
File…

vikas
- 901
- 3
- 10
- 13
2
votes
1 answer
Memory leak when using matplotlib.collection.LineCollection
I am using the following code to create a collection of color coded line plots:
for j in idlist[i]:
single_traj(lonarray, latarray, parray)
plt.savefig(savename, dpi = 400)
plt.close('all')
plt.clf()
where:
def single_traj(lonarray, latarray,…

meteosteph
- 143
- 1
- 2
- 9
1
vote
1 answer
Guppy install in Python 3.11 fails because of missing longintrepr.h file
Operating System: Windows
I try:
pip install guppy3
It runs successfully at first but fatally fails towards the end.
The error message is:
Collecting guppy3
Using cached guppy3-3.1.2.tar.gz (335 kB)
Preparing metadata (setup.py) ...…

Leee Jeff
- 27
- 4
1
vote
1 answer
Memory Profiling, How to find variable name associated with object
I have a python application that is over time consuming GB's of data..
To track down the memory usage I installed guppy and printed the heap after a time unit, I see the following in the report.
Partition of a set of 43325494 objects. Total size =…

vijayvithal
- 551
- 1
- 5
- 13
1
vote
0 answers
memory leak using scapy sessions
Currently experiencing high memory usage by scapy 2.4.0 on python 2.7 running on centos 7.4
originally I thought it was due to https://bitbucket.org/secdev/scapy/issues/5149/rdpcap-and-wrpcap-file-descriptor-leak but this was was fixed some time…

bain2236
- 111
- 1
- 9
1
vote
0 answers
How Can I Fix "expected declaration specifiers before ‘initsetsc’" When Installing Guppy (Python 3)?
EDIT: https://stackoverflow.com/a/38860927/1112524 Sorry
When I try to install guppy/heapy for memory profiling,
pip3 install guppy --user
I get
creating build/temp.linux-x86_64-3.4
creating build/temp.linux-x86_64-3.4/src
creating…

jacob501
- 345
- 2
- 5
- 17
1
vote
1 answer
How to interpret Pythone memory usage with guppy?
I am using code for spectral estimation of geophysical time series.
import matplotlib.pyplot as plt
plt.style.use("ggplot")
import numpy as np
from mtspec import mtspec
from mtspec.util import _load_mtdata
from guppy import hpy
h = hpy()
print…

Richard Rublev
- 7,718
- 16
- 77
- 121