List:General Discussion« Previous MessageNext Message »
From:Jeremy Zawodny Date:January 17 2002 8:51am
Subject:Re: Memory
View as plain text  
On Wed, Jan 16, 2002 at 09:46:48PM -0500, John Kemp wrote:
>  From the innodb.com site (bugs & fixes):
> 
> This has me worried, but I haven't seen this behaviour on our site. We have
> 
> innodb_buffer_pool = 1100Mb
> key_buffer = 400 Mb
> record_buffer = 10Mb
> sort_buffer = 20Mb
> max_connections = 220
> 
> which according to this formula gives me 1100 + 400 + (220 * (20 + 10)) 
> + ( 220 * 1)  = 8320Mb at max capacity. At roughly half capacity (96 
> connections) we're using only 1390Mb, so I'm finding it hard to believe 
> it's going to scale that badly right now. We "only" have 4Gb memory on 
> our linux-based database machine right now - should I be upgrading? ;-)
> 
> Does anyone have any information that either supports or refutes the 
> statement above? I'd be interested if you did....

Well, the sort_buffer and record_buffer will only be allocated on an
as-needed basis.  And they'll exist for very short periods of time,
ideally.

So your 1390 comes mainly from innodb_buffer_pool + key_buffer which
are the two "global" buffers (non-thread-specific) that are involved.
You'll likely see a single MySQL thread peek above that on occasion,
but you'd need things to get pretty bad before you eat up all your
memory.

See

  http://jeremy.zawodny.com/mysql/mysql2.pdf

for a bit of info on the difference between global and per-thread
memory in MySQL.

Jeremy
-- 
Jeremy D. Zawodny, <jzawodn@stripped>
Technical Yahoo - Yahoo Finance
Desk: (408) 349-7878   Fax: (408) 349-5454   Cell: (408) 685-5936

MySQL 3.23.41-max: up 14 days, processed 336,064,611 queries (270/sec. avg)
Thread
MemoryJohn Kemp17 Jan
  • Re: MemoryJeremy Zawodny17 Jan
Re: MemoryHeikki Tuuri17 Jan
  • Re: MemoryJohn Kemp17 Jan
  • Re: MemoryJeremy Zawodny17 Jan
    • Re: MemoryDan Nelson18 Jan
      • Re: MemoryJeremy Zawodny18 Jan
Re: Memoryalec.cawley17 Jan
Re: MemoryHeikki Tuuri17 Jan