query performance


greetings,

i'm not sure what to do or if something is wrong but...

i tried ingmar's tip to change some settings in the my.ini file
i raised "innodb_buffer_pool_size=" to high (200) and the queries is much faster,
problem is CPU goes bezerk :-(

so i went back to original settings, and CPU is neat again

but the performance for some queries is not good...and sorry but it's hard to understand why "old" FR is faster than this one..

everything is OK if i set Article age newer than 12 Hours...but if i raise that to 1 day the query takes "forever"

this becomes very noticeable when i don't have any criteria...only a plain feed takes over 10 seconds !!! to fetch...of course i could set the 12 hour criteria on all smartfeeds but should that be necessary ?

i hope you have any ideas :-)

i'm running a CPU 2,66 ghz with 2 GB RAM (i have no other apps running)
my db is containing +900 feeds and DB right now contains 80K articles

regards Vidar

Greetings, who was using the

Greetings,

who was using the CPU? MYSQL server or FR, now database is separate from UI, it can sometimes rise up to 100%, but it's only for a moment.

We are planing next week extensive load testing, currently we have tested with 300-400 feeds. How many smartfeeds do you have, where you are using body and title field.

Currently I'm using following params in my.ini

innodb_buffer_pool_size = 256M
innodb_additional_mem_pool_size = 20M
innodb_log_file_size = 64M
innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit = 0

Ingmar
------
FR dev

Greetings,addition leave

Greetings,

addition leave params as they are...in current my.ini

innodb_log_file_size
innodb_log_buffer_size

Important are


innodb_buffer_pool_size = 256M
innodb_additional_mem_pool_size = 20M
innodb_flush_log_at_trx_commit = 0

But after heavy load test, we can tell optimal configuration ;)

Ingmar

------
FR dev

thanks ingmar, i tried these

thanks ingmar,

i tried these settings and the performance is much better (not as good as old FR though)

but the mysqld-nt.exe process goes up to 97 % of CPU when updating feeds and since i have a lot of feeds (dont know if 900 is a lot.but) there are updates quite freqently....

and when it reaches that high CPU...my pc dont respond very well (other apps and windows)

i did the test with NO smartfeeds at all, no folder, no nothing...(deleted) so that has no impact...but an answer to your question is that in the normal case i have about 20 nested/"advanced" smartfeeds "with body and title contains"

when i go back to original settings in my ini...everything is ok except that is not that fast...mysqld-nt.exe reaches about 70% but more seldom

//vidar

Greetings, that was quite

Greetings,

that was quite important hint "no smartfeeds at all, no folder, no nothing".

Fr for MYSQL is currently in alfa dev. state, so lot of tweaking is need to be done;))) Also, I hope when testing period is ended, new MYSQL ODBC driver is released, current one has many bugs.

Also by design it's always better if database is different app, not embedded as FB. With small amount of feeds

agree, thanks ingmar

agree, thanks ingmar

Greetings again,

Greetings again,

I'm interested , how program acts, if you divide all those smartfeeds into directories. For example testdir1 has 50 feeds, testdir2 has 100 feeds

-testdir1
-testdir2
-testdir3

and so on...

On each dir right click and from context menu choose
"Do not group feeds for display"

Then just drag and drop smartfeeds into those dirs.

I just discussed with Tom (UI) developer, there is complicated unreadcount used. If all feeds are only in root folder, then unreadcount is very often peformed as background task.

When we designed unreadcount algorithm, then we added situation, that all feeds (over 200) are in same folder, quite unlikely:))))

Same problem is also in FR (FB editon).

Maybe we little bit redesign this logic....

Ingmar
------
FR dev

interesting, since i don't

interesting, since i don't use folders..all smartfeeds in root..i will test it and come back to you

V:-)

sorry, no difference

sorry, no difference

Can you please take this

Can you please take this file http://www.feedreader.com/files/feedreader.exe

and replace your old mysql executable with this one.

Now please do two things. First let FR run as usually and then copy from left lower corner the number that are coming out. You can copy 20 last ones or so. Number are created only if you have some feeds that have new items while updating. Basically this number is time in seconds to do refreshing of unreadcounts.

Now if you have those numbers please add disableunreadcount=1 to feedreader.ini under [misc] section. Now unreadcounts are not updated (and you miss the correct unreadcount numbers) but at the same time performance may be gained. Can you comment on how your system works then unreadcounts are not updated.

