[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: science fair project
- From: Arend Meetsma <arend meetsma org>
- To: enigma-list redhat com
- Subject: Re: science fair project
- Date: Tue, 1 Jan 2002 16:23:29 -0700 (MST)
On 1 Jan 2002, Brandon Hale wrote:
>
>
> > Are you planning on running the query more than once and averaging? As I
> > seem to remember that JSP will spend a little longer serving the first
> > request while it compiles the byte-code for the page, and will be faster
> > at each time..
> Results will definately be averaged over several trials, I am thinking
> 10 will suffice.
>
> > .. In a big mysql database I've got, I ran the query
> > SELECT * FROM Img LIMIT 0,1 : first query ran at 0.80sec,
> > second time round was 0.01sec- so take a look at the mySQL documentation
> > to see if it offers help.... I think a similair discussion was had a
> > while back on a PHP list.
> Does anyone know if restarting mysqld will reset the cache or whatever
> causes this speedup?
>
> > Theres A few things to think about.
>
> Thanks alot for the advice, Adam and Mark
> ;-)
>
> I could still use help with some sort of timing script if anyone has
> experience with this sort of thing. Any help on this issue would be
> greatly appreciated.
Hi Brandon,
You might want to look at /proc/stat
Grabbing the values from the cpu line before and after your request might
give you some accurate timing.
[meetsma NIS meetsma]$ cat /proc/stat |grep cpu
cpu 1004315 5634 126900 405719739
cpu0 1004315 5634 126900 405719739
[meetsma NIS meetsma]$ cat /proc/stat |grep cpu
cpu 1004315 5634 126901 405720794
cpu0 1004315 5634 126901 405720794
[meetsma NIS meetsma]$
In this case my cpu did the following:
0 msec doing user stuff,
0 msec doing nice user stuff,
1 msec doing system stuff,
and about 1000 msec idle
I'm not sure if these are milliseconds, but you get the idea.
Hope this helps,
Arend
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]