Hi Heikki.

"Heikki Tuuri" <[EMAIL PROTECTED]> writes:

> > Oh, by the way. The error does not occur if I use less memory.
> 
> please show us your complete my.cnf.


# This will be passed to all mysql clients
[client]
#password       = my_password
port            = 3306
socket          = /var/run/mysqld/mysqld.sock


[safe_mysqld]
err-log         = /var/log/mysql/mysql.err

[mysqld]
user            = mysql
pid-file        = /var/run/mysqld/mysqld.pid
socket          = /var/run/mysqld/mysqld.sock
port            = 3306
set-variable    = table_cache=500
set-variable    = max_connections=800
# the highest number of threads recorded is approx. 270

set-variable    = max_connect_errors=100000


#
# Replication
log-bin
server-id=1

#log            = /var/log/mysql/mysql.log

basedir         = /usr
datadir         = /var/lib/mysql
tmpdir          = /tmp
language        = /usr/share/mysql/english
skip-locking
#
# The skip-networkin option will no longer be set via debconf menu.
# You have to manually change it if you want networking i.e. the server
# listening on port 3306. The default is "disable" - for security
reasons.
# skip-networking

set-variable    = key_buffer=16M
set-variable    = sort_buffer=1M
set-variable    = record_buffer=1M
set-variable    = max_allowed_packet=16M
set-variable    = thread_stack=256K
#
# Here you can see queries with especially long duration
log-slow-queries        = /var/log/mysql/mysql-slow.log

# The following can be used as easy to replay backup logs or for
replication
#server-id              = 1
#log-bin                = /var/log/mysql/mysql-bin.log
#binlog-do-db           = include_database_name
#binlog-ignore-db       = include_database_name



# skip-innodb
# InnoDB
innodb_data_home_dir=/var/lib/mysql/innodb/
innodb_data_file_path=ibdata00:1G;ibdata01:1G;ibdata02:1G;ibdata03:1G;ibdata04:1
G;ibdata05:1G;ibdata06:1G;ibdata07:1G;ibdata08:1G;ibdata09:1G;ibdata10:1G;ibdata
11:1G;ibdata12:1G;ibdata13:1G;ibdata14:1G;ibdata15:1G;ibdata16:1G;ibdata17:1G;ib
data18:1G;ibdata19:1G

innodb_log_group_home_dir=/var/lib/mysql/innodb/
set-variable = innodb_log_files_in_group=3

innodb_log_arch_dir=/var/lib/mysql/innodb/

set-variable = innodb_log_file_size=32M
set-variable = innodb_log_buffer_size=8M

set-variable = innodb_buffer_pool_size=950M
set-variable = innodb_additional_mem_pool_size=128M

# innodb_flush_method=O_DSYNC

innodb_flush_log_at_trx_commit=0


[mysqldump]
quick
set-variable    = max_allowed_packet=16M

[mysql]
#no-auto-rehash # faster start of mysql but no tab completition

[isamchk]
set-variable    = key_buffer=16M


> Could it be that the mysqld memory usage may approach 2 GB? In that case
> glibc will start allocating memory over thread stacks, which will cause all
> kinds of crashes and errors.

Hmm. I thought the heap could grow up to 3GB on Linux 2.4 (with one
gigabyte for stack). Is the memory space split 2/2? This is bad news for
me - I need as much memory as I can get.

> Note that each thread using sorting will use sort_buffer much memory, and
> each thread using a MyISAM table scan will use record_buffer much memory. Do
> you have many queries doing sorting simultaneously?

Hmm. So Innobase tables don't use the record_buffer? But it does use the
sort buffer, rigth? This is new to me - the documentation is a bit thin
here - maybe you could add a section on how to configure a "pure" InnoDB
MySQL-server?


> > InnoDB: You may get better performance if you configure a bigger
> > InnoDB: value in the MySQL my.cnf file for
> > InnoDB: innodb_additional_mem_pool_size.
> > InnoDB: Fatal error: cannot allocate 2851686576 bytes of
> > InnoDB: memory with malloc! Total allocated memory
> > InnoDB: by InnoDB 1413577223 bytes. Operating system errno: 12
> > InnoDB: Cannot continue operation!
> > InnoDB: Check if you should increase the swap file or
> > InnoDB: ulimits of your operating system.
> > InnoDB: On FreeBSD check you have compiled the OS with
> > InnoDB: a big enough maximum process size.
> > Obtained 10 stack frames.
> > /usr/sbin/mysqld(ut_malloc_low+0xb8) [0x823ba28]
> > /usr/sbin/mysqld(ut_malloc+0x13) [0x823c37b]
> > /usr/sbin/mysqld(mem_area_alloc+0xf9) [0x823a601]
> > /usr/sbin/mysqld(mem_heap_create_block+0x63) [0x82397d3]
> > /usr/sbin/mysqld(dtuple_convert_big_rec+0x1b6) [0x8235fde]
> > /usr/sbin/mysqld(btr_cur_optimistic_insert+0x3e1) [0x8198bdd]
> > /usr/sbin/mysqld(row_ins_index_entry_low+0x674) [0x81614b4]
> > /usr/sbin/mysqld [0x816175e]
> > /usr/sbin/mysqld(row_ins+0x1cc) [0x8161950]
> > /usr/sbin/mysqld(row_ins_step+0xf7) [0x8161a83]
> 
> The trace above is sensible. Do you have a BLOB or TEXT column in the table
> where it is doing an insert? 

No. Its mostly varchars.

> If not, then the index entry tuple which InnoDB has just constructed
> has probably garbage in its fields, and that is why InnoDB believes it
> is a 'big record'.

Hmm. So, if the heap has grown to much - glibc is writing garbage all
over the stack. Is there any way to tell how much memory MySQL has
allocated?


-- 
Per Andreas Buer

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to