Categories
Scalability Web API

Slim Vs Silex – API performance

Slim php framework is faster than Silex

 

Silex Framework

[davidr@davidr silex]$ ab -n500 -c11 ‘http://silex.davidr.sbx.over.com/hello/raleche/’
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking silex.davidr.sbx.over.com (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Finished 500 requests

Server Software: Apache
Server Hostname: silex.davidr.sbx.over.com
Server Port: 80

Document Path: /hello/raleche/
Document Length: 300 bytes

Concurrency Level: 11
Time taken for tests: 5.648 seconds
Complete requests: 500
Failed requests: 0
Write errors: 0
Non-2xx responses: 500
Total transferred: 259000 bytes
HTML transferred: 150000 bytes
Requests per second: 88.52 [#/sec] (mean)
Time per request: 124.261 [ms] (mean)
Time per request: 11.296 [ms] (mean, across all concurrent requests)
Transfer rate: 44.78 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.0 0 0
Processing: 61 122 20.2 120 226
Waiting: 61 122 20.2 120 226
Total: 61 122 20.2 120 226

Percentage of the requests served within a certain time (ms)
50% 120
66% 128
75% 133
80% 137
90% 146
95% 161
98% 170
99% 173
100% 226 (longest request)

 

Slim framework

davidr@davidr silex]$ ab -n500 -c11 ‘http://slim.davidr.sbx.over.com/hello/raleche/’
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking slim.davidr.sbx.over.com (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Finished 500 requests

Server Software: Apache
Server Hostname: slim.davidr.sbx.over.com
Server Port: 80

Document Path: /hello/raleche/
Document Length: 890 bytes

Concurrency Level: 11
Time taken for tests: 4.672 seconds
Complete requests: 500
Failed requests: 0
Write errors: 0
Non-2xx responses: 500
Total transferred: 536500 bytes
HTML transferred: 445000 bytes
Requests per second: 107.02 [#/sec] (mean)
Time per request: 102.781 [ms] (mean)
Time per request: 9.344 [ms] (mean, across all concurrent requests)
Transfer rate: 112.14 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.0 0 0
Processing: 41 85 38.1 83 869
Waiting: 41 85 38.1 83 868
Total: 41 85 38.1 83 869

Percentage of the requests served within a certain time (ms)
50% 83
66% 89
75% 93
80% 96
90% 101
95% 109
98% 115
99% 126
100% 869 (longest request)

 

 

 

Categories
Programming Scalability Symfony

Symfony Profiler – enjoy programming – symfony helper

http://symfony.app/_profiler

Categories
Scalability

Speep Up WordPress deactivate wp-cron

  1. Go to the bottom of the database settings in wp-config.php typically around line 37.Add the code below highlighted in red:
    /** The Database Collate type. Don't change this if in doubt. */
    define('DB_COLLATE', '');
    
    define('DISABLE_WP_CRON', true);
    
  2. Click Save
Categories
REDIS Scalability

Using a Redis Server

Using a Redis Server

Redis Command line

 redis-cli -h 127.0.0.1 -p 6379

Helper

zincrby ‘trending_threads’ 1 ‘Some Thread Title’

zrange ‘trending_threads’ 0 -1

zrange ‘trending_threads’ 0 -1 WITHSCORES

zrange ‘trending_threads’ 0 -1