Performance – phpFox https://www.phpfox.com The future Social Community Software Wed, 22 Nov 2023 08:34:50 +0000 en-US hourly 1 https://wordpress.org/?v=6.4.1 https://freebookplatforms.com/uploads/2023/03/24002654/favicon.png Performance – phpFox https://www.phpfox.com 32 32 Freebook Platforms Mobile App version 1.3 Official Release https://www.phpfox.com/blog/2019/phpfox-mobile-app-version-1-3-official-release/ Tue, 09 Apr 2019 16:30:40 +0000 https://www.phpfox.com/?p=7352 How’s it going? We are happy to get back to you today and glad to announce that the phpFox Mobile App version 1.3 has been officially released. Before talking more the mobile version 1.3, we would like to share with you some compelling updates about our mobile apps.

Since the first release of iOS and Android apps, we are super excited that many clients are interested in using our Premium mobile apps. We have been receiving many requests to start Mobile Build service. Most of them were completed and their mobile apps are now available on Apple Store and Google Play. It’s fantastic, isn’t it? While working on Mobile Build projects, we are so thankful for many valuable suggestions, positive feedback as well as issue reports. They are a big motivation for us to continuously improve our mobile apps with more features as well as make them more stable. Now, let’s take a look at what’s new in the mobile version 1.3

phpFox Mobile App version 1.3

In this new mobile app version, on top of many bug fixes to make mobile apps more stable, we supported 3 main improvements / new features below:

– Monetization with Google Admob

– Performance and UI/UX Improvements

– Integration solution for 3rd-party apps

Monetization with Google Admob Integration

The mobile app version 1.3 support displaying ads by Google Admob. Mobile Ads can be configured easily in AdminCP. You can have either banner ads displaying on top or bottom or full-page ads (Interstitial, Rewarded type) of specific pages on mobile apps. You will see that many ads settings are supported, such as which location and how often ads display, ads priority, etc.

Performance and UI/UX Improvements

We always do care about the Performance, design, and user experience on phpFox mobile apps. In the aspect of performance, we improved the loading speed of both app and user content. We also use Lazy loading that the images are only loaded whenever they need to be displayed. These improvements and other native animations added make the phpFox mobile apps work obviously smoother and faster.

Integration solution for 3rd-party apps

We totally understand that 3rd-party phpFox apps are a very important part of every phpFox site as they help fulfill more functionalities. We have received many questions about how 3rd-party apps could work on phpFox Mobile Apps. In mobile version 1.3, our team has been working really hard to design and implement a mechanism for integration solution. Any 3rd-party experts can merely add necessary APIs to their phpFox apps to make their features work on the phpFox Mobile app. It is amazing, isn’t it? The detailed Development Guide has been prepared and will be published on phpFox Developer Documents very soon.

How to upgrade phpFox Mobile apps

It is necessary to note that the phpFox Mobile app version 1.3 is released along with Mobile API 4.2.0 and RESTful API 4.2.2. Please do not upgrade Mobile API if you are using Premium Mobile apps version older than mobile version 1.3. You can open a Mobile Build ticket in Client Area to request for Mobile upgrade from now.

What’s next?

In the next version of mobile apps, we are going to have the following features:

– Push notifications when having new messages

– Subscription

– Reactions and status with background

Have other suggestions? Please don’t hesitate to share with us.

Wanna get Premium mobile apps

You can merely purchase new or upgrade your phpFox license to ULTIMATE license to get Premium mobile apps. With Premium mobile apps, you can build your mobile apps under your branding. In particular, you can have:

– Change App Launch Screen, App Icon, Logo, etc.

– Change Color Scheme of your mobile app to comply with the web version

– Distribute mobile apps to Apple Store and Google Play under your Developer account.

]]>
Performance Enhancement in phpFox 4.7.0 https://www.phpfox.com/blog/2018/performance-enhancement-in-phpfox-4-7-0/ Mon, 26 Nov 2018 06:30:16 +0000 https://www.phpfox.com/?p=6580 As teased in the phpFox 4.7.0 Sneak peek, improving performance is one of the primary targets for phpFox 4.7.0 development. In this blog, we will discuss in more detail about performance enhancement in phpfox 4.7 by briefly describing the way we conduct the performance test, the test result and some further discussions about scalability with phpFox.

phpFox 4.7.0 Performance Enhancement

In recent years, phpFox is becoming the best platform for Niche Social Networks, and so there is an increasing amount of users all around the world. As you may know, performance has been one of the major care and we put a lot of effort for code restructuring for performance improvement in phpFox 4.4. In phpFox 4.7, we revised the platform performance again with the latest technologies and we realize that we can do it much better.

