Windows XP: How Can I Get Higher CPU usage from SQLite

classic Classic list List threaded Threaded
10 messages Options
jic
Reply | Threaded
Open this post in threaded view
|

Windows XP: How Can I Get Higher CPU usage from SQLite

jic

Greetings!

I have a very small database, well, 62.1 MB (65,150,976 bytes), and when I
do a search on it, the CPU only goes to 7% and 12% at the most.  Sometimes
it takes a few seconds to return with the results.  I am not complaining
about the 5-10 seconds of the returning of the result, but I believe that if
the CPU would be used more, the result would return in 1-4 seconds.

I have left everything default, so I have not set any PRAGMA settings.

Any ideas on how to make SQLite use the CPU more since it is sitting there
with System Idle Process 93%.

Any help would be greatly appreciated.

thanks,

josé

_______________________________________________
sqlite-users mailing list
[hidden email]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Windows XP: How Can I Get Higher CPU usage from SQLite

Fred Williams
Since the dawn of digital computers the CPU has been waiting on the I/O.
Want to go faster?  Get a faster mass storage device.  Then your CPU usage
will most likely jump all the way up to 9% - 14%!

You can't believe what a 300 card per minute 80 column card reader does to
throughput when you use it to replace a 100 card per minute reader!  I know,
been there, done that! :-)

Sit back and watch the flashing lights.  BUT, keep your hands in your
pockets!

Fred

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]]On Behalf Of jose isaias cabrera
Sent: Sunday, February 22, 2009 1:57 PM
To: General Discussion of SQLite Database
Subject: [sqlite] Windows XP: How Can I Get Higher CPU usage from SQLite



Greetings!

I have a very small database, well, 62.1 MB (65,150,976 bytes), and when I
do a search on it, the CPU only goes to 7% and 12% at the most.  Sometimes
it takes a few seconds to return with the results.  I am not complaining
about the 5-10 seconds of the returning of the result, but I believe that if
the CPU would be used more, the result would return in 1-4 seconds.

I have left everything default, so I have not set any PRAGMA settings.

Any ideas on how to make SQLite use the CPU more since it is sitting there
with System Idle Process 93%.

Any help would be greatly appreciated.

thanks,

josé

_______________________________________________
sqlite-users mailing list
[hidden email]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

_______________________________________________
sqlite-users mailing list
[hidden email]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Windows XP: How Can I Get Higher CPU usage from SQLite

Puneet Kishor-2
On Sun, Feb 22, 2009 at 2:14 PM, Fred Williams <[hidden email]> wrote:

> Since the dawn of digital computers the CPU has been waiting on the I/O.
> Want to go faster?  Get a faster mass storage device.  Then your CPU usage
> will most likely jump all the way up to 9% - 14%!
>
> You can't believe what a 300 card per minute 80 column card reader does to
> throughput when you use it to replace a 100 card per minute reader!  I know,
> been there, done that! :-)
>
> Sit back and watch the flashing lights.  BUT, keep your hands in your
> pockets!

Very funny and illuminating as well.

Here is another way to look at it. Moving at the speed of light, that
is, at 186,000 miles per second, electrons take about
0.00000000101824698598782 seconds to travel about 12 inches, say, the
distance between the data on the hard disk platter and the CPU. Pretty
damn fast, I say.

Except, in that time, my lowly Macbook CPU flipping around wildly at
2.4 GHz, has already been waiting, twiddling its thumbs for almost 2.5
cycles.

Work on improving your db, your application and your hard disk. Or buy
enough ram to put everything in etherspace, then go get a cup of
coffee.


>
> Fred
>
> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]]On Behalf Of jose isaias cabrera
> Sent: Sunday, February 22, 2009 1:57 PM
> To: General Discussion of SQLite Database
> Subject: [sqlite] Windows XP: How Can I Get Higher CPU usage from SQLite
>
>
>
> Greetings!
>
> I have a very small database, well, 62.1 MB (65,150,976 bytes), and when I
> do a search on it, the CPU only goes to 7% and 12% at the most.  Sometimes
> it takes a few seconds to return with the results.  I am not complaining
> about the 5-10 seconds of the returning of the result, but I believe that if
> the CPU would be used more, the result would return in 1-4 seconds.
>
> I have left everything default, so I have not set any PRAGMA settings.
>
> Any ideas on how to make SQLite use the CPU more since it is sitting there
> with System Idle Process 93%.
>
> Any help would be greatly appreciated.
>
> thanks,
>
> josé
>



