Skip to main content

Slow initial connection on cPanel server

Comments

15 comments

  • cPanelMichael
    Hello @celiac101, Here are some links to existing forum threads you may find helpful: Thank you.
    0
  • celiac101
    Excellent, I did learn a lot from those threads, and litespeed seems to be a consistent recommendation to solve this issue. Does anyone know if it would conflict with memcache or mod security? I have no idea how litespeed works, or what it could conflict with. Another common recommendation is Nginx. I have the same questions about it, would it conflict with anything like memcache or mod security? Can you run both Nginx and litespeed? Is one better than the other?
    0
  • cPanelMichael
    Hello @celiac101, LiteSpeed supports both Mod Security and Memache: litespeed_wiki:cpanel:apache-migration-faq [LiteSpeed Wiki] litespeed_wiki:lsmcd:install-memcached [LiteSpeed Wiki] I recommend using LiteSpeed over Nginx, as LiteSpeed offers an official plugin for use with cPanel. Thank you.
    0
  • celiac101
    I'm having trouble locating the LiteSpeed plugin in my cPanel. I don't see it in in Softacalus. Where is it located?
    0
  • Infopro
    You'll need root access to the server to install Litespeed. It's not installed to a single cPanel account via Softaculous.
    0
  • celiac101
    So two posts ago one of your other staff members said: "I recommend using LiteSpeed over Nginx, as LiteSpeed offers an official plugin for use with cPanel." So I guess I'm wondering what you guys mean by "plugin"? If I have to install it via command line, which I can do because I'm the server admin, then I certainly would not call it "an official plugin for use with cPanel." In any case, I guess I'm asking how to install it.
    0
  • cPanelMichael
    So two posts ago one of your other staff members said: "I recommend using LiteSpeed over Nginx, as LiteSpeed offers an official plugin for use with cPanel." So I guess I'm wondering what you guys mean by "plugin"? If I have to install it via command line, which I can do because I'm the server admin, then I certainly would not call it "an official plugin for use with cPanel." In any case, I guess I'm asking how to install it.

    Hello @celiac101, To clarify, I was referring to the cPanel & WHM server environment. It's still a third-party application that requires root access to the server to install. Litespeed provides installation instructions at: cPanel WHM Plugin for Managing LiteSpeed Web Server - LiteSpeed Technologies Thank you.
    0
  • celiac101
    I'm still trying to improve performance, and am having difficulty with changing my swap memory. Since I have 130 gigs of memory it seems like I should be able to set my swappiness from the default of 60 to 10, or even 1, and it should increase my server's performance. However, when I run this command: sysctl -w vm.swappiness=10 and then verify it: cat /proc/sys/vm/swappiness 10 I then run various site speed tests and my performance is slower. One thing that occurred to me is that perhaps the memory that is allocated to swap, which when I run Top shows: Swap: 8388604k total is not being used, and is still reserved for swap? Any ideas would be helpful, but for some reason lowering my swap value to anything below the default 60 seems to decrease my server's performance as measured by various site speed sites like pingdom.com.
    0
  • rarod
    One thing that occurred to me is that perhaps the memory that is allocated to swap

    Check with "free -h" if you are using swap. Ideally you should have near 0 used swap. To flush swap: swapoff -a && swapon -a
    0
  • celiac101
    It does appear I am using it, see below, and again, when I've tried to use less swap it seems to slow things. total used free shared buffers cached Mem: 126G 119G 6.7G 242M 1.4G 94G -/+ buffers/cache: 23G 102G Swap: 8.0G 324M 7.7G
    0
  • celiac101
    The flush swap command was very helpful, I ran that first, then set it to 10, and now I see my swap at 0. So how can I re-allocate my memory to use less of it for swap? Currently I see 8 Gigs dedicated to swap. I would like to change that to 1 gig.
    0
  • rarod
    So how can I re-allocate my memory to use less of it for swap?

    Swap uses hard disk, not memory. This is why is slower when the system uses swap. If you set swappiness to 10 the system should use less swap.
    0
  • celiac101
    Thank you for this info. One issue I had after setting the system swapiness to 10 was that after rebooting my server it changed back. Is there a way to make sure it stays at 10? I've been using the commands below to work on this: Flush Swap: swapoff -a && swapon -a Set swapiness to 10: sysctl -w vm.swappiness=10 and then verify it: cat /proc/sys/vm/swappiness 10 To Check Usage: free -h
    0
  • rarod
    . Is there a way to make sure it stays at 10?

    In /etc/sysctl.conf file add the next line: vm.swappiness=10
    0
  • celiac101
    I've been running Litespeed for about 2 weeks now, and am seeing speed improvements from it, however, in google pagespeed I am getting slow mobile DOM Content: "DOM Content Loaded (DCL) measures when HTML document has been loaded and parsed." I was wondering if anyone has opinions about whether the following 2 changes might improve this: 1) Upgrading PHP from 7.0.x to 7.1.x. 2) Upgrading to InnoDB from MyISAM: I am getting mixed messages about InnoDB vs. MyISAM (what I'm using now), as far as which is faster. I am reading that InnoDB may be slightly faster, but probably not much, and some people even say that I might not notice any difference at all. Before making such a big change, I would love to hear from anyone who has experience with making this change in IPB, and whether their site speed improved enough to make it worth it. My main site is a PHP forum that has nearly 1 million posts, and over 100K topics, and is about 2 gigs in size.
    0

Please sign in to leave a comment.