Testing Environment

 I. System Environment

  1. To simulate a common use case in which the whole system is deployed in one single dedicated server, we take a standard server with the following configurations
    1. Intel® Core™ i7-4790 CPU, 4 cores / 8 threads
    2. 16G RAM
    3. 250G SSD
    4. Ubuntu 16.04 OS
  2. The server is installed the following software
    1. Nginx version 1.14 as the web server.
    2. PHP-FPM with PHP version 7.2. The pool process manager is set to “ondemand” instead of the default “dynamic” setting. Opcache and APCu are also enabled. The “request_terminate_timeout” is set to “15s“.
    3. MySQL Community Server version 5.7.22.
    4. Redis server version 3.x as the cache layer.

 II. Dataset

  1. We install phpFox 4.7 and use the in-house data generation script to simulate a phpFox social network site with the following data
    1. All phpFox’s default apps are installed.
    2. 10,000 users with 200,000 membership relationships.
    3. Each app (such as photo, forum, blog, polls, events, quizzes, etc.) has approximate 30,000 items.
  2. The site statistics is attached as follows 11

 III. Testing Method

  1. We use Locust as a load testing tool. The Locust software runs with 4 slave threads on an Intel Xeon E3-1270 v6 CPU @ 3.80GHz (4 cores/8 threads) to be sure the load is put to the site properly.
  2. The test is conducted with the HTTPS protocol so that the cost for resolving SSL is also taken into place.
  3. Each virtual user will conduct the following activities
    1. First, visit the site home page.
    2. Next, login with his email and password. We force the locust script to pick different users for each session.
    3. After login, the virtual user will continuously visit all landing pages of activity feeds, member list, and all default apps (such as photo, forum, blog, polls, events, quizzes, etc.).
  4. Each test runs continuously at least 10 minutes at the highest load.

 IV. Acceptable Passing Criteria

A test can only consider being passed if it satisfies all the following criteria:

  1. All requests must respond less than 15 seconds. If one single request exceeds 15s, the test is failed.
  2. No single failed request during 10 minutes at the “peak” load.
  3. The software must handle at least 500 concurrent online logged-in users in one dedicated server with the above testing method.

Testing Results

 I. The number

Tl;dr: phpFox 4.7.0 passed the performance test with 600 concurrent online users as in the following screenshot:

phpfox-4.7 performance test result

Some detailed numbers are highlighted as follows:

  1. The system can handle more than 600 online users with the above configuration with no failed request.
  2. Average response times for all requests is ~ 7.x seconds.
  3. The system can handle ~ 105 Requests Per Second (RPS).

 II. Some Conclusions

The result between File Cache and Redis Cache settings are nearly the same in this system. However, when running on a non-SSD system with more writing operators, the Redis Cache setting proves to be better.

Comparing to the previous version (phpFox 4.6.1 – 27 RPS & 17s Average Response Time), phpFox 4.7.0 can handle more than 3x RPS and Average Response time is less than 1/2 on the same system configuration.

If your phpFox social network contains mostly browsing activities as in the test, the real online users might be higher since this test simulates concurrent online users.

The real concurrent number of users can also be higher this test since this test does not take the non-logged-in users into account. For non-logged-in requests, we can offload the application/database server by simply configuring your web server/proxy/load balancer to cache page content.

The test only focuses on “browsing” activities with no new content posting activities. Results will be different depending on the real member activities on different social network sites with different installed apps.

Further Discussions

We also conducted a similar performance test on a cluster of multiple servers. In this system, we utilize the following configuration to achieve much higher concurrent online users by splitting loads among servers:

  1. We use HAProxy as the high-performance load balancer.
  2. Nginx and PHP-FPM are used in application servers that serve phpFox source code. We also use Nginx micro cache for off-loading non-logged-in visits.
  3. For Database cluster, we utilize the latest MySQL Group Replication under a high-performance proxy to distribute database read and write loads among many database servers. Please be noted that supporting for MySQL Group Replication is only available from phpFox version 4.7.0.
  4. We utilize a Redis cluster for Caching purpose.

Maintaining a cluster of servers when users and the site traffic grows are tedious and complex work. So we always recommend our clients to move to a cloud-based environment such as Amazon Web Service when their site grows. Also, setting up an optimized environment for a growing social network with lots of user activities is not an easy task so we do provide all services for your growing site. Be sure to check our Services page to see what we are providing.

Final Words

As a result of the above tests on phpFox 4.7.0 performance, it’s a certainty to come up with a solid statement that this new version surely opens up a brand new and enjoyable experience to you when it comes to how well your social network handle requests and respond accordingly.