--
Puneet Kishor http://www.punkish.org/
Nelson Institute for Environmental Studies http://www.nelson.wisc.edu/
Open Source Geospatial Foundation (OSGeo) http://www.osgeo.org/
_______________________________________________
sqlite-users mailing list
[hidden email]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Windows XP: How Can I Get Higher CPU usage from SQLite

Alexey Pechnikov-2
In reply to this post by jic
Hello!

On Sunday 22 February 2009 22:56:36 jose isaias cabrera wrote:
> I have left everything default, so I have not set any PRAGMA settings.

Try this:
pragma cache_size=10000;
pragma page_size=16384;
vacuum;

Best regards.
_______________________________________________
sqlite-users mailing list
[hidden email]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Windows XP: How Can I Get Higher CPU usage from SQLite

jose isaias cabrera
In reply to this post by Fred Williams

Funny...

"Fred Williams" wrote...

> Since the dawn of digital computers the CPU has been waiting on the I/O.
> Want to go faster?  Get a faster mass storage device.  Then your CPU usage
> will most likely jump all the way up to 9% - 14%!
>
> You can't believe what a 300 card per minute 80 column card reader does to
> throughput when you use it to replace a 100 card per minute reader!  I
> know,
> been there, done that! :-)
>
> Sit back and watch the flashing lights.  BUT, keep your hands in your
> pockets!

That is funny.  Ok, I just thought that there could be something that I can
do.  Thanks.


>
> Fred
>
> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]]On Behalf Of jose isaias cabrera
> Sent: Sunday, February 22, 2009 1:57 PM
> To: General Discussion of SQLite Database
> Subject: [sqlite] Windows XP: How Can I Get Higher CPU usage from SQLite
>
>
>
> Greetings!
>
> I have a very small database, well, 62.1 MB (65,150,976 bytes), and when I
> do a search on it, the CPU only goes to 7% and 12% at the most.  Sometimes
> it takes a few seconds to return with the results.  I am not complaining
> about the 5-10 seconds of the returning of the result, but I believe that
> if
> the CPU would be used more, the result would return in 1-4 seconds.
>
> I have left everything default, so I have not set any PRAGMA settings.
>
> Any ideas on how to make SQLite use the CPU more since it is sitting there
> with System Idle Process 93%.
>
> Any help would be greatly appreciated.
>
> thanks,
>
> josé
>
> _______________________________________________
> sqlite-users mailing list
> [hidden email]
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
> _______________________________________________
> sqlite-users mailing list
> [hidden email]
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>

_______________________________________________
sqlite-users mailing list
[hidden email]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Windows XP: How Can I Get Higher CPU usage from SQLite

jose isaias cabrera
In reply to this post by Puneet Kishor-2

"P Kishor" wrote...

> On Sun, Feb 22, 2009 at 2:14 PM, Fred Williams <[hidden email]>
> wrote:
>> Since the dawn of digital computers the CPU has been waiting on the I/O.
>> Want to go faster?  Get a faster mass storage device.  Then your CPU
>> usage
>> will most likely jump all the way up to 9% - 14%!
>>
>> You can't believe what a 300 card per minute 80 column card reader does
>> to
>> throughput when you use it to replace a 100 card per minute reader!  I
>> know,
>> been there, done that! :-)
>>
>> Sit back and watch the flashing lights.  BUT, keep your hands in your
>> pockets!
>
> Very funny and illuminating as well.
>
> Here is another way to look at it. Moving at the speed of light, that
> is, at 186,000 miles per second, electrons take about
> 0.00000000101824698598782 seconds to travel about 12 inches, say, the
> distance between the data on the hard disk platter and the CPU. Pretty
> damn fast, I say.
>
> Except, in that time, my lowly Macbook CPU flipping around wildly at
> 2.4 GHz, has already been waiting, twiddling its thumbs for almost 2.5
> cycles.
>
> Work on improving your db, your application and your hard disk. Or buy
> enough ram to put everything in etherspace, then go get a cup of
> coffee.
>

Yeah, I would say that he was funny.  Thanks.  I get it now. :-)

josé


