Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

coldfusion database queries slower on virtual ded server vs. shared host

New Here ,
May 06, 2011 May 06, 2011

I am working on moving my site from a shared host to a virtual dedicated server running Windows and IIS.  I have successfully installed Coldfusion on the new Virtual Ded server and everything is working perfectly, with the exception that queries on the new virtual server take a lot longer than those on the shared host.  This seems quite counter-intuitive to me.  I've tried playing around with settings in the CF Administrator, set my client storage from Registry to a database and several other things, nothing seems to help.  It's the same amount of data, same exact code, but the server that should be faster is quite a bit slower.  Anyone have any ideas?  I'm running Coldfusion 8 and a MySQL 5.0 database.

1.6K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
May 06, 2011 May 06, 2011

alucidgeeked wrote:

Anyone have any ideas?

That there is a lot more to look at then just what is happening ON the new server.  What is happening BETWEEN the new server and the database server?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 06, 2011 May 06, 2011

The database server is new for the the new server, not using the old database server.  I have the datasource setup using "localhost" as the database server for the VD.  I have tried both maintaining client connections and turning that option off, doesn't seem to help at all.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 06, 2011 May 06, 2011

Used getTickCount, ran the same query with the same data on both servers.... the shared host gets a result of 150 or less ms.  The new virtual dedicated server, over 300 ms everytime.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 06, 2011 May 06, 2011

I also just ran the same query directly from the database server itself using Navicat.. got a query response time of 92 ms.  Something with CF is definitely causing the problem.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 07, 2011 May 07, 2011

How much RAM/CPU does your VDS package have?

You will probably find that shared hosting servers have alot of ram/processing power compared to a VPS instance (at guarantee level) and also depending on the host, they may run seperate database servers and seperate CF servers too - each server tuned for their specific task.

Don't forget your running Windows Server, IIS, CF and MySQL on the same server (and maybe other things too), so the more RAM the package has, I would say the better it would be.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 07, 2011 May 07, 2011

iSaid,

Thank you.  I'm curious, since I'm relatively new to the virtual & dedicated server setups, would i be better off with two virtual dedicated servers, one running CF and one running the database, or would I be better off with one dedicated server?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 07, 2011 May 07, 2011

iSaid,

Got to this before my coffee and completely forgot to answer your question.  I have a VPS from godaddy.com, here are the specs :

1.87 Ghz

• OS: Windows Server
2008 Standard 64-bit
• RAM: 3 GB
• Storage: 45 GB‡‡
• Bandwidth: 1,500 GB/mo

Last night I removed all data that was older than 30 days and not necessary to store anymore.  Some seem to be a little slow still, but most of them have improved quite a bit, so I think my new standard will be to archive data to another table once a week if it is older than 30 days.  I'm also going through all my tables and double-checking my indexes.  Seems to be quite a bit improved since the archive, and its a small price to pay for the improved performance.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 08, 2011 May 08, 2011

3GB RAM should be OK to run that - probably not the best to run all that, but should be ok. Have you look at the CF Server Monitoring to see if that shows up anything?  Take a look at this - http://www.adobe.com/devnet/coldfusion/articles/eseminar_monitor.html - it might help (haven't seen it myself).

Was your shared hosting on GoDaddy too?  If it was, are you able to connect to the MySQL database you have on the shared account through the VPS to see if there is a difference in speed there (using CF on the VPS and MySQL on the shared host)?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 10, 2011 May 10, 2011
LATEST

Sorry it took me so long to reply, was trying several things, including switching my database back to the old server.

First, I disabled IIS and installed apache, got CF working with apache, tested results, saw very little improvement, if any at all.

Uninstalled apache, went back to IIS, got everyting back up.  Changed the database to use the shared host database, some improvement, but it still doesn't run nearly as fast as the shared host does.  In fact I can click the a link on both sites one right after the other, even if i click the new VPS server first, the shared host site always loads at least 3 seconds faster.

The site works great when queries are incredibly small, but anything that has to pour through any length of data in the database and the system hangs, sometimes it seems forever.  My cfoutput tags are timing out on the new server when I get any sort of traffic on it (even 5 members logged in at once) but I can have 100+ members on the shared host with no issues whatsoever.. it still runs faster than the VPS server does with just me on it.

I double checked all my indexes, everything seems to be in order and matches the shared host db exactly.  The only difference I can see between the two servers, other than one being a virtual dedicated and the other being shared, is that the shared host uses apache instead of IIS.  But again, I already tried that.  Also, should be noted that the shared hosts database has every line of data ever written on the server still in its tables, the virtual dediated host has only a fraction of that since I removed anything that was older than 30 days an no longer necessary. 

As far as server monitor, it's yelling at me telling me that queries are taking way too long... I already know this.  I have used mysql console and run these queries using EXPLAIN, saw no issues, server returns the results and explanation incredibly fast.  It's got to be something with the way MySQL is being handled by Coldfusion, but I've played around with every setting I can think of to no avial (I have reprovisioned the server since getting desperate and just clicking boxes in the CFAdmin in the hopes I'd figure something out).  This has been weeks of my life trying to get this setup, and everything is so perfect with the exception of these query times... I even have SmartFox2X setup, running and ready for me play around with (for the record, I ran tests before the SmartFox installation, the connection between Coldfusion and MySQL was the same slow speed).

At this point my guess would be one of two things.

The virtual dedicated host can't handle the amount of traffic that the shared host can, either in database queries simultaneous users, which seems incredibly unlikely.  As fast as this site runs on my local server, which is a laptop, I would have expected my site to be screaming fast on this new server.

Or, Coldfusion isn't setup right.  It's an out-of-the-box Coldfusion8 installation with a web service configured for all IIS sites.  I added my datasources, made sure debuggging was disabled, etc.  Haven't changed much outside of that except for disabling Client variables (thought this could be the issues, since they were being stored in registry with the out-of-box installation and I've heard that is def not a good thing).

I'd be more than willing to temporarily change my Coldfusion Admin password and give you access to it iSaid if you wanted to take a look around.  Nothing makes sense to me... the Coldfusion I have on my laptop is out-of-the-box as well and my laptop handles load better than this server does.

Sorry about how long-winded this is, but I am beyond desperate.  This site is my only source of income and I have put the last year of my life (seriously working 60+ hour weeks since it launched, and loved every minute of it) and I hate to see it die because I cannot get this stupid server set up right.  I need help... I'm actually way past needing help. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources