List:General Discussion« Previous MessageNext Message »
From:Sasha Pachev Date:March 26 1999 7:23pm
Subject:Re: Optimisation
View as plain text  
There are many factors involved in the perceived
performance (that is how fast the pages/banners load) of
a web server. Here is a rough breakdown of issues:

a) Is your network bandwidth good enough to handle the
traffic?
b) Do you have enough RAM?
c) If all the database does not fit into RAM, are your
disks fast enough
d) If serving a banner/page is CPU intensive, do you
have enough CPU
e) Can one server really do it? If CPU or disk I/O is
the bottleneck, it is better to invest into making your
code use multi-server setup. You cannot upgrade
inifinitely, but you can always buy one more server if
your code was written to scale. 

The only way to know what your problem is is to monitor
and analyze  performance. You can waste a lot of money
on upgrading hardware that is not a bottleneck if you do
not know what your bottlenecks are.

The cheapest way to improve performance in my opionion
is to fix your queries/table design/code. There are
certain software errors than no super-power hardware
could make up for.

One thing you do not want to do is to rush into
decisions under pressure. Relax, think,analyze,
experiment, and you will find a good solution. Most bad
software (and not only software) decisions are made when
someone on top of you demands that you make it work now.

Adam Powell wrote:
> 
> Hi, I am currently in the process of upgrading our database server, and I
> would appreciate some advice.  We run a banner ad network serving roughly 3
> million banners a day, our system comprises of 3 Sun Ultra 5s (270 Mhz)
> running as web servers, and an Ultra 5 as a DB server running mySQL 3.22.20.
> All machines have 512 Meg RAM.
> 
> However the problem is that the number of banners we need to serve is going
> up incredibly, and we need to upgrade.  We were serving about 180 banners
> per second, and each of these banners needs about 5 requests from the
> database.  At peak times the DB load is about 70 (baaad), and the banners
> are slow.
> 
> We have just upgraded to a Sun Enterprise 450 w/1 GIG RAM, 9.1 MB SCUSI and
> a dual 300 RISC processor, which we hope is going to solve the problem for a
> long time, however I need to be sure that it is not a problem with the
> database/buffers/OS etc..  We need to add more targeting to the banners,
> running more and more SELECTs.
> 
> My question is what are the most important factors influencing a system such
> as ours, why the hell is it so slow, and for a load such as this, do the
> buffers below look correct?  Any advice on the problem at all would be
> appreciated!  I can provide more information if anybody requests it.
> 
> Sincerely,
> Adam
> 
> +----------------------------+----------------------------------------------
> -------------------------+
> | Variable_name              | Value
> |
> +----------------------------+----------------------------------------------
> -------------------------+
> | back_log                   | 20
> |
> | connect_timeout            | 5
> |
> | basedir                    |
> /export/home/mysql-3.22.20a-sun-solaris2.6-sparc/                     |
> | datadir                    | /export/home/mysql/data/
> |
> | delayed_insert_limit       | 100
> |
> | delayed_insert_timeout     | 300
> |
> | delayed_queue_size         | 1000
> |
> | join_buffer                | 10481664
> |
> | flush_time                 | 0
> |
> | key_buffer                 | 20967424
> |
> | language                   |
> /export/home/mysql-3.22.20a-sun-solaris2.6-sparc/share/mysql/english/ |
> | log                        | OFF
> |
> | log_update                 | OFF
> |
> | long_query_time            | 10
> |
> | low_priority_updates       | OFF
> |
> | max_allowed_packet         | 1048576
> |
> | max_connections            | 360
> |
> | max_connect_errors         | 10
> |
> | max_delayed_insert_threads | 20
> |
> | max_join_size              | 4294967295
> |
> | max_sort_length            | 1024
> |
> | net_buffer_length          | 16384
> |
> | port                       | 3306
> |
> | protocol-version           | 10
> |
> | record_buffer              | 20967424
> |
> | skip_locking               | ON
> |
> | socket                     | /tmp/mysql.sock
> |
> | sort_buffer                | 5242872
> |
> | table_cache                | 98
> |
> | thread_stack               | 65536
> |
> | tmp_table_size             | 10485752
> |
> | tmpdir                     | /var/tmp/
> |
> | version                    | 3.22.20a
> |
> | wait_timeout               | 28800
> |
> +----------------------------+----------------------------------------------
> -------------------------+
> 
> Adam Powell
> Click Agents Corp.,
> Web : http://www.clickagents.com
> Email : adam@stripped
> Tel/Fax : +44 (0) 115 9532989
> 
> ---------------------------------------------------------------------
> Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
> posting. To request this thread, e-mail mysql-thread1035@stripped
> 
> To unsubscribe, send a message to the address shown in the
> List-Unsubscribe header of this message. If you cannot see it,
> e-mail mysql-unsubscribe@stripped instead.

-- 
Sasha Pachev
http://www.sashanet.com/ (home)
http://www.direct1.com/ (work)
Thread
OptimisationAdam Powell26 Mar
  • Re: OptimisationSasha Pachev27 Mar