Add a GLOBAL UPPER bound to cap SORT BUFFER memory use
I would like to put in a request to have a cap on the upper bound for the per connection Drizzle memory parameters such as sort buffer size.
Similar to the IBM DB2 on LUW implementation, I'd like us to add an upper bound threshold that cannot ever be crossed for memory use on sort heap size globally across all databases.
So allow the per connection sort_buffer_size as it currently exists.
But add another variable called say "sort_heap_
If the same can be done for join buffers, read buffers, read random buffers, etc. then that would be even nicer and allow DBAs to control memory and prevent issues such as OOM killers and swapping.
UPDATE:
======
Please also apply the same logic that you apply for sort buffer global upper cap, to include GLOBAL upper caps for the following buffers:
1) join_buffer_size global upper cap
2) read_buffer_size global upper cap
3) read_rnd_
Blueprint information
- Status:
- Complete
- Approver:
- Lee Bieber
- Priority:
- High
- Drafter:
- None
- Direction:
- Needs approval
- Assignee:
- Andrew Hutchings
- Definition:
- Approved
- Series goal:
- Accepted for 7.0
- Implementation:
- Implemented
- Milestone target:
- 2010-11-08
- Started by
- Andrew Hutchings
- Completed by
- Lee Bieber
Whiteboard
The thing to note here is that the request is for a GLOBAL upper cap for the sum of all sort buffers across all running threads.
So if 100k users are connected and each issues a sort, that will not allocate 100k*sort_
Rackspace request
Implementation:
To be implemented using atomic counters
Work items:
Create template for atomic global threshold: DONE
Unittests for new template: DONE
Implement for sort_buffer_size: DONE
Implement for join_buffer_size: DONE
Implement for read_buffer_size: DONE
Implement for read_rnd_
DTR test cases: DONE
Sphinx documentation: DONE
Notes:
Can only test join buffer and read buffer constraints in DTR due to recent changes in drizzleslap. See the test case files for ways of manually testing it.