Created
July 7, 2018 09:46
-
-
Save franzramadhan/0eb22d5b70ec23b4eed157a92e625901 to your computer and use it in GitHub Desktop.
Calculate Before Gcache Overwritten
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MariaDB [(none)]> set @start := (select sum(VARIABLE_VALUE/1024/1024) from information_schema.global_status where VARIABLE_NAME like 'WSREP%bytes'); do sleep(60); set @end := (slect sum(VARIABLE_VALUE/1024/1024) from information_schema.global_status where VARIABLE_NAME like 'WSREP%bytes'); set @gcache := (select SUBSTRING_INDEX(SUBSTRING_INDEX(@@GLOBALwsrep_provider_options,'gcache.size = ',-1), 'M', 1)); select round((@end - @start),2) as `MB/min`, round((@end - @start),2) * 60 as `MB/hour`, @gcache as `gcache Size(MB)`, roud(@gcache/round((@end - @start),2),2) as `Time to full(minutes)`; | |
Query OK, 0 rows affected (0.05 sec) | |
Query OK, 0 rows affected (1 min 0.00 sec) | |
Query OK, 0 rows affected (0.00 sec) | |
Query OK, 0 rows affected (0.00 sec) | |
+--------+---------+-----------------+-----------------------+ | |
| MB/min | MB/hour | gcache Size(MB) | Time to full(minutes) | | |
+--------+---------+-----------------+-----------------------+ | |
| 2.88 | 172.80 | 1024 | 355.56 | | |
+--------+---------+-----------------+-----------------------+ | |
1 row in set (0.01 sec) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment