You are not logged in.
Hi all,
according to the FAQ (https://wiki.archlinux.org/index.php/FA … _my_RAM.3F), also some of my previous experiences with linux, the kernel makes excessive use of the RAM. thats not only fine but thats what i want.
now i use an up-to-date Arch x86_64 / kde with 4GB of RAM, of which only 1,4GB are used, even if i run various torrents and stuff.
now its everything working and fine and all, but i think maybe it should be used (nearly) all, shouldn't it?
so, any hints for /proc-features i missed are appreciated.
so long…
ford
Last edited by ford prefect (2011-11-29 14:44:35)
towel-day.com
nvidia ist keine Hautcreme
Offline
Can you post the output of 'free -m'?
Try running a virtual machine or two and see if things change.
Offline
I have 8 G here and even when x264 encoding and kernel compiling for example, rarely push over 2 G... are you used to Windows ![]()
Download linpack from the AUR and set it to use 3.8 G of RAM if you want to make sure it's addressable.
Last edited by graysky (2011-11-19 15:30:12)
Offline
ok, output of free -m
total used free shared buffers cached
Mem: 3949 1579 2370 0 57 564
-/+ buffers/cache: 957 2992
Swap: 0 0 0(i disabled swap because i needed harddrive…)
the ram is adressable for sure. there are different indicators. first it is shown above, then i wrote a small c-program (learning c atm) allocating space - for fun i pushed it up to the full ram, and also in systemmonitor it shows the complete 3.9GB.
i'll play a little with linpack later today, maybe some VMs too…
but that does not really answer my question yet, right?
…and thanks for all the fish
ford
EDIT: no, not used to windows. i'm clean of that cancer for 4 years now… just some games anymore, nothing serious!
Last edited by ford prefect (2011-11-19 18:20:22)
towel-day.com
nvidia ist keine Hautcreme
Offline
Is your system slow? Maybe the apps you're using don't need all that much RAM?
Offline
Yes that's the obvious conclusion, the system won't just mark ram as used, it actually HAS to be USED by something. Making use of 'excessive' ram generally means that the system caches (mirrors) data which exists on disk. Say you launch application X and exits it, the application remains in the cache memory since that memory isn't needed by any running apps. You launch the application again and instead of launching it from disk it will be launched directly from cache memory which is alot faster. However, cached memory is not the same as 'used' memory since cached memory can instantly be reclaimed by the system should it or any applications need that memory. Your system will automatically cache (keep in ram) applications/libs if there's memory to spare, I believe you can finetune it though if you'd want it to be more aggressive.
Now if you want your system to actually 'use' as much ram as possible in terms of applications then you can likely tune alot of apps to be more memory hungry. You mentioned torrents, by increasing the buffer size in your torrent program to hold as much data as possible before writing it to disk thus making use of your available ram while limiting disk writes. I know this is often employed by torrent seeders in order to minimize disk usage.
Offline
the system won't just mark ram as used, it actually HAS to be USED by something.
Download linpack from the AUR and set it to use 3.8 G of RAM if you want to make sure it's addressable.
Offline
When I used KDE (with Slackware, before Arch), I had the same picture: RAM memory was used until ~2GB of RAM, and when there was heavy processing or program usage, the swap memory become useful. I guess this is the normal behavior, since swap memory comes to free the cached memory when not used for a long time in benefit of another process/program which needs that memory. Nonetheless, there's a parameter called "vm.swappiness", which can get what you want. The "vm.swappiness" has a value from 0 to 100, 0 meaning that kernel will keep all memory to RAM, and 100 the kernel will keep all memory to DISK. The default value is 60, which is fine by most users. Should you wish to change it, in your terminal window, as root, just try
# sysctl -w vm.swappiness="n"with double-quotes, where 'n' is a value from 0 to 100. Or,
echo n > /proc/sys/vm/swappinesswill have the same effect as sysctl -w. "$ man sysctl" can give you more info about what can you do with your kernel modules parameters.
Now, I really don't what happens if you set extreme values, like 0 or 100, so I'll not take responsability for any damage. ;-)
Offline
Easy with KDE.
Enable nepomuk indexing to use 1 gig of memory. (I think that was the limit.)
Now the only way for me to go above 1 gig is use a virtual machine or make j64. That's with gnome-shell, openbox, or icewm. I can never stay with one. And I have 8 gig available.
Offline
hm, thanks for all the replys.
i think, its obvious to anyone that there have to be apps using ram. i usually run ktorrent with about 20 seeding torrents. that data is always read from disk, and rarely buffered in ram. so, as mentioned above, i'll have a lookaround in the configs, to find some ways turning up memory usage.
adjusting swappiness also should make no sense, since i disabled swap completely.
nepomuk was bugging me long time, so i just turned it off…
thanks
ford
towel-day.com
nvidia ist keine Hautcreme
Offline
i usually run ktorrent with about 20 seeding torrents. that data is always read from disk, and rarely buffered in ram.
I would also think that this should fill your caches. On our main server, we can clearly observe how caches are filled quickly after a reboot, and it's probably because of rsyncd (right now, the machine has 3533MB of cached memory). But even on my laptop, after about 13 hours of uptime, not doing anything extreme, 'free -m' shows 1946MB of cached memory. Your 564MB seem very low.
Offline
see, thats what its all about.
sadly, i dont find any settings in ktorrent. also id like to adjust it on a lower level (kernel) for taking effect for all applications.
any hint how to adjust 'cachiness'?
towel-day.com
nvidia ist keine Hautcreme
Offline
hm, bumbing again. anyone got an idea whats wrong on my machine? sadly i didnt manage to make the internet searching machines spitting out any results related to my problem…
towel-day.com
nvidia ist keine Hautcreme
Offline
What kind of uptime are we talking about?
Offline
its not depending on uptime. after start od all apps it uses about 1.4G and that doesnt change significantly over time.
towel-day.com
nvidia ist keine Hautcreme
Offline
Try starting more apps, open more tabs in firefox etc, see if you can boost the RAM usage. I think only then can we conclude that your RAM usage is capped somehow.
"If the person you are talking to doesn't appear to be listening, be patient. It may simply be that he has a small piece of fluff in his ear." - A.A. Milne (Winnie-the-Pooh)
Offline
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
int main(int argc, char** argv) {
int max,secs = -1;
int mb = 0;
char* buffer;
if(argc > 1)
max = atoi(argv[1]);
if(argc > 1)
secs = atoi(argv[2]);
while((buffer=malloc(1024*1024)) != NULL && mb != max) {
memset(buffer, 0, 1024*1024);
mb++;
sleep(secs/1000);
printf("Allocated %d MB\n", mb);
}
return 0;
}compile the above if you know how or else just tell me so i can tell you how to do it or read below
(i had it compile as eatMB if not replace on the example below)
and then run:
./eatMB 8000 0
at what number does the program stop?
(the command is ./eatMB {amount of RAM to Allocate} {time between each 1MB allocated ,1000= 1 sec}
in case u cant compile just copy-paste and run the following in a terminal:
echo "#include <stdlib.h> #include <stdio.h> #include <string.h> #include <unistd.h>
int main(int argc, char** argv) {int max,secs = -1;int mb = 0;char* buffer;if(argc > 1) max = atoi(argv[1]);if(argc > 1) secs = atoi(argv[2]);while((buffer=malloc(1024*1024)) != NULL && mb != max) {memset(buffer, 0, 1024*1024);mb++;sleep(secs/1000);printf(\"Allocated %d MB\n\", mb);}return 0;}" > eatMB.c && gcc eatMB.c -o eatMB && ./eatMB 8000 0don't forget to delete eatMB.c and eatMB files after u are done ![]()
Last edited by ghost333 (2011-11-26 20:14:49)
Offline
open more random files or watch more youtube. !next
Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest
Offline
so, whatever happend, here some surprising news:
$ free -m
total used free shared buffers cached
Mem: 3949 3831 117 0 29 2348
-/+ buffers/cache: 1454 2495
Swap: 0 0 0i did not change anything, anybody can explain? i'd rather dislike to mark this thread as solved bevore there is any explain of that…
thx
ford
towel-day.com
nvidia ist keine Hautcreme
Offline
I still say uptime.
Offline
nope, no uptime related issue at all. now i have an uptime of 14min and ram is all filled. whatever changed, i cannot see any reason.
i'll mark thread as solved, but explains are still welcome!
_
dear reader in the future: sorry. i dont know what happend to change this…
http://xkcd.com/979/
towel-day.com
nvidia ist keine Hautcreme
Offline