Skip to content

Instantly share code, notes, and snippets.

View AykutCevik's full-sized avatar
💭
I may be slow to respond.

Aykut Çevik AykutCevik

💭
I may be slow to respond.
View GitHub Profile
@AykutCevik
AykutCevik / nginx-tuning.md
Created April 10, 2019 15:20 — forked from denji/nginx-tuning.md
NGINX tuning for best performance

Moved to git repository: https://github.com/denji/nginx-tuning

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.

@AykutCevik
AykutCevik / keybase.md
Created September 15, 2018 18:57
keybase.md

Keybase proof

I hereby claim:

  • I am aykutcevik on github.
  • I am aykutcevik (https://keybase.io/aykutcevik) on keybase.
  • I have a public key whose fingerprint is ECF4 7E39 A853 294E B384 CC73 61F3 44FA 3B6C 1404

To claim this, I am signing this object:

@AykutCevik
AykutCevik / databaseSizes.sql
Created September 20, 2017 08:28
List MySQL databases with sizes
SELECT table_schema "database",
floor( sum( data_length + index_length ) / 1024 / 1024) "Data Base Size in MB",
floor(sum( data_free )/ 1024 / 1024 ) "Free Space in MB"
FROM information_schema.TABLES
GROUP BY table_schema ;
@AykutCevik
AykutCevik / gitCleaner.sh
Last active July 10, 2017 14:00
Git: Cleanup unnecessary files and optimize all the repositories in one directory
#!/bin/bash
find . -type d -depth 1 -exec git --git-dir={}/.git --work-tree=$PWD/{} gc --aggressive \;
@AykutCevik
AykutCevik / php71-memcached.rb
Created January 10, 2017 11:33
PHP 7.1 brew memcached (Mac OSX)
require "/usr/local/Homebrew/Library/Taps/homebrew/homebrew-php/Abstract/abstract-php-extension.rb"
class Php71Memcached < AbstractPhp71Extension
init
desc "Memcached via libmemcached library"
homepage "https://pecl.php.net/package/memcached"
head "https://github.com/php-memcached-dev/php-memcached.git", :branch => "php7"
option "with-sasl", "Build with sasl support"
@AykutCevik
AykutCevik / php71-apcu-bc.rb
Created January 10, 2017 11:33
PHP 7.1 brew APCU BC (Mac OSX)
require "/usr/local/Homebrew/Library/Taps/homebrew/homebrew-php/Abstract/abstract-php-extension.rb"
class Php71ApcuBc < AbstractPhp71Extension
init
desc "APC User Cache - BC"
homepage "https://pecl.php.net/package/apcu_bc"
url "https://pecl.php.net/get/apcu_bc-1.0.1.tgz"
sha256 "512674d891104d6da91811dbb89d28ab3faa356ee0ab4cbeae9bba9cf3e971cb"
head "https://github.com/krakjoe/apcu-bc.git"
@AykutCevik
AykutCevik / nginx.conf
Created February 11, 2016 13:55 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048