Home > MDR client performance
MDR client performance
Mailers that work with large mail.dat files can improve the performance of the USPS MDR Client by tuning its environment for optimum performance.
You can tune your MDR client environment by performing these steps:
- Load the MDR Client on a computer with a 64 bit version of Windows
- Download and install the 64 bit Java runtime.
- Configure the MDR client to use the 64 bit Java runtime
- Increase MDR client runtime memory
- (optional, but encouraged) Allocate MDR client memory based on your typical Mail.Dat
This information is provided in the current USPS PostalOne! Mail.dat Technical Specifications Guide (pdf). We've reformatted and edited it for clarity to make it faster and easier to get this tuneup completed.
Step 1: Load the MDR Client on a 64 bit computer
Reference: Tech Guide (pdf)
Download the MDR client and unzip it into a folder on your 64 bit computer. Once unzipped, you'll see something like this. I unzipped the TEM client into C:\MDRClientTEM. You can name the folder whatever you like.
Step 2: Download and install the 64 bit Java runtime
You must install the 64 bit Java runtime on your computer. As of this writing, you can download it from http://java.com/en/download/manual.jsp, but be sure to choose the "Windows Offline (64 bit)" download as shown in the image below:
Install the 64 bit runtime. Be sure to use the "Change destination folder" option on the first screen (see the circled checkbox below).
On the next screen, click the Change button to create your own Java runtime folder. We're doing this so you know exactly where the 64 bit Java runtime is installed - something you'll need to know in the next step of this process.
Once you click the Change button (you can see the edge of it on the right of the screen image below), use the "Make New Folder" button to create a folder for the Java runtime.
I created a folder on the C: drive called Javav7x64 as you can see below, but you can call it what makes the most sense to you. I suggest that you avoid using spaces in your folder name.
As you can see below, my folder name is in the installer screen and now you can click next to continue with the Java runtime install process.
Step 3: Configure the MDR client to use the 64 bit Java runtime
The MDR client software can be configured to run in 64 bit mode on a 64 bit version of Windows (such as Windows 7 Professional 64 bit) by following the instructions below.
I'll show the steps to do this for my TEM client on Windows 7 64-bit, but the steps will be the same for your other client versions.
On most systems, you can right click the files in the MDR client folder and click "Edit" to open them in Notepad. If that doesn't work for you, open Windows Notepad by going to Start, Accessories and clicking "Notepad", then click File, Open, and select the "run-mdclient" file in your MDR client folder.
Now you will have the run-mdclient.bat file open in Notepad.
Change the SET JAVA_HOME line from this:
to this:
Important: I used C:\Javav7x64 as the install location for my 64-bit Java runtime. If you used a different folder name when installing the 64 bit Java runtime, THAT is the folder name you must use above.
In notepad, click File, Save to save your changes.
Now the next time you run the MDR client, it will use the 64 bit Java runtime. Be sure to make these changes to your TEM, CAT and Production MDR clients so they behave the same way.
Step 4: Increase MDR client runtime memory
Normally, we would start by increasing memory allocation settings by approximately 50%. If you prefer to tune your MDR client based on the size of your typical Mail.Dat, skip to Step 5.
For
instance, if you normally run the Mail.dat client app on a 32-bit
machine with a minimum heap size of 1G and a maximum of 1.5G, you'll
want to run it on 64-bit hardware with a minimum heap size of 1.5G and a
maximum of 3G.
First, we'll disable the default memory settings.
As we did earlier, open run-mdclient.bat in Notepad and find the line that starts with
SET MEMALLOC= -Xms64m -Xmx512m
Change that line to read
REM SET MEMALLOC= -Xms64m -Xmx512m
When you're done, it should look like this:
Next, we'll enable a somewhat larger memory configuration.
Find the line that reads
REM SET MEMALLOC= -Xms512m -Xmx1024m
Delete the 'REM ' pn that line so that the line now reads:
SET MEMALLOC= -Xms512m -Xmx1024m
When you are done, it should look like this:
Save the run-mdclient.bat file (File>Save) and close Notepad. You can run your MDR client again and see if it performs better.
Again, be sure to make these changes to your TEM, CAT and Production MDR clients so they behave the same way.
If you want to optimize performance, use the instructions in Step 5 below to allocate memory based on your Mail.Dat.
Step 5: Allocate MDR client runtime memory based on your typical Mail.Dat
The changes in Step 4 will improve performance, however it's impossible to calculate how much additional RAM may be
needed to optimize performance for your Mail.Dat files since memory use will depend upon the Mail.dat being
processed.
If you allocate memory based on the sizes of the CQT, PQT and PDR/PBC files listed in the table, you should improve performance to its peak.
Use the table below to find the right memory size for your typical Mail.Dat:
Mail.Dat job characteristics |
JVM Heap Setting |
Minimum Free RAM |
Up to 500,000 PDR records |
1024MB |
2GB |
500,000 – 2 Million PDR records |
2048MB |
3GB |
2 – 5 Million PDR records |
3072MB |
4GB |
5 – 10 Million PDR records |
4096MB |
5GB |
Up to 100,000 PQT records |
1024MB |
2GB |
Up to 500,000 PQT records |
2048MB |
3GB |
1 – 2 Million PQT records |
3072MB |
4GB |
2 – 3 Million PQT records |
7168MB |
8GB |
4 – 5 Million PQT records |
11GB |
12GB |
Up to 100,000 CQT records |
1024MB |
2GB |
Up to 500,000 CQT records |
2048MB |
3GB |
1 – 2 Million CQT records |
3072MB |
4GB |
(table source: USPS PostalOne! Mail.dat Technical SpecificationIs Guide)
Choose the largest amount of RAM (JVM Heap Setting column) based on the PDR, PQT and CQT counts in your typical Mail.Dat.
Example: If you had 500,000 PDR, 3 million PQT and 2 million CQT, then you would use the largest memory amount - the 7168M associated with a Mail.Dat containing 3 million PQT records.
Given that example, set MEMALLOC to 7168MB by adding a new pair of lines at the bottom of the series of REM/SET MEMALLOC pairs. The new lines should look like this:
REM 7 gigabytes - use this only if you have at least 8 gig of RAM
SET MEMALLOC = -Xms512m -Xmx7168m
Make sure that all other SET MEMALLOC lines start with REM (note the underlines I made). If you always REM the ones you aren't using, then there will be no confusion about which MEMALLOC is being used by the MDR client.
When you're done, it should look like this:
Click File, Save to save your changes.
You're now ready to test your MDR client with a 64 bit runtime and an optimized memory setup.
|