LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-11-2008, 02:39 PM   #1
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Rep: Reputation: 48
Unhappy gnuplot: line 0: out of memory for expanding curve points


Hi,

I am trying to plot the data using gnuplot and my data file is quite huge - around 1 GB of size and has the data in following format:
Code:
       0       36
       1       33
       2       37
       3       37
       4       37
       5       34
       6       36
       7       33
       8       36
       9       39
      10       38
      11       36
........
........
........
      42868271       35
      42868272       36
      42868273       37
      42868274       36
      42868275       36
      42868276       36
      42868277       36
      42868278       36
      42868279       36
And here is my script snippet:

Code:
#Plot Graphs
gnuplot << EOF
set terminal pbm color
set output "$PLOT"
set title  "Latency"
set xlabel "Number of Data Points"
set ylabel "Latency in usecs"
plot [0:10000000] [0:1000] "scatter.dat" with points
EOF
And here is my system specs:
Code:
Debian Lenny 2.6.26 kernel
Intel(R) Pentium(R) M processor 1.80GHz
2 GB RAM
GNOME Running
Now when I try to plot the graph I get the following error:
Code:
line 0: out of memory for expanding curve points
Now I am not sure what memory it is referring to? I am keeping a watch on my system memory using htop and at the most the memory goes to 1120/2010MB when the gnuplot is running.

Any ideas what is going on?

Last edited by kushalkoolwal; 09-11-2008 at 05:22 PM.
 
Old 09-11-2008, 03:26 PM   #2
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190
Quote:
Originally Posted by kushalkoolwal View Post
Code:
Debian Lenny 2.6.26 kernel
Intel(R) Pentium(R) M processor 1.80GHz
I expect that means you have a 32-bit kernel. But I'm far from sure of that. The output of uname -a would tell us more.

Quote:
Now I am not sure what memory it is referring to?
I don't know whether it is hitting the limit on system memory or the limit on process memory.

If it is the limit on process memory, then there is probably nothing you can do short of switching to a 64-bit version of the program, which would require a 64-bit Linux kernel, which would require 64-bit hardware. I don't know if you have any of that.

Quote:
I am keeping a watch on my system memory using htop and at the most the memory goes to 1120/2010MB when the gnuplot is running.
There are so many ways that could be misleading, there is no point even trying to guess which one applies.

If you add a lot (several GB) of swap space and the problem was system memory, then the program should slow way down and if you wait long enough, maybe work. If the problem was process memory, adding swap space won't change anything.

The program may not consume memory smoothly, so it might be far below whatever the limit might be just moments before it fails due to lack of memory.
 
Old 09-11-2008, 05:20 PM   #3
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 48
Quote:
Originally Posted by johnsfine View Post
The output of uname -a would tell us more.
Here is the output of "uname -a"

Code:
Linux debian 2.6.26-1-686 #1 SMP Mon Aug 25 16:18:50 PDT 2008 i686 GNU/Linux
Yes I am using 32-bit Kernel.
 
Old 09-11-2008, 05:55 PM   #4
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 48
Further update:

I tried splitting the file into half first i.e. 1/2 the number of records but no success.


Then I tried splitting the file into 1/4 of the records and I was able to plot the graph.


Not sure if the above information helps in diagnosing the issue?

Thanks
 
Old 09-12-2008, 08:17 AM   #5
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190
Quote:
Originally Posted by kushalkoolwal View Post
Not sure if the above information helps in diagnosing the issue?
I don't think it helps much for anyone reading this thread to diagnose the issue.

It does confirm that you are hitting a memory limit as a result of the large size of the input to the program. But we were assuming that anyway.

The above results do indicate a path for YOU to learn more about the problem:

You should be able to get a rough idea how much virtual and resident memory the process uses for the 1/4 size that works and hopefully for one other large size that works as well (maybe 1/8, maybe 1/3). From those numbers you might make a decent estimate of how much memory it would need for the whole task.

I don't know the duration nor memory use pattern of your program when it works, so I don't know if top is a good enough tool to catch the above memory use info.

Also, you never responded to my earlier suggestion about swap space. How much free swap space does your system have before running that program? What happens if you increase swap space a lot before running it?
 
Old 09-12-2008, 12:32 PM   #6
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 48
Quote:
Originally Posted by johnsfine View Post
You should be able to get a rough idea how much virtual and resident memory the process uses for the 1/4 size that works and hopefully for one other large size that works as well (maybe 1/8, maybe 1/3). From those numbers you might make a decent estimate of how much memory it would need for the whole task.
How do I determine that?

Quote:
Also, you never responded to my earlier suggestion about swap space. How much free swap space does your system have before running that program? What happens if you increase swap space a lot before running it?
[/QUOTE]
I have around 850MB of swap space. The thing is that none of the swap space is used when I try to plot the graph.


Thanks for looking into this.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
gnuplot - plot horizontal line over shorter range than the axis Meson Linux - Software 5 10-18-2008 09:41 AM
LXer: Dell's Linux desktop line keeps expanding LXer Syndicated Linux News 0 07-08-2007 09:31 PM
gnuplot, pull X data from file, specify Y data at cmd line? hedpe Programming 5 03-16-2007 12:32 AM
vi style command line editing in gnuplot 3.7 sirclif Linux - Software 0 09-20-2004 01:47 PM
gnuplot vertical line tucolino Linux - Software 2 10-08-2003 05:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration