03-04-2006
Memory-waste in Ubuntu/Debian?
I have 512 mem on this laptop, though 'top' tells me I only have 380. However, Ubuntu is using 288 mb of memory, when I only have 3 terminals, running lynx, vim(for this file) and (of course) top. Considering it I have lynx running a 600 page txt file, which of course would eat some memory but 300? And even worse when i start X. Let's try it. First I reboot since she's been up a couple of hours.
Before X is launched:
Mem: 385812k total, 178516k used, 207296k free, 8700k buffered
Staring at the buffered memory for one minute it's now increased to 8852.
Used mem has also increased to 178888. 300 k on two lines.
(That's probably the two most expensive ascii-lines I've ever seen.)
After X is launched: (mem already at: used: 179260 and buff: 9388)
Mem: 385812k total, 264612k used, 121200k free, 13604k buffered
That's about 80 meg. Starting timer.
13:12:30 (with the above memory)
13:17:30 (five minutes later)
Mem: 385812k total, 265356k used, 120456k free, 14144k buffered
That's another 5 meg memory used. For just staring at the 'top' program.
In two hours I'll run out of memory! What's happening behind the scenes?
Before i rebooted I checked my free memory after starting X.
It went down to 35 meg. It'd been up for 3-3.5 hours running a 600+ page txt file in lynx.
Regards
Richard
(Mem is now (13:27:00) used: 266852 free: 118960 buff: 15220
A lot less in ten minutes than in five... Hmmm...)
5 More Discussions You Might Find Interesting
1. Ubuntu
Hi,
I am using Debian (ubuntu). whenever I ftp file from Windows to Debian, the file is being shown as DOS while editing in vi. The control characters are not visible and I couldn't remove the '^M' character. So please help me how to make it Linux specific file to use it for Linux specific tasks. (4 Replies)
Discussion started by: royalibrahim
4 Replies
2. SuSE
ok, im going to start off by saying i am a newbee so some of the stuff i say may not be right.
but anyways, right now i am using ubuntu hardy for my main distrobution. i love it and all, but the main reason i switched to linux (besides drm and the blue screen i see on my comp about ten times a... (13 Replies)
Discussion started by: Texasone
13 Replies
3. UNIX for Advanced & Expert Users
hi- im running glassfish 3.1 on debian server and there are times where I need to start the domain when we cannot access the web application. I checked the memory and it's confusing me. Am i still ok? can you explain the below?
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME... (1 Reply)
Discussion started by: lhareigh890
1 Replies
4. Solaris
I am interested in doing some heavy video work. I have a ADVC 110 Video capture device, which I am using to capture VHS video tapes, which I will convert on the server to DVD format and burn to DVD's using DVD production software. I will also take the captured video file and split it up in parts... (1 Reply)
Discussion started by: Marcus Aurelius
1 Replies
5. Linux
Which distro uses lowest system resource (when installed on hard_disk/usb.) where I can install software from Debian OR Ubuntu repository?
I found Quelitu which is based on Lubuntu, but uses less memory as given on their site. There are lighter distros but most of them are based on Slackware. I... (0 Replies)
Discussion started by: iripu
0 Replies
LEARN ABOUT DEBIAN
sg_get_mem_stats
sg_get_mem_stats(3) Library Functions Manual sg_get_mem_stats(3)
NAME
sg_get_mem_stats, sg_get_swap_stats - get VM statistics
SYNOPSIS
#include <statgrab.h>
sg_mem_stats *sg_get_mem_stats(void);
sg_swap_stats *sg_get_swap_stats(void);
DESCRIPTION
Memory statistics are accessed through the sg_get_mem_stats function. It returns a pointer to a static sg_mem_stats.
The sg_get_swap_stats returns returns swap statistics. It returns a pointer to a static sg_swap_stats.
On the FreeBSD operating system elevated privileges are required to access the swap statistics. Making the program setgid kmem should be
sufficient. Programs running as root will not have this problem.
RETURN VALUES
The VM system calls can return a pointer to either a sg_mem_stats or a sg_swap_stats.
typedef struct{
long long total;
long long free;
long long used;
long long cache;
}sg_mem_stats;
total The total amount of memory in bytes.
free The total free memory in bytes.
used The total used memory in bytes.
cache The amount of cache used in bytes.
typedef struct{
long long total;
long long used;
long long free;
}sg_swap_stats;
total The total swap space in bytes.
used The used swap in bytes.
free The free swap in bytes.
TODO
Add a function to hold open the file descriptor to the kernel memory structures. Doing this would allow the elevated privileges to be
dropped early on.
SEE ALSO
statgrab(3)
WEBSITE
http://www.i-scream.org/libstatgrab/
i-scream $Date: 2005/04/25 11:25:45 $ sg_get_mem_stats(3)