Jimmy Rianto wrote:
>
> Hi,
> I want to use MySQL for the database for my counter
> services. Can MySQL be accessed very rapidly? What is
> the limit of queries that MySQL can handle in one second?
> Can it handle 1000 queries/sec, 10,000 queries/sec, 100,000 queries/sec
> or even more than1 Million queries/sec? What is the limit?
> Can it crash because of the heavy query request from the internet?
> I'll be greatfull if someone can help me out.
>
> Thank You.
>
It depend on the hardware :) and on the query/your
tables. The best thing to do is to write a benchmark
that will simulate your setup and test it on your
hardware. I imagine for something like a counter 1000
queries/s on a Pentium II 350 is reasonable if you have
enough RAM to avoid frequent disk access, but this is
just a wild guess. I once benchmarked MySQL/CGI/C app
that was processing a survey submission, so a hit would
do about 15 inserts about 100 bytes of data worth each
on Pentium II 233 with 64 MB SDRAM and a UW SCSI. 10
MB/s network was not wide enough to push the server to
the limit, so we had to connect it to 100 MB/s port
along with the load generator machine. with that much
bandwidth, it maxed out at 40 hits per second, which
means 600 queries/s + CPU power to do the CGI stuff. I
imagine your bottleneck could very well be your Internet
bandwidth. Think about this: a hit on a counter will
generate about 2-3 queries and about 2-3K of traffic. So
roughly speaking, 1 query for 1 K of traffic. If you
have a T1, that is about 150KBytes/s, so a T1 will give
you maximum of 150 queries/s. T3 has a potential to push
you to 4,500 queries/s. All in all, unless you have a
Gigabit Ethernet, you do not have to worry about more
than 10,000 queries/s.
Again, like I said, do benchmarks. This is just rough
estimates. I could be way off.
--
Sasha Pachev
http://www.sashanet.com/ (home)
http://www.direct1.com/ (work)
| Thread |
|---|
| • Heavy access | Jimmy Rianto | 19 May |
| • Re: Heavy access | Sasha Pachev | 21 May |