Jump to content

memory stress test


rdl_len

Recommended Posts

Hi all,

Can anyone recommend any software for to 'load test' RAM/memory on a standard Windows XP machine or any Windows box essentially?

I am looking to stress test an application by mimicking high memory usage on the machine while the app is running; I can find lots of software tools to do this for CPU usage but none for memory usage?

Anyone any ideas?

Thanks

R

Link to comment
Share on other sites


You can't really do that on a system with virtual memory, as Windows has. In essence, you have to be able to shut down all memory paging or virtual memory, and then fill the remaining physical memory. Windows won't let you get away with this.

While it is possible to fill up all the memory in usage (I've done it), the problem there is that in forcing the system to use its page file extensively that you make the system run about as fast as a pig on its back in slop. In essence, you run into the same problem that the system would have if you were to provide it a small amount of memory (say 64MB for a XP system) - extensive use of the page file slows a system down considerably.

A thought though: You might try Application Verifier and see what comes of that. Though, it probably won't get you what you're looking for either...

Link to comment
Share on other sites

You could use a virtual machine - set how much ram to allocate to the VM, then test your app on the remaining physical memory.

Vmware server lets you prevent the VM from being swapped out, not sure about others.

Link to comment
Share on other sites

You could use a virtual machine - set how much ram to allocate to the VM, then test your app on the remaining physical memory.

Vmware server lets you prevent the VM from being swapped out, not sure about others.

Maybe I am not understanding what you are saying, but how would this accomplish a low-memory situation, without hitting the page file? If you are speaking of the host OS, you would still have the potential of other applications going to page file (even assuming Vmware stops that for its VMs). If you're speaking the guest OS, the Windows installed in a VM will still go to page file, no matter how small the memory.

I mentioned Application Verifier because I think I saw the option in it when I was playing with it (though I'm not 100% sure of it). If it does it, the only way it could possibly is to redirect the API calls to fool the program into thinking that there is much less memory to work with than there really is.

Link to comment
Share on other sites

I am piloting a new burn-in program, and it is highly configurable. For example if you only want it to test memory, you can disable the other tests, otherwise you can test everything all at once. There is a regular and professional version, you probably don't need the Pro. Pro lets you test ports with loopback adapters, which is something my company requires. They have a 30 day trial that you can use for both editions. The product is called PassMark BurnInTest.

http://www.passmark.com/products/bit.htm

It can only be run in Windows, which contrasts with other burn software we've used in the past which only work as a Live CD, and are limited hardware wise. This one seems to like hardware that works as long as you have it installed in Windows. I still don't know if we are going to end up using it but it seems to work fine, although I haven't been able to get it to run off a WinPE disc yet.

I haven't used it enough to know much more than that, so don't ask me any questions about it. :wacko:

Link to comment
Share on other sites

Hi all,

Can anyone recommend any software for to 'load test' RAM/memory on a standard Windows XP machine or any Windows box essentially?

I am looking to stress test an application by mimicking high memory usage on the machine while the app is running; I can find lots of software tools to do this for CPU usage but none for memory usage?

Anyone any ideas?

Thanks

R

hci memtest?

http://hcidesign.com/memtest/

Link to comment
Share on other sites

It would probably be very useful, given the nature of some of the responses if the OP could clarify him/herself.

I am looking to stress test an application by mimicking high memory usage on the machine while the app is running; I can find lots of software tools to do this for CPU usage but none for memory usage?

But the way I read this is that the OP is wanting to test an app in a low-memory available/high-memory used situation. More or less to see how the app might handle not having a lot of memory to run with. As the OP mentioned, there are many programs out there that will "soak" a certain amount of CPU as to test how an app will run with slower CPUs. But no really good solution for memory, because of what I mentioned in my first response.

Of course, burn-in of memory is an easy task, and many have pointed out good solutions (I like Memtest86). But for what I'm reading, I don't think that's what the OP is looking for.

Link to comment
Share on other sites

You could disable the pagefile... But rdl_len said nothing about avoiding it, so it's up to him/her.

In my program testing with Windows XP, I have discovered that this can not be effectively done (i.e. the system configured so Total Memory = Physical Memory)

Edited to clarify where I'm coming from. While you can effectively turn off the static page file (that's what the System/Advanced/Virtual Memory option does), you can not turn off the fact that the system will page parts if its memory out to diskette. In fact, if you set the static page file to zero, it will still write a large segment out to disk (482 MB on my latest test I did just now).

Memory Usage Report
-------------------
Available Physical Memory: 295.852 MB.
Total Physical Memory: 511.531 MB.

Available Page File: 316.777 MB.
Total Page File: 482.879 MB.

Available Virtual Memory: 2033.074 MB.
Total Virtual Memory: 2047.875 MB.

Memory Load is: 42%.

This is from a little program I have that I will share if requested. It exposes the memory reporting API call and reports it. The terminology is different (Microsoft's API documentation is different than the terms in the UI). As you can see, physical memory is much different than virtual memory. Yet physical memory + page file does not equal virtual memory. For my app (and I have done it), I can allocate 2 GB of memory and Windows will happily comply with it - and will happily slow down to a crawl once processing is done on that memory, among other problems. Indeed, allocating 2GB will create a low memory situation (which Windows reports in the taskbar). But it's just not too practical.

Edit again: Another fun one I discovered when I really started playing around by allocating huge sections of memory and monitoring the page file (more than I did before). Virtual memory as set in the control panel is only a suggested starting point more than anything definite. Which means as I was referring to before in this post, Windows will swap memory, whatever it wants to. Windows will also keep as much of the physical memory as free as it can. When I allocate the maximum memory possible, a significant portion of physical memory is still free. I observe that when the page file hits the maximum, then Windows will start producing error messages, not load apps at all, not load apps entirely (I only got one tab in Task Manager once).

Even more, there really aren't any guarantees on what kind of memory you can really allocate at any one time, or how much is available. The status of memory in Windows is very fluid. So the API above really doesn't even give you a good starting point, whatsoever. Programmatically speaking, you have to allocate the memory, error check and hope for the best. Really, you have to write your program to prepare for anything. If you go for a static portion of memory, it may succeed or not. You may have no virtual memory left for other things, 20MB, or 1.5GB. You just never know. You dive in and check whether you got a good result or not.

(Anyway I hope that was educational, or at least entertaining to some)

Edited by Glenn9999
Link to comment
Share on other sites

This is from a little program I have that I will share if requested. It exposes the memory reporting API call and reports it.

As Requested

It also does the following (I added some things and consolidated some others):

1) Allocates and holds a fixed amount of memory (MB). The OP might tweak this to their use - you can figure out about how much memory you would want to hold in order to see what happens.

2) Frees the memory allocated in #1

3) Does processing against the allocated memory in #1 and returns how long it took. This takes the form of writing a character (ASCII #255) to all bytes of the memory allocated. If you set it against a significant amount of memory (greater than your physical memory), go make a sandwich because it's going to take a while (watch that HDD light light up!).

4) Does the report that was in my prior message.

Hope you all find this interesting.

(I had a thought too when I was playing around with this. I'm not sure how much information this would gather, but you could determine a memory sweet spot for an OS by several runs of function #1 and #3 at specified intervals and graph out the time. Perhaps memory used vs processing time per MB or some such thing. I might automate it if I have nothing else to do sometime)

Edited by Glenn9999
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...