{"action":"created","comment":{"url":"https://api.github.com/repos/openshift/mysql/pulls/comments/59912273","id":59912273,"diff_hunk":"@@ -9,12 +9,15 @@ lower_case_table_names = ${MYSQL_LOWER_CASE_TABLE_NAMES}\n # The maximum permitted number of simultaneous client connections. Default: 151\n max_connections = ${MYSQL_MAX_CONNECTIONS}\n \n-# The minimum length of the word to be included in a FULLTEXT index. Default: 4\n+# The minimum/maximum lengths of the word to be included in a FULLTEXT index. Default: 4/20","path":"5.5/root/usr/share/container-scripts/mysql/my-paas.cnf.template","position":5,"original_position":5,"commit_id":"d22ac9bd804dfbe35013b9f2601b123594431de5","original_commit_id":"d22ac9bd804dfbe35013b9f2601b123594431de5","user":{"login":"php-coder","id":87088,"avatar_url":"https://avatars.githubusercontent.com/u/87088?v=3","gravatar_id":"","url":"https://api.github.com/users/php-coder","html_url":"https://github.com/php-coder","followers_url":"https://api.github.com/users/php-coder/followers","following_url":"https://api.github.com/users/php-coder/following{/other_user}","gists_url":"https://api.github.com/users/php-coder/gists{/gist_id}","starred_url":"https://api.github.com/users/php-coder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/php-coder/subscriptions","organizations_url":"https://api.github.com/users/php-coder/orgs","repos_url":"https://api.github.com/users/php-coder/repos","events_url":"https://api.github.com/users/php-coder/events{/privacy}","received_events_url":"https://api.github.com/users/php-coder/received_events","type":"User","site_admin":false},"body":"Yes, I've just put together similar parameters. I can remove it if you want.","created_at":"2016-04-15T17:44:01Z","updated_at":"2016-04-15T17:44:01Z","html_url":"https://github.com/openshift/mysql/pull/130#discussion_r59912273","pull_request_url":"https://api.github.com/repos/openshift/mysql/pulls/130","_links":{"self":{"href":"https://api.github.com/repos/openshift/mysql/pulls/comments/59912273"},"html":{"href":"https://github.com/openshift/mysql/pull/130#discussion_r59912273"},"pull_request":{"href":"https://api.github.com/repos/openshift/mysql/pulls/130"}}},"pull_request":{"url":"https://api.github.com/repos/openshift/mysql/pulls/130","id":66676298,"html_url":"https://github.com/openshift/mysql/pull/130","diff_url":"https://github.com/openshift/mysql/pull/130.diff","patch_url":"https://github.com/openshift/mysql/pull/130.patch","issue_url":"https://api.github.com/repos/openshift/mysql/issues/130","number":130,"state":"open","locked":false,"title":"[WIP] Porting MySQL tuning from V2","user":{"login":"php-coder","id":87088,"avatar_url":"https://avatars.githubusercontent.com/u/87088?v=3","gravatar_id":"","url":"https://api.github.com/users/php-coder","html_url":"https://github.com/php-coder","followers_url":"https://api.github.com/users/php-coder/followers","following_url":"https://api.github.com/users/php-coder/following{/other_user}","gists_url":"https://api.github.com/users/php-coder/gists{/gist_id}","starred_url":"https://api.github.com/users/php-coder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/php-coder/subscriptions","organizations_url":"https://api.github.com/users/php-coder/orgs","repos_url":"https://api.github.com/users/php-coder/repos","events_url":"https://api.github.com/users/php-coder/events{/privacy}","received_events_url":"https://api.github.com/users/php-coder/received_events","type":"User","site_admin":false},"body":"This PR ports MySQL configuration and tuning from [V2 cartridge](https://github.com/openshift/origin-server/blob/73197c277b9ce9044be67a4e23b9951d120bc663/cartridges/openshift-origin-cartridge-mysql/conf/my.cnf.erb).\r\n\r\nIt also adds new parameters that can be configured:\r\n- `MYSQL_MAX_ALLOWED_PACKET`\r\n- `MYSQL_TABLE_OPEN_CACHE`\r\n- `MYSQL_SORT_BUFFER_SIZE`\r\n- `MYSQL_KEY_BUFFER_SIZE`\r\n- `MYSQL_READ_BUFFER_SIZE`\r\n- `MYSQL_INNODB_BUFFER_POOL_SIZE`\r\n- `MYSQL_INNODB_LOG_FILE_SIZE`\r\n- `MYSQL_INNODB_LOG_BUFFER_SIZE`\r\n\r\nWhen container has limited amount of memory a couple of parameters (`MYSQL_KEY_BUFFER_SIZE` and `MYSQL_INNODB_*`) calculated dynamically.\r\n\r\nI changed a few default values:\r\n- `table_open_cache` (4 -> 400, because 4 is too small value and I decided to use default value from MySQL itself)\r\n- `innodb_log_file_size` (16M -> 8M, because there is a comment that suggest to set it to 25 % of buffer pool size that has default value 32M)\r\n-  `innodb_log_buffer_size` (16M -> 8M, because there is a comment that suggests to set it to 25 % of buffer pool size that has default value 32M)\r\n\r\nQuestions for discuss:\r\n- I didn't port parameters for `default-storage-engine` and `default-time-zone` because they require special bash-coding. Sshould I port them too?\r\n- All configuration in `/etc/my.cnf.d/tuning.cnf` -- is it normal file name? Maybe it's better to rename it or even merge with already existing configs?\r\n\r\nPTAL @bparees @rhcarvalho @mnagy @mfojtik \r\n\r\nRelated issues:\r\n- https://trello.com/c/JH769zUA/893-3-update-mysql-image-to-autoconfigure-based-on-available-memory-evg\r\n- https://trello.com/c/p3y4Glt4/902-add-max-allowed-packet-as-an-environment-variable-to-the-mysql-images\r\n- https://bugzilla.redhat.com/show_bug.cgi?id=1326523\r\n\r\nNeed to be done:\r\n- [ ] write tests\r\n- [ ] `README.md`: document auto-tuning\r\n- [ ] update openshift-docs\r\n- [ ] apply changes to 5.6 (after getting feedback here)\r\n- [ ] ensure that MySQL replication works\r\n","created_at":"2016-04-15T17:22:42Z","updated_at":"2016-04-15T17:44:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bd8e48cbb9fc53a39d1a2402830f4cdad0c5c01c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/openshift/mysql/pulls/130/commits","review_comments_url":"https://api.github.com/repos/openshift/mysql/pulls/130/comments","review_comment_url":"https://api.github.com/repos/openshift/mysql/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openshift/mysql/issues/130/comments","statuses_url":"https://api.github.com/repos/openshift/mysql/statuses/d22ac9bd804dfbe35013b9f2601b123594431de5","head":{"label":"php-coder:port_v2_settings","ref":"port_v2_settings","sha":"d22ac9bd804dfbe35013b9f2601b123594431de5","user":{"login":"php-coder","id":87088,"avatar_url":"https://avatars.githubusercontent.com/u/87088?v=3","gravatar_id":"","url":"https://api.github.com/users/php-coder","html_url":"https://github.com/php-coder","followers_url":"https://api.github.com/users/php-coder/followers","following_url":"https://api.github.com/users/php-coder/following{/other_user}","gists_url":"https://api.github.com/users/php-coder/gists{/gist_id}","starred_url":"https://api.github.com/users/php-coder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/php-coder/subscriptions","organizations_url":"https://api.github.com/users/php-coder/orgs","repos_url":"https://api.github.com/users/php-coder/repos","events_url":"https://api.github.com/users/php-coder/events{/privacy}","received_events_url":"https://api.github.com/users/php-coder/received_events","type":"User","site_admin":false},"repo":{"id":56078163,"name":"mysql","full_name":"php-coder/mysql","owner":{"login":"php-coder","id":87088,"avatar_url":"https://avatars.githubusercontent.com/u/87088?v=3","gravatar_id":"","url":"https://api.github.com/users/php-coder","html_url":"https://github.com/php-coder","followers_url":"https://api.github.com/users/php-coder/followers","following_url":"https://api.github.com/users/php-coder/following{/other_user}","gists_url":"https://api.github.com/users/php-coder/gists{/gist_id}","starred_url":"https://api.github.com/users/php-coder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/php-coder/subscriptions","organizations_url":"https://api.github.com/users/php-coder/orgs","repos_url":"https://api.github.com/users/php-coder/repos","events_url":"https://api.github.com/users/php-coder/events{/privacy}","received_events_url":"https://api.github.com/users/php-coder/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/php-coder/mysql","description":"","fork":true,"url":"https://api.github.com/repos/php-coder/mysql","forks_url":"https://api.github.com/repos/php-coder/mysql/forks","keys_url":"https://api.github.com/repos/php-coder/mysql/keys{/key_id}","collaborators_url":"https://api.github.com/repos/php-coder/mysql/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/php-coder/mysql/teams","hooks_url":"https://api.github.com/repos/php-coder/mysql/hooks","issue_events_url":"https://api.github.com/repos/php-coder/mysql/issues/events{/number}","events_url":"https://api.github.com/repos/php-coder/mysql/events","assignees_url":"https://api.github.com/repos/php-coder/mysql/assignees{/user}","branches_url":"https://api.github.com/repos/php-coder/mysql/branches{/branch}","tags_url":"https://api.github.com/repos/php-coder/mysql/tags","blobs_url":"https://api.github.com/repos/php-coder/mysql/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/php-coder/mysql/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/php-coder/mysql/git/refs{/sha}","trees_url":"https://api.github.com/repos/php-coder/mysql/git/trees{/sha}","statuses_url":"https://api.github.com/repos/php-coder/mysql/statuses/{sha}","languages_url":"https://api.github.com/repos/php-coder/mysql/languages","stargazers_url":"https://api.github.com/repos/php-coder/mysql/stargazers","contributors_url":"https://api.github.com/repos/php-coder/mysql/contributors","subscribers_url":"https://api.github.com/repos/php-coder/mysql/subscribers","subscription_url":"https://api.github.com/repos/php-coder/mysql/subscription","commits_url":"https://api.github.com/repos/php-coder/mysql/commits{/sha}","git_commits_url":"https://api.github.com/repos/php-coder/mysql/git/commits{/sha}","comments_url":"https://api.github.com/repos/php-coder/mysql/comments{/number}","issue_comment_url":"https://api.github.com/repos/php-coder/mysql/issues/comments{/number}","contents_url":"https://api.github.com/repos/php-coder/mysql/contents/{+path}","compare_url":"https://api.github.com/repos/php-coder/mysql/compare/{base}...{head}","merges_url":"https://api.github.com/repos/php-coder/mysql/merges","archive_url":"https://api.github.com/repos/php-coder/mysql/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/php-coder/mysql/downloads","issues_url":"https://api.github.com/repos/php-coder/mysql/issues{/number}","pulls_url":"https://api.github.com/repos/php-coder/mysql/pulls{/number}","milestones_url":"https://api.github.com/repos/php-coder/mysql/milestones{/number}","notifications_url":"https://api.github.com/repos/php-coder/mysql/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/php-coder/mysql/labels{/name}","releases_url":"https://api.github.com/repos/php-coder/mysql/releases{/id}","deployments_url":"https://api.github.com/repos/php-coder/mysql/deployments","created_at":"2016-04-12T16:05:35Z","updated_at":"2016-04-12T16:05:36Z","pushed_at":"2016-04-15T16:57:15Z","git_url":"git://github.com/php-coder/mysql.git","ssh_url":"git@github.com:php-coder/mysql.git","clone_url":"https://github.com/php-coder/mysql.git","svn_url":"https://github.com/php-coder/mysql","homepage":null,"size":190,"stargazers_count":0,"watchers_count":0,"language":"Shell","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"openshift:master","ref":"master","sha":"955dc262fa4f68182609fc47aecabadf3aac6919","user":{"login":"openshift","id":792337,"avatar_url":"https://avatars.githubusercontent.com/u/792337?v=3","gravatar_id":"","url":"https://api.github.com/users/openshift","html_url":"https://github.com/openshift","followers_url":"https://api.github.com/users/openshift/followers","following_url":"https://api.github.com/users/openshift/following{/other_user}","gists_url":"https://api.github.com/users/openshift/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift/subscriptions","organizations_url":"https://api.github.com/users/openshift/orgs","repos_url":"https://api.github.com/users/openshift/repos","events_url":"https://api.github.com/users/openshift/events{/privacy}","received_events_url":"https://api.github.com/users/openshift/received_events","type":"Organization","site_admin":false},"repo":{"id":31020442,"name":"mysql","full_name":"openshift/mysql","owner":{"login":"openshift","id":792337,"avatar_url":"https://avatars.githubusercontent.com/u/792337?v=3","gravatar_id":"","url":"https://api.github.com/users/openshift","html_url":"https://github.com/openshift","followers_url":"https://api.github.com/users/openshift/followers","following_url":"https://api.github.com/users/openshift/following{/other_user}","gists_url":"https://api.github.com/users/openshift/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift/subscriptions","organizations_url":"https://api.github.com/users/openshift/orgs","repos_url":"https://api.github.com/users/openshift/repos","events_url":"https://api.github.com/users/openshift/events{/privacy}","received_events_url":"https://api.github.com/users/openshift/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openshift/mysql","description":"","fork":false,"url":"https://api.github.com/repos/openshift/mysql","forks_url":"https://api.github.com/repos/openshift/mysql/forks","keys_url":"https://api.github.com/repos/openshift/mysql/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openshift/mysql/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openshift/mysql/teams","hooks_url":"https://api.github.com/repos/openshift/mysql/hooks","issue_events_url":"https://api.github.com/repos/openshift/mysql/issues/events{/number}","events_url":"https://api.github.com/repos/openshift/mysql/events","assignees_url":"https://api.github.com/repos/openshift/mysql/assignees{/user}","branches_url":"https://api.github.com/repos/openshift/mysql/branches{/branch}","tags_url":"https://api.github.com/repos/openshift/mysql/tags","blobs_url":"https://api.github.com/repos/openshift/mysql/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openshift/mysql/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openshift/mysql/git/refs{/sha}","trees_url":"https://api.github.com/repos/openshift/mysql/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openshift/mysql/statuses/{sha}","languages_url":"https://api.github.com/repos/openshift/mysql/languages","stargazers_url":"https://api.github.com/repos/openshift/mysql/stargazers","contributors_url":"https://api.github.com/repos/openshift/mysql/contributors","subscribers_url":"https://api.github.com/repos/openshift/mysql/subscribers","subscription_url":"https://api.github.com/repos/openshift/mysql/subscription","commits_url":"https://api.github.com/repos/openshift/mysql/commits{/sha}","git_commits_url":"https://api.github.com/repos/openshift/mysql/git/commits{/sha}","comments_url":"https://api.github.com/repos/openshift/mysql/comments{/number}","issue_comment_url":"https://api.github.com/repos/openshift/mysql/issues/comments{/number}","contents_url":"https://api.github.com/repos/openshift/mysql/contents/{+path}","compare_url":"https://api.github.com/repos/openshift/mysql/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openshift/mysql/merges","archive_url":"https://api.github.com/repos/openshift/mysql/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openshift/mysql/downloads","issues_url":"https://api.github.com/repos/openshift/mysql/issues{/number}","pulls_url":"https://api.github.com/repos/openshift/mysql/pulls{/number}","milestones_url":"https://api.github.com/repos/openshift/mysql/milestones{/number}","notifications_url":"https://api.github.com/repos/openshift/mysql/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openshift/mysql/labels{/name}","releases_url":"https://api.github.com/repos/openshift/mysql/releases{/id}","deployments_url":"https://api.github.com/repos/openshift/mysql/deployments","created_at":"2015-02-19T15:03:58Z","updated_at":"2016-04-07T16:58:53Z","pushed_at":"2016-04-15T17:22:43Z","git_url":"git://github.com/openshift/mysql.git","ssh_url":"git@github.com:openshift/mysql.git","clone_url":"https://github.com/openshift/mysql.git","svn_url":"https://github.com/openshift/mysql","homepage":null,"size":279,"stargazers_count":17,"watchers_count":17,"language":"Shell","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":30,"mirror_url":null,"open_issues_count":8,"forks":30,"open_issues":8,"watchers":17,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openshift/mysql/pulls/130"},"html":{"href":"https://github.com/openshift/mysql/pull/130"},"issue":{"href":"https://api.github.com/repos/openshift/mysql/issues/130"},"comments":{"href":"https://api.github.com/repos/openshift/mysql/issues/130/comments"},"review_comments":{"href":"https://api.github.com/repos/openshift/mysql/pulls/130/comments"},"review_comment":{"href":"https://api.github.com/repos/openshift/mysql/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openshift/mysql/pulls/130/commits"},"statuses":{"href":"https://api.github.com/repos/openshift/mysql/statuses/d22ac9bd804dfbe35013b9f2601b123594431de5"}}}}