Author Topic: Latest hostbill versions are slower ?  (Read 73 times)

0 Members and 1 Guest are viewing this topic.

Offline andika

  • 144
  • -1
  • Active Participant
  • ****
Latest hostbill versions are slower ?
« on: July 04, 2018, 07:16:16 AM »
Hello,

Are the latest hostbill versions slower ? It seems like it takes more seconds to load the website, but the most annoying thing is "Login as Client" it takes exactly 25 seconds every single time.  I'm using php 5.6 on server, all other recommendations are respected as described here https://hostbill.atlassian.net/wiki/spaces/DOCS/pages/53745197/System+requirements

Offline tallship

  • 614
  • 19
  • Active Participant
  • *****
  • Manager Network Services
    • Skype - tallship
    • Business Internet and Telephony since 1985.
Re: Latest hostbill versions are slower ?
« Reply #1 on: July 04, 2018, 09:07:53 PM »
Okay, first, you do understand that things get fixed, IF they're going to get fixed, when they get fixed. Right? You can open a trouble ticket and I forget how much that costs, but then you still have to pay for the time it takes Kris to fix whatever is broken, so you might be better off just waiting for it to become a problem for a lot of people, if this is in fact some bug issue.
Or you can make a bug report, but in order for that to work, many people have to vote up the problem. If that's still how they prioritize things.
Now that we have all of that out of the way....
One thing you can do to speed things up if it's database related is covered in a tutorial I wrote here: https://plus.google.com/103892214810181989328/posts/4uiSnydmhx9
Also, it's likely that HosBill is now a bit heavier since the recent update that supports PHP 7.2 - I would recommend that you upgrade your PHP to the latest version now that you can run HostBill on it. The speed is remarkably faster - quite noticeable actually, and that *might* speed up your times a bit.
Check your http error logs too, and the load on your system, etc., as well. Maybe there's a clue there why it's slowing down.
Try those first two items though, and let me know if that affords you some improvement in response time. I'm interested in hearing back on this matter.

Bradley D. Thornton - Manager Network Services, NorthTech Computer   TEL: +1.310.388.9469 (US) | +44.203.318.2755 (UK) | +61.390.088.072 (AU) | +41.43.508.05.10 (CH)
Registered Linux User #190795 - "Ask Bill why the string in [MS-DOS] function 9 is terminated by a dollar sign. Ask him, because he can't answer. Only I know that." - Dr. Gary Kildall.

Offline andika

  • 144
  • -1
  • Active Participant
  • ****
Re: Latest hostbill versions are slower ?
« Reply #2 on: July 05, 2018, 04:19:54 AM »
Okay, first, you do understand that things get fixed, IF they're going to get fixed, when they get fixed. Right? You can open a trouble ticket and I forget how much that costs, but then you still have to pay for the time it takes Kris to fix whatever is broken, so you might be better off just waiting for it to become a problem for a lot of people, if this is in fact some bug issue.
Or you can make a bug report, but in order for that to work, many people have to vote up the problem. If that's still how they prioritize things.
Now that we have all of that out of the way....
One thing you can do to speed things up if it's database related is covered in a tutorial I wrote here: https://plus.google.com/103892214810181989328/posts/4uiSnydmhx9
Also, it's likely that HosBill is now a bit heavier since the recent update that supports PHP 7.2 - I would recommend that you upgrade your PHP to the latest version now that you can run HostBill on it. The speed is remarkably faster - quite noticeable actually, and that *might* speed up your times a bit.
Check your http error logs too, and the load on your system, etc., as well. Maybe there's a clue there why it's slowing down.
Try those first two items though, and let me know if that affords you some improvement in response time. I'm interested in hearing back on this matter.

Thank you, I will try to update php to 7.2 version.

Offline d4f

  • 111
  • 5
  • Community Managers
  • Active Participant
  • ****
Re: Latest hostbill versions are slower ?
« Reply #3 on: July 05, 2018, 04:35:06 AM »
The described loading times sound abyssmal and may be related to some server (mis)configuration or blocked outgoing connection. While Hostbill *may* have gotten a bit slower over the years, it still loads perfectly for for me on PHP 5.6, in fact it has a much lower resource consumption that say an average Wordpress installation.

I assume you have root access to the server your Hostbill is running on. While PHP xdebug is mostly detected & blocked by ioncube, you could "strace" the PHP process of a login attempt to see what exactly it's waiting for. If for example you have a huge customer database and an active hard disk but Mysql runs on its default "8MB Ram" mode then the SQL "join" commands could take a lot of time to complete. However you should then be able to see the corresponding mysql long execution time warnings in your logs if you do monitor that as recommended.

Offline andika

  • 144
  • -1
  • Active Participant
  • ****
Re: Latest hostbill versions are slower ?
« Reply #4 on: July 05, 2018, 06:33:07 AM »
The described loading times sound abyssmal and may be related to some server (mis)configuration or blocked outgoing connection. While Hostbill *may* have gotten a bit slower over the years, it still loads perfectly for for me on PHP 5.6, in fact it has a much lower resource consumption that say an average Wordpress installation.

I assume you have root access to the server your Hostbill is running on. While PHP xdebug is mostly detected & blocked by ioncube, you could "strace" the PHP process of a login attempt to see what exactly it's waiting for. If for example you have a huge customer database and an active hard disk but Mysql runs on its default "8MB Ram" mode then the SQL "join" commands could take a lot of time to complete. However you should then be able to see the corresponding mysql long execution time warnings in your logs if you do monitor that as recommended.

This is my etc/my.cnf

[mysqld]
performance-schema=0
default-storage-engine=InnoDB
innodb_file_per_table=1
max_allowed_packet=536870912
open_files_limit=10000
sql_mode=NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION


What's yours ?
"strace" the PHP process seems pretty complex for my knowledge, I could have done it anyway but since today it seems to run much faster, maybe it was related to cache files that need it to be built for new version.

Offline d4f

  • 111
  • 5
  • Community Managers
  • Active Participant
  • ****
Re: Latest hostbill versions are slower ?
« Reply #5 on: July 05, 2018, 11:07:09 AM »
Mysql configuration depends on three major factors, so sharing a config won't do any good:
- Hardware environment (especially RAM and whether you have an SSD)
- Whether you run MariaDB or Mysql and which version
- What kind of requests your software mostly runs

There is a simple software to get basic recommendations, run the following script as root. You need to let statistics accumulate for 12-24 hours before using it  again after restarting Mysql, otherwise the recommendations are way off.
Code: [Select]
wget -O - http://mysqltuner.pl/ | perl
Quote
seems to run much faster, maybe it was related to cache files that need it to be built for new version.
Not hostbill cache files for sure, it only caches templates which only have a sub-second performance impact.
You may be right that caching is the cause of it working faster but either Mysql or linux disk read caching then. In any case, 20-30 second delays should never happen even with blank caches.

Quote
"strace" the PHP process seems pretty complex for my knowledge
Not at all complex to strace, you do need to understand what it does though.
Make sure you have no other PHP requests (so you find the correct one), then start the login in your webbrowser.
Quickly "ps aux | fgrep php" the process and "strace -p $PIDHERE" the process to attach it to the debugger.
It will then list you the current action (probably "wait") and anything it does after.
Copy what it does in the next 50 or so lines (careful! you may have passwords in that dump!) here so I can take a look at it.

Are you using Hostbill on a bare server or with some administrative software (Plesk, cPanel, ...) below it? I really don't want to offend anyone here however it seems you are lacking a lot of slightly-more-than-basic webmaster skills.