Re: MySQL 100% CPU Spikes

2004-05-05 Thread Peter J Milanese
Did I miss something, or is this not concerning a 1 second spike to 100%?

I do not see why this is problematic, and I'm a bit curious as to how it 
is...

I mean, the DB does use 100% CPU if it's available. And for a 1 second 
period,
it could very well just be the sample time for the tool monitoring it







"Scott Pippin" <[EMAIL PROTECTED]>
05/05/2004 02:52 PM
 
To: <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
    cc: 
        Subject:Re: MySQL 100% CPU Spikes


>Any information on how I can go about doing this, or maybe some
>documentation on improving the speed.
>The problem is two of the databases I think, both are around 1.1MB
each and:
 
Try putting an explain before your select statement:
http://dev.mysql.com/doc/mysql/en/EXPLAIN.html
 
this will show you if it is your query that is causing the problem.

>Database1: 13736 data records
>Database2: 77312 data records.

>Is this excessive ?
Not even close.  We currently have a database of 4 gb and 75 tables. 
One of our tables has over 2 million rows.  Even this is small as
compared to some of the other databases I have seen.  Hope this helps.

Scott Pippin
[EMAIL PROTECTED]
 



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: MySQL 100% CPU Spikes

2004-05-05 Thread Scott Pippin
>Any information on how I can go about doing this, or maybe some
>documentation on improving the speed.
>The problem is two of the databases I think, both are around 1.1MB
each and:
 
Try putting an explain before your select statement:
http://dev.mysql.com/doc/mysql/en/EXPLAIN.html
 
this will show you if it is your query that is causing the problem.

>Database1: 13736 data records
>Database2: 77312 data records.

>Is this excessive ?
Not even close.  We currently have a database of 4 gb and 75 tables. 
One of our tables has over 2 million rows.  Even this is small as
compared to some of the other databases I have seen.  Hope this helps.

Scott Pippin
[EMAIL PROTECTED]
 


Re: MySQL 100% CPU Spikes

2004-05-05 Thread Sasha Pachev
Nick A. Sugiero wrote:
Jeremy,

Any information on how I can go about doing this, or maybe some
documentation on improving the speed.
The problem is two of the databases I think, both are around 1.1MB each and:
Database1: 13736 data records
Database2: 77312 data records.
Is this excessive ?
Nick:

The problem is not so much the number of records in the database, as the number 
of records MySQL needs to examine to answer a request. Probably the following 
steps will help you:

* run mysqld with --long-log-format and --log-slow-queries options
* give your application a spin
* see what queries appear in the slow log
* fix each one of them so it does not by adding the appropriate keys, rewriting 
it to be more efficient, and/or reorganizing the schema to avoid the slow queries

--
Sasha Pachev
Create online surveys at http://www.surveyz.com/
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: MySQL 100% CPU Spikes

2004-05-05 Thread Peter J Milanese
You may be able to limit resource usage for mysql. I am not sure how to do 
it in windows though. 

100% for a second while it executes the query is not abnormal in my 
opinion. 






"Nick A. Sugiero" <[EMAIL PROTECTED]>
05/05/2004 01:12 PM
 
To: <[EMAIL PROTECTED]>
cc: 
    Subject:        Re: MySQL 100% CPU Spikes


Jeremy,

Any information on how I can go about doing this, or maybe some
documentation on improving the speed.
The problem is two of the databases I think, both are around 1.1MB each 
and:

Database1: 13736 data records
Database2: 77312 data records.

Is this excessive ?

When my .asp pages request from the database on my 2.7GHz with 2GB of RAM 
it
will spike to 100% for around
1 second then go back to normal.

--Nick

- Original Message - 
From: "Jeremy Zawodny" <[EMAIL PROTECTED]>
To: "Nick A. Sugiero" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, May 05, 2004 6:07 PM
Subject: Re: MySQL 100% CPU Spikes


