Posts

Showing posts with the label Performance

Casually measuring disk throughput with antimalware enabled and disabled

Image
I wanted to test the relative performance of two drives on a Windows 10 machine and get a feel for how much overhead my anti-virus products cost me.  To that end, I created a program to copy in different combinations between the two drives.  I ran that test with different Anti-Malware versions and configurations  From the README.md on GitHub The Program 1. It takes the names of two directories 2. It creates the number of files that you specify of a size you specify in both of the directories passed in.     1. You want big numbers for both.  The default is 10,000 files of 200,000B each. 3. It copies the large number of files in the 4 possible source/destination pair combinations. 4. It writes the timings to the console and deletes the test files. In my case I ran a couple different variations to see what was happening 1. Drive A anti-malware enabled .  Drive B anti-malware enabled 2. Drive A anti-malware enabled .  Drive B anti-malware disab...

AWS EBS storage balancing size versus throughput

One of my teams is rolling out a new application in AWS on EC2 instances where the operating system runs on an EBS drive. We selected one of the M3 machines that came with SSDs.  The application makes moderate use of disk I/O.  Our benchmarks were pretty disappointing. It turns out we really didn't understand what kind of I/O we had requested and where we had actually put our data. The Root Drive The root drive on an EC2 instance can be SSDs or Magnetic based on the type of machine selected. All additional mounted/persistent disk drives on that machine will probably be of the same type.  This is an SSD but it is a network drive.   EBS disks IOPS and MB/S are provisioned exactly as described in the EC2 documentation.  The most common GP2 SSDs have a burst IOPS limit and a sustained IOPS limit. They also have a maximum MB/S transfer rate.  Both the sustained IOPS limit and the maximum transfer rate are affected by the size of the provisioned disk. ...

Can I use an SD card for Virtual Machines?

The answer is Yes you can use an SD card to host virtual machines.  The utility of that depends on the card you have and the speed of the card reader built into your machine. I've been using a Dell E7240 Ultrabook as my primary on-site machine. It only has a 128GB SSD so I've been debating on where I can put virtual machine disk images.  It has an internal MSATA and an SD card slot.  SD cards are easier to get around here so I purchased a couple 64GB SD cards to try out.   I get up to 17MB/s copying my VMDK files to the SD cards on the E7240 and up to 42MB/s copying VMDK files on the Macbook Pro 2011. I tested the following cards with CrystalDiskInfo and my MacBook running Windows 8.1 bootcamp. The Macbook Pro results imply that it may be a limit of the E7240s SD card slot interface, possibly some kind of USB. PNY StoreEdge 64GB.  This is a short card intended for Macbook and Macbook Air with short SD card slots.  There are no specs on the packa...

Java API Wrapper for Windows Performance Counters

Now its time for a quick overview of the Java wrapper API for the Windows Performance Counters. Lifecycle  System Preparation  Library Initialization Counter Caching  Key Retrieval  Counter Usage Time Based Operations Related Posts Lifecycle The lifecycle for these counters is pretty straightforward: System Preparation: creation of counters in the Windows OS. Library Initialization: loading and initializing the library inside your running program Counter caching an optional step that warms up the counter library Key retrieval for any counter you use Counter usage including the API System Preparation You must create any custom counters as Administrator before running any program that uses the Performance Counter system. The simplest way to do this is in a Powershell script because Powershell is available on all modern Windows operating systems.  The following sample script creates a new Category " Freemansoft.JavaTestCategory" and two s...

Recording Java Metrics with the Windows Performance Counters

Image
Example Java Code  Library Performance  Library and Source Code Classspath  CreatingCountersWindowsOperatingSystem  Repository Organization Related Posts Java provides good monitoring through the MBean interface and monitoring tooling. It is nice because it works the same no matter what platform you run on.  There are times when you want to plug into the native performance recording tools especially when running on Windows machines because this makes it easy to integrate your Java application with your Windows based operational consoles. A Java test program generates 2,000,000 performance counter events per second in a single thread and up to 6,500,000 updates per second multi-threaded. (source available on github) This means that counter updates can be made at normal volumes with very little effect on the system. I've created a simple C# library and Java / JNI wrapper that lets you record native Microsoft Windows Performance Counters directly from ...

Windows Performance Counters

Image
Microsoft Windows has a mechanism for recording performance metrics from running applications using the Windows Performance Counters.  This is a high speed system that can be used to gather counts, rats, averages or other numbers based on raw counts or ratios like items/second.  You can see these counters using the perfmon  application.  This system has low overhead and is capable of a high rate of capture. I measured 10 million messages / second  using 4 threads on a 2011 Macbook Pro.  Performance Counters are generated/updated by major system modules and can be extended to include your own modules. Windows 8 comes with over 29,000 standard counters. You can see them by running the typeperf.exe -qx > counterlist.txt.   You can see the Performance counters in action using perfmon. This screen shot shows the  perfmon  application monitoring a cpu performance counter and a custom test performance counter generated by this  c# ...

Monitoring Windows Server 2012 performance running in a Hyper-V virtual lab

Image
I have a lab environment of 5 machines, one AD/DNS/Manager and 4 Hyper-V virtual machines.    I want to be able to monitor the performance of the various hosts under different conditions to see where I've run out of resources. There are two major components to the monitoring.  The first is the performance counters  on each monitored machine. These act as the source of performance information. The second is a monitoring console. That console can either be one that displays all information or can be one that displays information only when performance numbers fall outside some criteria. Windows Server Manager Performance View The Windows Server Manager  displays performance information for out-of-bounds situations where the values coming off of a machine are outside of some specified range.  Server Manager monitors as many machines as you want from its' All Servers  page. Select the servers that you want to monitor in the Servers  pane of ...

Memory Tuning - How OS Page Sizes Can Impact Oracle Performance

Image
Theory Modern operating systems provide each process it's own virtual address space that is potentially larger than physical memory. It does this by mapping the virtual addresses onto actual physical memory pages. The following diagram shows how large virtual address spaces are mapped onto small physical memory.  The virtual to physical relationship is maintained in mapping tables. Linux maintains a separate map for each process. The map contains one entry for each page where the size of the page is set by the operating system.  The CPU attempts to speed up the mapping of virtual memory to physical addresses by caching a subset of the mapping entries in its internal cache.  Modern large memory systems and the resulting large processes have increased the size of memory mapping tables faster than the cpu cache sizes have increased. The processor cache is usually very small with only maybe 100 entries in may processors. This mismatch causes faults that can have ...