Some time ago I sent riel and quintela a program which, used with the right parameter, turns into a kinda "worst case" memory trasher. Since it looks like they didn't have enough time to look into it, I'm sending it to the whole list now. I also figured out the ideal number to stress test everything is 16 times your memory size in bytes (of course you can use more or maybe less, which makes the effect in the memory subsystem a bit different). ----- Forwarded message from cesarb ----- Date: Sun, 20 Aug 2000 01:25:34 -0300 To: quintela@fi.udc.es Cc: riel@conectiva.com.br Subject: [cesarb: sieve.c] User-Agent: Mutt/1.2.5i riel thinks this should be included in your memtest suite. So I put it in public domain (as something that simple deserves). It was a sieve program I made last year. Was also my first pthreads program (since I *had* to move the printf out of the main loop, it was killing the performance). riel says it is a pretty realistic sweep pattern. The only change you might want to make to it (to make it work even better as a VM test) would be to comment out the printf ("%u ", I2N (i)); from the output loop, so the last sweep still gets done but is not dependent anymore in the tty speed (you should also comment out the printf ("%u ", 2); line). Leave the final count output there to check for bad runtime errors. If you want to use it for even larger numbers (but getting a bit more CPU bound) you should comment out the output lines I mentioned above, change bitpos to a unsigned long long, and change BITPOS_FORMAT to match. I didn't test that, but the program was ready for that kind of change from day one. You could also include this email in your test suite's documentation. It's pretty much the only documentation sieve.c would get. ----- Forwarded message from cesarb ----- Date: Sun, 20 Aug 2000 00:57:32 -0300 To: riel@conectiva.com.br Subject: sieve.c User-Agent: Mutt/1.2.5i Here is it. I compile it with gcc -W -Wall -O3 -march=k6 -lpthread -save-temps You need 1 billion (bah, screw the english. Um bilhao) maximum to get 60Mb core. 2 billion get you 118Mb, which causes severe trashing and awful latency on a 128Mb machine with X+gnome+mozilla+xmms+xchat+lotsa xterms+the kitchen sink running. ----- End forwarded message ----- ----- End forwarded message ----- -- Cesar Eduardo Barros cesarb@nitnet.com.br cesarb@dcc.ufrj.br