We're looking at CPU bandwidth control via CFS:
Program does number of iterations, in each iteration we burn CPU in small chunks until we get 5ms of real time spent. On each iteration we also print how much
| # Profiling single php request | |
| The goal of this document is to give instructions for enable profiling | |
| Steps: | |
| ## Enable php xdebug module | |
| ```bash | |
| PHP_VERSION=7.2 | |
| cat > /etc/php/7.2/apache2/conf.d/20-xdebug.ini <<EOF | |
| zend_extension=xdebug.so | |
| xdebug.profiler_enable_trigger=1 |
| # find the kube node of the running pod, appear next to hostIP, and note containerID hash | |
| kubectl get pod mypod -o json | |
| # -> save hostIP | |
| # -> save containerID | |
| # connect to the node and find the pods unique network interface index inside it's container | |
| docker exec containerID /bin/bash -c 'cat /sys/class/net/eth0/iflink' | |
| # -> returns index | |
| # locate the interface of the node |
We're looking at CPU bandwidth control via CFS:
Program does number of iterations, in each iteration we burn CPU in small chunks until we get 5ms of real time spent. On each iteration we also print how much
Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.
This content from this markdown file has moved a new, happier home where it can serve more people. Please check it out : https://docs.microsoft.com/azure/azure-cache-for-redis/cache-best-practices.
| """ | |
| Copies all keys from the source Redis host to the destination Redis host. | |
| Useful to migrate Redis instances where commands like SLAVEOF and MIGRATE are | |
| restricted (e.g. on Amazon ElastiCache). | |
| The script scans through the keyspace of the given database number and uses | |
| a pipeline of DUMP and RESTORE commands to migrate the keys. | |
| Requires Redis 2.8.0 or higher. |