Detecting memory leaks
Posted: June 16th, 2008 | Author: TnT Admin | Filed under: Analyze | Tags: Memory | 8 Comments »Memory leaks are caused by programs that allocate virtual memory and fail to free after they are finished with it. Memory leaks are nasty program bugs that are sometimes difficult to find. A program containing memory leak bug often executes to completion and produces the correct results, so the presence of the bug is not always detected. In fact, as long as the program containing the memory leak does not impact other executing processes, the bug can go undetected for a long time.
The telltale sign of a memory leak is that Committed Bytes at the system level and/or Virtual Bytes at the process level are continuously increasing. Eventually, a program with a memory leak exhausts the system’s supply of virtual memory, which can cause other running programs and even system code to fail as the system runs up against the virtual memory Committed Bytes limit. Depending on the rate at which the defective program leaks memory and the amount of excess virtual memory available, it can be a long time before any dire effects are evident.
A program that is leaking memory by allocating and then failing to free some private virtual memory areas is relatively easy spot because the process Virtual Bytes counter is continuously increasing. It is often harder to detect programs that allocate shared memory from the system’s Pageable Pool and fail to release that. Because virtual memory allocated in the shared memory region of the Pageable Pool is not associated with any specific process, finding the offending program can be difficult. Often, it is necessary to use the process elimination to find the offender.
(Source: Windows 2000 Performance Guide, Mark Friedman & Odysseas Pentakalos)
Hi,
I am doing performance testing in the following performance test environment: One web server (IIS) and one controller machine at our site, 5 loadgenerators at client site.Protocol is web(http/html). Now i have to test the performance of IIS server so how can i configure IIS server to check its performance and what are the counters that i need to include while its configuration. Please suggest.
Hi Kumar,
You may like to look at the following resources “How do we determine processor contention?” . You can also look at the Process\Working Set of the w3wp.exe process that is used by IIS and determine if it is taking more memory over time. Apologies that I do not have sufficient resources on IIS monitoring however you can google for “IIS monitoring” will help.
Assuming you know how to create scritps here i will help you how to configure the IIS server and metrics. Right click on any graph ans select add measurements. Now you have to add the server machine to monitor with repective server name or IP. Here are the Metrics to add
1. Page Faults/sec (Memory)
2. Pages/sec (Memory)
3. Pool Nonpaged Bytes (Memory)
4. Threads (Objects)
5. %Disk Time (PhysicalDisk_Total)
6. Page File Bytes (Process_Total)
7. Private Bytes (Process_Total)
8. Virtual Bytes (Process_Total)
9. *%Interrupt Time (Processor_Total)
10. *%Privileged Time (Processor_Total)
11. %Processor Time (Processor_Total)
12. Interrupts/sec (Processor_Total)
13. Pool Nonpaged Failures (Server)
14. File Data Operations/sec (System)
15. Processor Queue Length (System)
16. Context Switches/sec (Thread_Total)
Need to add more metrics but it depends on the technology that application developed.
I suggest using this as starting point. You need to monitor some specific areas in order to do some of the tweaks. http://technet.microsoft.com/en-us/library/bb742534.aspx There are some launching points to send you down the rabbit hole from there.
1.report mangaer 2.continue scenario 3.add another webserver 4.tell to no need more test
Hi All,
I am going to conduct Endurance testing and my client asked me to condutct it as follows : each scenario with 3 iterations to be run for 2 hrs. provided scenarios are :
1. Login to Home page
2. Basic Search results
3. Advanced Search
4.Creation of an activity launching the online course Exception reports view Now confusion is How to conduct endruance teting for 2 hours for just log in to home page with users ( Concurrent users provided are 500, Not sure whether to conduct the test with 500 or less can anybody guide me here.) all scenarios mentioned are taking very less time in each run Now i am getting the basic question : what does he mean by Endurance testing inthis situation, how to conduct it? it would be grate if anybody helps me out ASAP.
Hi,
To detect memory leak, a) do we need to monitor when the vusers are ramping up b) or when vusers are in steady state. i.e. when vusera are already ramped up and the scenario is getting executed.
Hi Suresh, For running the endurance test, you might want to consult with your client which are the actions/business processes he/she wanted to perform throughout the 2hrs. On the technical side, to configure it to run for 2hrs, you can set it in Controller with “run for timing duration…” (if I recall correctly) on the bottom left hand corner of the scenario setup.