Share us your thought on how phpFox 4.7.0 performs on your Social Network by emailing us at hello@phpfox.com.

]]>
Freebook Platforms Neutron 4.4: Great Performance Improvement https://www.phpfox.com/blog/2016/neutron-4-4-great-performance-improvement/ Thu, 11 Aug 2016 06:53:14 +0000 https://blog.phpfox.com/?p=1372 Efficient Investment For Your Growing Business

The biggest challenge for Social Network Admins all time: what script is optimized for great performance and can scale up when the site is growing fast?

Here are a few options when it comes to the discussion:

  • Open Source Script and Commercial Social Network Scripts: easy to setup, can run on almost average servers. Mostly built based on existing frameworks, then it seems to be no problem to run on VPS. However, when it comes to thousands of members, it gets stuck, cannot load even scaled to run on very high servers. Technically, these scripts do not support that large-scale level. Many technicians say they can get it to work with a very nice proposal (cost is also high, of course), but the devil is in details.
  • Expensive and Enterprise Social Network Solutions: basically it can run for thousands of members but requires very high servers at the beginning, and more servers needed for the small increase in online members. It’s paid up to a number of your site members, not really suitable for a start-up niche social network.

Look no further with a very suitable solution – phpFox Neutron 4.4. phpFox team has spent a year to work on performance improvements, tested on many high traffic sites. Here are benefits you very soon will see when using phpFox Neutron 4.4 script:

  • Easy to setup with very rich, active marketplace, community.
  • Can easily run on most Hosting; then with around $160 your site can at least work for 10K members – easily respond to 1k online users. – https://www.linode.com/pricing.
  • Of course you’re likely to have 1M members very soon and your online members over 100K and much more. In this case, it requires an enterprise solution. Don’t worry, your phpFox script is built to ready for this. All preparations are done, you just need to ask, our expert will be at your service.

Neutron 4.4: The Great Performance Improvement

  • Improved to nearly 3 times faster than phpFox Neutron 4.3 (*); and more than 4 times faster than phpFox Neutron 4.2 (*)
  • The more data the site has, the slower 4.3 and 4.2 are, due to not-optimize in database queries.
  • With a certain number of online members, 4.3 and 4.2 might get stuck due to high requests to servers – which we will see further when doing stress tests with phpFox 4.4. The result for 4.4 will be shown in the next section.
4.3 Benchmark Result

phpFox 4.3 Performance Benchmark

4.2 Benchmark Result

4.2 Benchmark

(*) Measure with the same size of data:

  • 10,000 members
  • 200,000 membership relation
  • 30,000 item counts per modules: photo, blog, etc.
  • On the same 8-Core server
  • Load time is measured over 5 minutes high load with 200 VUs reaching all landing pages of all available default modules: ex. Home, music, photo, blog, forum, marketplace, pages, etc. Neutron 4.4 has the Group Application.
  • Member only network, disable Ajax.
  • Redis is off and Cache is off.

Neutron 4.4: The High Load Tolerance

Besides comparison with previous versions, we have done many stress tests to make sure phpFox is capable to handle large online members when running on average server configuration.

Here are measurements we benchmark with two scenarios:

  1. Scenario for 10.000 member, data size at (200,000 Memberships, 30,000 items in each modules), over one 8-core server – $160 per month.
  2. Scenario with 100.000 member, data size at (2.000.000 Memberships, 300,000 items in each modules), over two 8-core servers – $320 per month. 

Notice and Disclaimer:

  • Online members is mostly 2% of total members, which means the average number within 5 minutes, 2% of your site members are online.
  • Ratio VUs over online members: 1 VU is in average about 5 online members; for information about VU – http://support.loadimpact.com/knowledgebase/articles/174260-what-are-virtual-users-vus
  • Cost based on Linode pricing – https://www.linode.com/pricing, not take into account cost for extra storage, bandwidth which is for specific purpose site, such as videos, images.
  • Tested with phpFox 4.4, using LoadImpact, perform on site with given scenarios – accessing to all landing pages of default applications on 5 minutes average at the highest load.
  • AWS pricing is much higher than other providers

Chart 1 (which is stressed to 200 VUs)

Up to 1,000 online members at onetime, 10,000 members

phpFox 4.3 Performance Benchmark

Detail loading time:

4.4 Stress Test

Chart 2 – (which is stressed to 500 VUs)

Up to 2,500 online members at onetime, 100,000 members

4.4 Stress Test

Detail loading time:

4.4 Stress Test - Loading Time

From above graphs, you certainly have quite a lot of information to make a final decision, we shall not talk more. Then, smart invest for now, get high return in future.

Reference:

]]>