Password salt / hash performance on similar hardware
I am using the following code as a test:
<cfset PlainTextPassword = "Testing123^^%%@@!">
<cfset tickBegin = GetTickCount()>
<cfset salt = Hash(GenerateSecretKey("AES"), "SHA-512")>
<cfset hashedPassword = Hash(Trim(PlainTextPassword) & salt, "SHA-512", "utf-8", 57500)>
<cfset tickEnd = GetTickCount()>
This runs in ~50-70 milliseconds on our test servers, but takes around 5 seconds on our live production server, which has similar to better specs:
Server | OS | Processor | RAM | Applications | ColdFusion settings | Load |
test | 64-bit (same) | Xeon X5670 (2 cores) | 4GB | ColdFusion (same), MySQL | Set to use up to 1GB RAM | ~0-5 concurrent users |
live | 64-bit (same) | Xeon X5670 (4 cores) | 6GB | ColdFusion (same) | Set to use up to 2GB RAM | ~50+ concurrent users |
Any idea on why the difference is so drastic?
Thanks in advance.