What comes to mysql configuration variables then even if you reverted from ingmar's configuration options you should still use

innodb_flush_log_at_trx_commit = 0

it takes down IO load.

Greetings
Toomas

Greetings
Toomas

sorry but i receive a not

sorry but i receive a not correct serial key mess when starting this exe

//vidar

but i'm not sure that

but i'm not sure that counting is the issue...

if i just do some small tests (with original settings)

a direct query in access against tbl_articles
with selection on feed_Id number

the firebird is 50->100 times faster than the sql

//Vidar

Greetings, Tom has updated

Greetings,

Tom has updated again following debug feedreader.exe

I belive, there is some index issues. MYSQL is quite fast database or is really Firebird beaten MYSQL:)))

Ingmar
------
FR dev

sorry no difference, these

sorry no difference,

these are some figures:

firebird db tbl_articles contains 93 291 records

52 rows fetched (31ms) using SQL manager 2005 lite for Firebird

mysql db tbl_articles contains 135 365 records

415 rows fetched in 11,982 seconds
using Mysql query browser

query

SELECT * FROM feedreader.articles WHERE feed_id='2161'

maybe mysql does not like my computer :-(

Greetings,

Greetings,

could you create following index in MYSQL

CREATE INDEX delIndx ON articles(deleted)

this is common query in FR

select a.title
from articles a,feeds f
where f.feed_id=178
and a.feed_id=f.feed_id
and a.deleted=0

if you test performance, then use count for that...

select count(a.id)
from articles a,feeds f
where f.feed_id=178
and a.feed_id=f.feed_id
and a.deleted=0

Ingmar
------
FR dev

there was no index on

there was no index on feed_id in tbl_articles so i added one...and it's mucho faster now...

i still need to use the original settings (my.ini), otherwise computer go bezerk

"old" FR is still faster so hopefully we can tweak mysqldb some more i will do some more testing and come back to you with result...but please advice me if you have some thoughts :-) (for example index on title in tbl_feeds ?)

regarding "old" FR, wich is deadly fast, but for some reason just stops responding (fetching 100 years) can there be something with REquery...it seems to me that this error happens when i look in a smartfeed and at the same time more articles are coming into the DB, FR wants to requery and requery and seems to loose it at that point...any ideas ?

//vidar

Greetings,

Greetings,

this index "was lost" in porting progress. All other indexes are present, even on article title. Currently we are testing different row reading levels, with dirty read, no waiting is done...but it's not good choise. So we keep searching more tricks.

With FB and requery, it depens quite a bit, how many feeds are currenlty updated. FB has quite strict row locking system. And this can provide very different speeds when opening query's (if there is heavy load, feeds are updated).

How much slower is MYSQL currently, compared to Firebird.If you click on feeds, how fast is MYSQL and Firebird.

And also can you copy current innodb settings.

Ingmar
------
FR dev

i have to update firebird

i have to update firebird db..so i will give you an update in a few days..

seems to be fixed :-) i

seems to be fixed :-)

i changed title in tbl_feeds from varchar(1024) -> (512)

and it's a huge difference when having smartfeeds with feedname contain

i will do some more testing

;-) Vidar

Greetings, don't forget,

Greetings,

don't forget, that FR is using UTF8. If title is 512 and one UTF8 char can be also 3 chars, then actual size is 170 char.

Also Feeds->Title has no index, reason most simple, it's not commonly used. Do save dataspace no index is added for this field.

Ingmar
------
FR dev

ingmar, can you please

ingmar,

can you please explain again ? something not good with this change ? no happy ? :-)
thanks

//vidar

Greetings, no no, everything

Greetings,

no no, everything is ok, I was explaining why this field is currently varchar
(1024). You can shorten this field, strange that performance is changed...to better way. You can also create index on this field, but you must use then

CREATE INDEX feed_name ON feeds(title(255));

Ingmar
------
FR dev

done that, thanks ingmar i'm

done that, thanks ingmar

i'm really pleased with FR mySQLed now :-)

this is just great, criteria: "feedname contains" is essential to me that's why i'm so glad we fixed it and also why i have been asking for criteria "not contain" as well...almost all my smartfeeds contain "feedname contains"

happy regards Vidar