1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Sites running slow, and I cannot find where the problem is

Discussion in 'Site & Server Administration' started by wadus, Jan 20, 2015.

  1. #1
    My client's sites have been running really slow. First I thought it was something with the database so I dumped the database of one of the sites into my computer, and it was running blazingly fast. My assumption is some server settings like Apache configuration, but I'm not sure where to start. This issue happens more often during database queries.

    Is there anything that can be done to find the culprit? This is a production server so I cannot be playing around with MySQL optimizations, etc, and unfortunately as I cannot replicate this slowness on my computer, it's hard to say that MySQL is the one causing it.

    These are the `top` says:
    Tasks: 333 total, 1 running, 331 sleeping, 0 stopped, 1 zombie
    Cpu(s): 1.1%us, 0.8%sy, 0.0%ni, 98.1%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
    Mem: 15015004k total, 12225816k used, 2789188k free, 136920k buffers
    Swap: 2047992k total, 512600k used, 1535392k free, 10442264k cached

    Any other info that can be useful I'd be gladly to provide. Unfortunately I cannot provide the sites' information due to NDA.
     
    wadus, Jan 20, 2015 IP
  2. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #2
    Without being able to supply things like the site or be able to do anything with MySQL, I'm not sure really what anyone is going to be able to help you with. If it's happening more often with database queries, then I'd say that's the first thing you need to look into and fix.
     
    digitalpoint, Jan 21, 2015 IP
  3. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #3
    I'm assuming the site and sql-server is hosted on the same server? If not, there might be a problem with the communication between them. That won't easily be replicated on a localhost - neither will issues caused by multiple users and high loads / multiple queries at the same time. If the speed issues appear more often with DB-queries, then I would say that the DB is the culprit, or perhaps the code accessing the DB - if the code is crap, , for instance querying for all records when only one is needed and so on, then of course, issues will arise.
     
    PoPSiCLe, Jan 21, 2015 IP
  4. wadus

    wadus Active Member

    Messages:
    23
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    86
    #4
    Thanks for all the replies, guys. I apologize for not being able to give the site's url. I have however tested about any frontend slowness like loading external JS files and so on

    Even though the slowness happen when there are database operations, I still think there's something wrong with the Apache settings, because I have enabled the slow log on MySQL and couldn't find anything that might be slowing it down.

    I'm thinking of creating a virtual machine with the same configuration as the server - is there an easy way to do so? Would creating an image of the server and then restoring it on VirtualBox work - not sure, never done it.
     
    wadus, Jan 22, 2015 IP