473,748 Members | 2,594 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Memory utilization (linux v. openbsd)

Hi all,

I have an app that runs on multiple boxes. On my slackware box, running
Python 2.5.1, top shows this:

Mem: 1002736k total, 453268k used, 549468k free, 31392k buffers
Swap: 2097136k total, 0k used, 2097136k free, 136876k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2741 dnm 16 0 267m 261m 2676 S 99.3 26.7 14:54.62 python

The same app running on OpenBSD 4.1 (but on Python 2.5P3 from ports)
yields this (actually, I have 2 copies running on a dualcore box):

Memory: Real: 1130M/1989M act/tot Free: 792K Swap: 337M/2048M used/tot

PID USERNAME PRI NICE SIZE RES STATE WAIT TIME CPU
COMMAND
12380 dnm 64 0 926M 436M run/0 - 22:22 73.58%
python2.5
22956 dnm 64 0 933M 695M onproc/0 - 22:46 68.55%
python2.5

RES was has over 800M earlier in the job.

My problem is that the two process under OpenBSD are going to fail with
a MemoryError becaause the size just keeps getting larger and larger.
ulimit -d is 1G for each process.

Any idea why the memory utilization is so much higher under OpenBSD?

What I also find interesting is that the OpenBSD box seems to grind to a
halt (that's probably due to swapping since there's 500M of swap space
in use). Those processes should both be over 90% since they are CPU
bound, and they are that way at the start of the run. Gradually, the
system % creeps up as does idle, but there's no reason for them to be
idle. It's a CPU bound process. (While I'm typing this top is showing
cpu rats of 63% and 41% for the two jobs).

TIA,
nazgul
Jul 29 '07 #1
1 2852
na****@jsbsyste ms.com wrote:
My problem is that the two process under OpenBSD are going to fail with
a MemoryError becaause the size just keeps getting larger and larger.
ulimit -d is 1G for each process.
The problem is that you can't get accurate memory use readings from top.

The reality is that your python program is probably using the same
amount of memory on both platforms (in and of itself), but due to the
way the memory management OS system works, the usage is being reported
differently on BSD. Basically you're seeing the memory footprint of the
python executable, it's data (your program) and also all of the shared
libraries that python is linked to. Of course the shared libraries are
shared, so it's not like python's using all this memory just itself.
>
Any idea why the memory utilization is so much higher under OpenBSD?

What I also find interesting is that the OpenBSD box seems to grind to a
halt (that's probably due to swapping since there's 500M of swap space
in use). Those processes should both be over 90% since they are CPU
bound, and they are that way at the start of the run. Gradually, the
system % creeps up as does idle, but there's no reason for them to be
idle. It's a CPU bound process. (While I'm typing this top is showing
cpu rats of 63% and 41% for the two jobs).
I can't answer your questions or solve your problem. But I just wanted
to point out that the problem is likely somewhere besides python itself.
Maybe there are settings in the OS. Who knows. My guess is the
difference in overall memory footprint is due to differences in the C
library and its dependencies. You probably would want to bring this
issue up on the OpenBSD lists as it's clear that your BSD machine is
having problems generally (trashing to death). This doesn't appear to
be a python problem.
>
TIA,
nazgul
Jul 29 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
2043
by: Anon | last post by:
Hello all, I'm hoping for some guidance here... I am a c/c++ "expert", but a complete python virgin. I'm trying to create a program that loads in the entire FreeDB database (excluding the CDDBID itself) and uses this "database" for other subsequent processing. The problem is, I'm running out of memory on a linux RH8 box with 512MB. The FreeDB database that I'm trying to load is presently consisting of two "CSV" files. The first file...
3
1779
by: Noah | last post by:
I'm getting configure warnings and make errors when I try to build Python 2.3.4 under OpenBSD 3.5. I don't see anything in the README under "Platform specific note" for OpenBSD. I tried opening the Python tar file using gtar and I tried using gmake just to make sure there wasn't anything weird going on there (I know that using BSD tar when building Zope used to cause problems, so I first thought I might be having a similar problem. I'm...
25
2708
by: Maurice LING | last post by:
Hi, I think I've hit a system limit in python when I try to construct a list of 200,000 elements. My error is malloc: vm_allocate (size = 2400256) failed...... Just wondering is this specific to my system or what? Will adding more RAM helps in this case?
11
2803
by: jong | last post by:
I have a problem with an C# application. The application is a 24x7 low volume message processing server. The server has a single thread of processing, running in a continuous loop, for each iteration thread sleeping for 5 seconds and than reading textual message files from a Windows Folder and applying them to a database. From an external view, the server appears to have a memory-leek, continuously consuming RAM in a near linier fashion as...
2
3814
by: Steph L | last post by:
Hi, A given Milter program compiles ok on OpenBSD/FreeBSD/Linux but not on Solaris : it uses daemon(3) http://www.openbsd.org/cgi-bin/man.cgi?query=daemon&apropos=0&sektion =0&manpath=OpenBSD+Current&arch=i386&format=html http://www.freebsd.org/cgi/man.cgi?query=daemon&sektion=3&apropos=0 &manpath=FreeBSD+5.1-RELEASE
35
5506
by: Alex Martelli | last post by:
Having fixed a memory leak (not the leak of a Python reference, some other stuff I wasn't properly freeing in certain cases) in a C-coded extension I maintain, I need a way to test that the leak is indeed fixed. Being in a hurry, I originally used a q&d hack...: if sys.platform in ('linux2', 'darwin'): def _memsize(): """ this function tries to return a measurement of how much memory this process is consuming, in some arbitrary unit...
5
2307
by: nazgul | last post by:
Hi all, In my prev post, I indicated I was using 2.5.1 on one box and 2.5p3 on the OpenBSD box. I'm trying to build 2.5.1 on OpenBSD and I get this: Modules/posixmodule.c:5701: error: `lstat' undeclared (first use in this function) I browsed the source and don't understand why I'm getting it. I'm not a configure expert, but I did figure out that pyconfig.h has these set:
1
6629
by: Kaheru | last post by:
memory utilization increase? This is because when i try to keep track of the CPU utilization and memory utilization of my FTP server process (ftpserver.exe), the CPU utilization increase, but the memory utilization decrease. Why is this happening? PS: CPU Utilization is taken from Process\% Processor Time Memory Utilization is taken from Process\Working Set (I want to measure the physical memory it uses) Any help is appreciated....
7
14004
by: balach | last post by:
hi all, i am new in .NET, some body please help me regarding calculating total cpu utilization and RAM memory utilization in percentage (Accurately) on page load event of ASP.NET. i found the following code from web, but it is not running properly and also i have no idea what it will do, i heared that there will be used performance monitoring and donot know how to use it. please help me with coding instructins. public...
0
8832
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8255
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6799
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6078
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4608
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4879
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3319
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2791
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2217
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.