[debian-mysql] Bug#430684: Calculating the timeout instead of using a configuration setting.
sean finney
seanius at debian.org
Wed Jun 27 17:03:13 UTC 2007
On Wednesday 27 June 2007 15:52:02 Paul Veldema wrote:
<snip>
> mysql_startup_timeout() {
> memtotal="`cat /proc/meminfo | grep MemTotal | cut -d ':' -f 2 |
> sed 's/ //g' | cut -d 'k' -f 1`"
> # round memory royally upward for calc in gigabytes.
> memtotal=`expr $memtotal + 700000`
> timeout=`expr $memtotal / $MEMORY_ALLOCATION_PER_SEC_IN_KB`
> timeout=`expr $timeout + $TIMEOUT_OFFSET`
> if test $timeout -gt 14; then
> echo $timeout
> else
> echo 14
> fi
> }
neat! two comments:
- /proc/meminfo is linux specific and less general. perhaps you could write
something with "free" or some other generic utility instead?
- your suggestion isn't mutually exclusive from the previous one i made. it
could be made optional to specify a timeout value, and if not specified, use
the heuristic you provide, which would be the default.
but in any event, i think it's a great idea. monty: you think this is
something mysql.com would be interested in?
sean
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://lists.alioth.debian.org/pipermail/pkg-mysql-maint/attachments/20070627/c76ac82b/attachment.pgp
More information about the pkg-mysql-maint
mailing list