> On Wed, May 05, 2004 at 03:25:14PM +0100, Nick A. Sugiero wrote:
> > Hi,
> >
> > I recently installed MySQL on a Windows 2003 Server last night to pull
some
> > stats from a online game I run, however everytime a query is sent to 
the
> > database it uses 100% cpu causing a 100% cpu spike for a breif second 
-
I'm
> > using .asp pages if that helps.
> >
> > Is there anyway to avoid this at all as it effects the performance of
the
> > server / game and I'm also worried someone could use such a thing to
cause a
> > Denial of Service attack.
>
> Make sure your queries are well optimized.  If they're not, they'll
> generally result in excessive CPU utilization.
>
> Jeremy
> -- 
> Jeremy D. Zawodny |  Perl, Web, MySQL, Linux Magazine, Yahoo!
> <[EMAIL PROTECTED]>  |  http://jeremy.zawodny.com/
>
> [book] High Performance MySQL -- http://highperformancemysql.com/
>


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: MySQL 100% CPU Spikes

2004-05-05 Thread Nick A. Sugiero
Jeremy,

Any information on how I can go about doing this, or maybe some
documentation on improving the speed.
The problem is two of the databases I think, both are around 1.1MB each and:

Database1: 13736 data records
Database2: 77312 data records.

Is this excessive ?

When my .asp pages request from the database on my 2.7GHz with 2GB of RAM it
will spike to 100% for around
1 second then go back to normal.

--Nick

- Original Message - 
From: "Jeremy Zawodny" <[EMAIL PROTECTED]>
To: "Nick A. Sugiero" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, May 05, 2004 6:07 PM
Subject: Re: MySQL 100% CPU Spikes


> On Wed, May 05, 2004 at 03:25:14PM +0100, Nick A. Sugiero wrote:
> > Hi,
> >
> > I recently installed MySQL on a Windows 2003 Server last night to pull
some
> > stats from a online game I run, however everytime a query is sent to the
> > database it uses 100% cpu causing a 100% cpu spike for a breif second -
I'm
> > using .asp pages if that helps.
> >
> > Is there anyway to avoid this at all as it effects the performance of
the
> > server / game and I'm also worried someone could use such a thing to
cause a
> > Denial of Service attack.
>
> Make sure your queries are well optimized.  If they're not, they'll
> generally result in excessive CPU utilization.
>
> Jeremy
> -- 
> Jeremy D. Zawodny |  Perl, Web, MySQL, Linux Magazine, Yahoo!
> <[EMAIL PROTECTED]>  |  http://jeremy.zawodny.com/
>
> [book] High Performance MySQL -- http://highperformancemysql.com/
>


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: MySQL 100% CPU Spikes

2004-05-05 Thread Jeremy Zawodny
On Wed, May 05, 2004 at 03:25:14PM +0100, Nick A. Sugiero wrote:
> Hi,
> 
> I recently installed MySQL on a Windows 2003 Server last night to pull some
> stats from a online game I run, however everytime a query is sent to the
> database it uses 100% cpu causing a 100% cpu spike for a breif second - I'm
> using .asp pages if that helps.
> 
> Is there anyway to avoid this at all as it effects the performance of the
> server / game and I'm also worried someone could use such a thing to cause a
> Denial of Service attack.

Make sure your queries are well optimized.  If they're not, they'll
generally result in excessive CPU utilization.

Jeremy
-- 
Jeremy D. Zawodny |  Perl, Web, MySQL, Linux Magazine, Yahoo!
<[EMAIL PROTECTED]>  |  http://jeremy.zawodny.com/

[book] High Performance MySQL -- http://highperformancemysql.com/

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



MySQL 100% CPU Spikes

2004-05-05 Thread Nick A. Sugiero
Hi,

I recently installed MySQL on a Windows 2003 Server last night to pull some
stats from a online game I run, however everytime a query is sent to the
database it uses 100% cpu causing a 100% cpu spike for a breif second - I'm
using .asp pages if that helps.

Is there anyway to avoid this at all as it effects the performance of the
server / game and I'm also worried someone could use such a thing to cause a
Denial of Service attack.

Regards,

--Nick


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]