Results 1 to 9 of 9
  1. #1
    Join Date
    Jul 2005
    Posts
    94

    2 servers, how to balance load though?

    Alright, so I decided to pool bandwidth (got a private switch) and now my 2 servers are pooling. BUT, I tried to lower my load by splitting the mysql database to the new server. Unfortunately, the test didn't go well.

    On the new server, the load was 0.12 and it took 5 seconds to load. While on the regular server (apache + mysql + everything) was at a 12.00 load and took 0.02 seconds to load.

    I am using its external IP address to connect to. The my.cnf files are identical on both servers.

    Any help?

  2. #2
    Join Date
    Apr 2002
    Location
    USA
    Posts
    5,783
    Is there an internal network between the two servers?

    What is the ping time and traceroute to the new server from the old?

    Lots of things could be happenig but it sounds to me like there is a delay in the look up of the new server from the old.

  3. #3
    Join Date
    Dec 2005
    Location
    NYC
    Posts
    428
    Use a load balancer.
    Edge 1, LLC
    http://www.edge1.net | 800.392.2349
    Cisco SMARTnet & Licensing Specialists | Datacenter/Network Design & Management Consulting | Cisco New & Certified Refurb Equipment Sales

  4. #4
    Join Date
    Jul 2005
    Posts
    94
    How could there be a delay? It's on a private switch O____O

  5. #5
    Join Date
    Mar 2003
    Location
    California USA
    Posts
    13,681
    add

    skip-name-resolve
    to the my.cnf

    and use the othe servers ip in the script. hostname lookups are a large bottleneck. Even if you use ip's it looks up hostnames without skip-name-resolve
    Steven Ciaburri | Industry's Best Server Management - Rack911.com
    Software Auditing - 400+ Vulnerabilities Found - Quote @ https://www.RACK911Labs.com
    Fully Managed Dedicated Servers (Las Vegas, New York City, & Amsterdam) (AS62710)
    FreeBSD & Linux Server Management, Security Auditing, Server Optimization, PCI Compliance

  6. #6
    Quote Originally Posted by sct4a
    Use a load balancer.
    Actually, linux makes a great load balancer

    Could be a networking issue, did you check all the interfaces for settings, duplex , arp etc? Hard to say without knowing exactly what you have setup and how it is setup.

  7. #7
    Join Date
    Dec 2004
    Location
    New York City, NY, USA
    Posts
    735
    Have you tried enabling MySQL persistent connections?

  8. #8
    Join Date
    Oct 2002
    Location
    Manchester, UK
    Posts
    1,179
    Quote Originally Posted by tamasrepus
    Have you tried enabling MySQL persistent connections?
    That'll have little effect if it is caused by a bottleneck as suggested by Steven.
    Rob Greenwood
    RedHat Certified, Unix Consultant
    http://www.linkedin.com/in/bilco105

  9. #9
    Join Date
    Dec 2004
    Location
    New York City, NY, USA
    Posts
    735
    Quote Originally Posted by SolidLogix
    That'll have little effect if it is caused by a bottleneck as suggested by Steven.
    Just providing an alternative solution... DNS lookups should get cached. On the other hand, if persistent connections are disabled, the overhead of initiating new TCP/IP connections to the MySQL server could easily slow everything down.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •