<quote sender="Ed L Cashin"> > Hi. I can choose one of two different related things in userland, and > one takes more physical memory than the other but runs faster. you mean one memory intensive, one io intensive? > Looking at the number of free pages in the system doesn't really tell > me whether memory is "tight" or not. There could be plenty of pages > being used for caches, and at the first sign of memory pressure, those > caches may shrink. > > The best way I can think of to know whether memory is really tight is > to measure how often shrink_zone is getting called. (I'm looking at a > 2.6.0-test11 kernel.) > > I can add some light instrumentation to track the rate at which > shrink_zone gets called and a system call to make that rate visible to > userland. Is there an existing way already in place or a better way > to know when memory is tight? cat /proc/vmstat, see pgscan. but the stat is commulative. > -- > --Ed L Cashin | PGP public key: > ecashin@uga.edu | http://noserose.net/e/pgp/ > > > -- > Kernelnewbies: Help each other learn about the Linux kernel. > Archive: http://mail.nl.linux.org/kernelnewbies/ > FAQ: http://kernelnewbies.org/faq/ > > -- Eugene TEO - <eugeneteo%null!cc!uic!edu> <http://www.anomalistic.org/> 1024D/14A0DDE5 print D851 4574 E357 469C D308 A01E 7321 A38A 14A0 DDE5 main(i) { putchar(182623909 >> (i-1) * 5&31|!!(i<7)<<6) && main(++i); } -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/