>> Fred
>>
>> -----Original Message-----
>> From: [hidden email]
>> [mailto:[hidden email]]On Behalf Of jose isaias cabrera
>> Sent: Sunday, February 22, 2009 1:57 PM
>> To: General Discussion of SQLite Database
>> Subject: [sqlite] Windows XP: How Can I Get Higher CPU usage from SQLite
>>
>>
>>
>> Greetings!
>>
>> I have a very small database, well, 62.1 MB (65,150,976 bytes), and when
>> I
>> do a search on it, the CPU only goes to 7% and 12% at the most.
>> Sometimes
>> it takes a few seconds to return with the results.  I am not complaining
>> about the 5-10 seconds of the returning of the result, but I believe that
>> if
>> the CPU would be used more, the result would return in 1-4 seconds.
>>
>> I have left everything default, so I have not set any PRAGMA settings.
>>
>> Any ideas on how to make SQLite use the CPU more since it is sitting
>> there
>> with System Idle Process 93%.
>>
>> Any help would be greatly appreciated.
>>
>> thanks,
>>
>> josé
>>
>
>
>
> --
> Puneet Kishor http://www.punkish.org/
> Nelson Institute for Environmental Studies http://www.nelson.wisc.edu/
> Open Source Geospatial Foundation (OSGeo) http://www.osgeo.org/
> _______________________________________________
> sqlite-users mailing list
> [hidden email]
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>

_______________________________________________
sqlite-users mailing list
[hidden email]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Windows XP: How Can I Get Higher CPU usage from SQLite

jose isaias cabrera
In reply to this post by Alexey Pechnikov-2

"Alexey Pechnikov" wrote...

> Hello!
>
> On Sunday 22 February 2009 22:56:36 jose isaias cabrera wrote:
>> I have left everything default, so I have not set any PRAGMA settings.
>
> Try this:
> pragma cache_size=10000;
> pragma page_size=16384;
> vacuum;

Wow, thanks.  That did help. Cool, so there was something that I could do.
Here is a question: this DB is shared by other folks, do they each need to
set this when they open or if I set it, it would apply to everyone that
connects to it?

thanks,

josé

_______________________________________________
sqlite-users mailing list
[hidden email]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
jic
Reply | Threaded
Open this post in threaded view
|

Re: Windows XP: How Can I Get Higher CPU usage from SQLite

jic
In reply to this post by jic

"Alexey Pechnikov" wrote...

> Hello!
>
> On Sunday 22 February 2009 22:56:36 jose isaias cabrera wrote:
>> I have left everything default, so I have not set any PRAGMA settings.
>
> Try this:
> pragma cache_size=10000;
> pragma page_size=16384;
> vacuum;

Wow, thanks.  That did help. Cool, so there was something that I could do.
Here is a question: this DB is shared by other folks, do they each need to
set this when they open or if I set it, it would apply to everyone that
connects to it?

thanks,

josé

_______________________________________________
sqlite-users mailing list
[hidden email]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Windows XP: How Can I Get Higher CPU usage from SQLite

Bugzilla from mlcreech@gmail.com
On Sun, Feb 22, 2009 at 11:44 PM, jose isaias cabrera
<[hidden email]> wrote:

>>
>> Try this:
>> pragma cache_size=10000;
>> pragma page_size=16384;
>> vacuum;
>
> Wow, thanks.  That did help. Cool, so there was something that I could do.
> Here is a question: this DB is shared by other folks, do they each need to
> set this when they open or if I set it, it would apply to everyone that
> connects to it?
>

"page_size" will persist once you've done the VACUUM.  "cache_size"
doesn't persist, but you can use "default_cache_size" if you want it
to.

http://sqlite.org/pragma.html

--
Matthew L. Creech
_______________________________________________
sqlite-users mailing list
[hidden email]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Windows XP: How Can I Get Higher CPU usage from SQLite

Fred Williams
In reply to this post by jose isaias cabrera
That's the reason in memory databases are so fast.  If a DB is small enough
you can spool the whole thing into RAM on open and spool it back out on
close.

If you are attempting to use the DB in any kind of multi user environment
client system large cache sizes are going to play H--- with concurrency.

Fred

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]]On Behalf Of jose isaias cabrera
Sent: Sunday, February 22, 2009 10:41 PM
To: [hidden email]; General Discussion of SQLite Database
Subject: Re: [sqlite] Windows XP: How Can I Get Higher CPU usage from
SQLite



"Alexey Pechnikov" wrote...

> Hello!
>
> On Sunday 22 February 2009 22:56:36 jose isaias cabrera wrote:
>> I have left everything default, so I have not set any PRAGMA settings.
>
> Try this:
> pragma cache_size=10000;
> pragma page_size=16384;
> vacuum;

Wow, thanks.  That did help. Cool, so there was something that I could do.
Here is a question: this DB is shared by other folks, do they each need to
set this when they open or if I set it, it would apply to everyone that
connects to it?

thanks,

josé

_______________________________________________
sqlite-users mailing list
[hidden email]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

_______________________________________________
sqlite-users mailing list
[hidden email]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users