Tech geek. Life geek.

Tag: “Digital Ocean”

PHP Benchmark of php 7.4.3 on a VPS

It is a performance test for PHP Benchmark on a VPS at a DigitalOcean droplet.
The server is located at San Francisco Datacenter 2.
Here is the system information:
Operating system Ubuntu Linux 20.04
Webmin version 1.941
Time on system Sun Apr 26 18:41:34 2020
Kernel and CPU Linux 5.4.0-26-generic on x86_64
Processor information Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz, 1 cores

The VPS has 1 CPU, 1GB RAM, 25GB Storage.

The php I installed on the VPS is just from the Ubuntu 20.04. It is php 7.4.3.

phpinfo of php v7.4.3

How To test the PHP benchmark.

I tested 7 times. So get rid of the highest one, and the lowest one. Get the average of the rest five scores.

--------------------------------------
|        PHP BENCHMARK SCRIPT        |
--------------------------------------
Start : 2020-04-26 18:36:58
Server : u20.webexample.win@206.189.213.58
PHP version : 7.4.3
Platform : Linux
--------------------------------------
test_math                 : 0.505 sec.
test_stringmanipulation   : 0.503 sec.
test_loops                : 0.223 sec.
test_ifelse               : 0.130 sec.
--------------------------------------
Total time:               : 1.361 sec.

The average results are 1.375sec.

Use GoAccess to Generate Report with Multiple Nginx Log Files

I have a VPS with Nginx as a web server and also a lot of web sites on it. It is on Digital Ocean.

Here is the VPS basic information.

  • SFO2
  • 1GB Nanode
  • Ubuntu Linux 18.04.2
  • Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz, 1 cores
  • Nginx 1.15.9

All sites use one access.log file. The following code is in the http block of /etc/nginx/nginx.conf file.

log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';

access_log /var/log/nginx/access.log main;

All access logs look like below:

Now it is time to show you how to use GoAccess to Generate Report with Multiple Nginx Log files.

Install GoAccess

sudo install goaccess

 

Modify the Config file of GoAccess

GoAccess config file is located at /etc/

sudo nano /etc/goaccess.conf

Add the following code or modify the code inside of the goaccess.conf.

time-format %H:%M:%S

date-format %d/%b/%Y

log-format %h %^[%d:%t %^] "%r" %s %b "%R" "%u"

Run GoAccess to generate the report

I would like to get a static report.

sudo goaccess /var/log/nginx/access.log -o /home/davidyin/mywebsite.com/report.html --log-format=COMBINED

The report looks like below:

Due to the log is not just one file. The log files are generated by date and also compressed.

Two log files are not compressed.

  • access.log
  • access.log.1

The older log files are compressed.

  • access.log.2.gz
  • access.log.3.gz
  • access.log.4.gz
  • access.log.5.gz

I want to generate all the access log files. So the command is changed to the way which can phrase multiple log files.

zcat /var/log/nginx/access.log.*.gz | goaccess /var/log/nginx/access.log /var/log/nginx/access.log.1 - -o /home/davidyin/mywebsite.com/report.html --log-format=COMBINED

The sample command above using mywebsite.com. Please replace it with your own sites.

At the last, I add this command into Cron jobs. Schedule it every hour.

Move to Linode Server

When you saw this post, it means the blog is moved to a new server at Linode.

New server is a little bit better than the old one at DigitalOcean.

Here is how old server looks like:

  • Operating system     Ubuntu Linux 14.04.4
  • Kernel and CPU     Linux 3.13.0-88-generic on x86_64
  • Processor information     Intel(R) Xeon(R) CPU E5-2630L v2 @ 2.40GHz, 1 cores
  • 1 GB RAM
  • 20 GB Storage SSD

digitalocean-spotlight

New server at Linode has following specs:

  • Operating system     Ubuntu Linux 16.04
  • Kernel and CPU     Linux 4.6.3-x86_64-linode70 on x86_64
  • Processor information     Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz, 1 cores
  • 2 GB RAM
  • 24GB Storage SSD

linode-brentwood Continue reading

Bench test result of DigitalOcean Singapore Datacenter (SGP1)

DigitalOcean announced Singapore Datacenter (SGP1)  vi. It is a new node physically in Asia. A lot of Chinese webmasters rushed to it.

I created a new droplet at SGP1. Just minimum size droplet.

  • 512MB/1CPU
  • 20GB SSD Disk
  • 1TB Transfer
  • Singapore Region
  • CentOS 6.5 x32
  • $5/month

sgp1-droplet

Go to ServerBear site and get the testing command and paste into the terminal window. The command will update the system and install the necessary packages, then run the bench tasks.

The result as below: Continue reading

© 2020 David Yin's Blog

Theme by Anders NorenUp ↑