Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Sane threshold defaults for options

39 views
Skip to first unread message

Alfie

unread,
Oct 25, 2011, 8:31:34 PM10/25/11
to Percona Dev
Hi,

I'm running pt-table-checksum and it's getting stuck:

"Pausing because Threads_connected=1, Threads_running=1"

Being unfamiliar with the tool I had to dive into the code to see what
was happening. I found that the threshold value for connection and
running threads was being hit. It's calculated in
MySQLStatusWaiter::_parse_spec() using:

my $init_val = $get_status->($var);
$val = int(($init_val * .20) + $init_val);

Here, $init_val is taken from:

SHOW GLOBAL STATUS LIKE 'Threads_connected'
SHOW GLOBAL STATUS LIKE 'Threads_running'

On a production machine, this might make sense since given for example
20 connections, the maximum threshold is 24. But on a development box
with no clients running, the maximum threshold is 1.

Should there be some sane minimum defaults? Or to help out the next
person who tries to run it and gets the same thing, maybe the pause
message change be changed to something like:

Pausing because the load has reached the maximum thresholds for:

Threads_connected=1
Threads_running=1

Try increasing the thresholds with:

--max-load Threads_connected=5,Threads_running=5

Or something like that.

Alfie

Baron Schwartz

unread,
Nov 7, 2011, 4:34:52 PM11/7/11
to perco...@googlegroups.com
Alfie,

Thanks. We are changing the default for this. Hard to pick a good
default, but it will be Threads_running:25 (or was it 30?) by default.
The DBA should choose a better value; but that is at least a throttle
on "ok this is insane and should never happen."

> --
> You received this message because you are subscribed to the Google Groups "Percona Dev" group.
> To post to this group, send email to perco...@googlegroups.com.
> To unsubscribe from this group, send email to percona-dev...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/percona-dev?hl=en.
>
>

--
Baron Schwartz
Percona Inc <http://www.percona.com/>
Consulting, Training, Support & Services for MySQL

Alfie John

unread,
Nov 17, 2011, 4:41:31 PM11/17/11
to perco...@googlegroups.com
On Monday, November 07, 2011 4:34 PM, "Baron Schwartz"

<ba...@percona.com> wrote:
> Thanks. We are changing the default for this. Hard to pick a good
> default, but it will be Threads_running:25 (or was it 30?) by default.
> The DBA should choose a better value; but that is at least a throttle
> on "ok this is insane and should never happen."

Thinking about it more, I guess whatever value you pick somebody will
have issue with it. Maybe a higher number like 25/30 is at least a good
start but I think having an explanatory error message might be worth
more?

Alfie

--
Alfie John
alf...@opera.com

Alfie John

unread,
Nov 17, 2011, 5:06:28 PM11/17/11
to perco...@googlegroups.com
On Friday, November 18, 2011 8:41 AM, "Alfie John" <alf...@opera.com>
wrote:

> Thinking about it more, I guess whatever value you pick somebody will
> have issue with it. Maybe a higher number like 25/30 is at least a good
> start but I think having an explanatory error message might be worth
> more?

Ignore that one. I just saw the diff... well documented now.

Reply all
Reply to author
Forward
0 new messages