Computer Webmaster Gaming Console Graphics Forum

Welcome to the Computer Webmaster Gaming Console Graphics Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

MK PitStop Main Earn $25 Earn Money Posting Extras Members Blogs Image Hosting User Pages
Go Back   Computer Webmaster Gaming Console Graphics Forum > Webmaster Forum > Website Coding > Database
Register FAQ/Rules Become A V.I.P. Member Search Today's Posts Mark Forums Read

Database Database problems or need to ask a question? maybe something to do with sql injections or a database software question. Database topics cover MySQL, PostgreSQL, Oracle, SQL Server or anything else related to databases.

Google
Closed Thread
 
LinkBack Thread Tools Display Modes
Old 07-01-2007, 6:59 PM   #1
jens.bertheau@gmx.de
 
jens.bertheau@gmx.de's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Tune performance of fulltext search

Hi,

I am running MySQL on a well equipped server, 2Xeon, 4G RAM and
SCSI-RAID.
I got one real big table with 10M rows and fulltext index.
Most searches run fast enough, even on peak hours. Only when using very
common words in a fulltext-query (but not common enough to stopword
them), I get awful response times.
Even when I stop all other activity on the server and I issue a
fulltext query with 2 common words, the search can take longer than 30
sec!

When monitoring the server activity (via vmstat) when issuing the
query, I see the cpu idle state going down from 100% to exactly 75% and
minor read activity from the hard disk during search time. I just
cannot figure out, where is the bottleneck. It seems as if there were
enough computing power to execute the query much faster.

This is my custom configuration (all other values are default):
key_buffer = 512M
max_allowed_packet = 128M
thread_stack = 512K
max_connections = 600
max_connect_errors = 10000
table_cache = 256
sort_buffer = 128M
read_buffer_size = 8M
read_rnd_buffer_size = 8M

BTW: Is there a way to tell MySQL to read the whole index file of one
specific table into memory, so that searches are executed without any
disk access?

Greetz,
Jens

 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Advertisements
Old 07-01-2007, 6:59 PM   #2
Axel Schwenke
 
Axel Schwenke's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Tune performance of fulltext search

jens.bertheau@gmx.de wrote:

Jens, as a native German speaker you may want to ask your question
in de.comp.datenbanken.mysql as well.

> I am running MySQL on a well equipped server, 2Xeon, 4G RAM and
> SCSI-RAID.


I guess that's Hypertreading Xeons, so you have 2 physical but
4 logical CPUs, right?

> I got one real big table with 10M rows and fulltext index.


How big is the index? (the .MYI file)

> When monitoring the server activity (via vmstat) when issuing the
> query, I see the cpu idle state going down from 100% to exactly 75% and
> minor read activity from the hard disk during search time.


With 4 CPUs and 75% idle that means, one of the CPUs is at 100%.
"minor read activity" could be read as "data is cached", however
this could be misleading if your disks are doing many searches
(heads moving). iostat shows you #requests and device utilization.
However it looks as your servers performance is CPU bound.

....

> key_buffer = 512M


With 4GB RAM you may set this as high as 2GB. If you're running on
a 32-bit platform (I guess you are) this is also the limit.

> read_buffer_size = 8M
> read_rnd_buffer_size = 8M


Setting those higher might take load from your disks.

> BTW: Is there a way to tell MySQL to read the whole index file of one
> specific table into memory, so that searches are executed without any
> disk access?


This is done automatically as long as your key_buffer is large enough.


XL
 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Old 07-01-2007, 7:00 PM   #3
jens.bertheau@gmx.de
 
jens.bertheau@gmx.de's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Tune performance of fulltext search

> I guess that's Hypertreading Xeons, so you have 2 physical but
> 4 logical CPUs, right?


Correct.

> > I got one real big table with 10M rows and fulltext index.

> How big is the index? (the .MYI file)


Itīs 3.7G, so no way to fit it completely into RAM

> However it looks as your servers performance is CPU bound.


Yes, probably. Is there any way to tell MySQL to handle queries with
more than one logical CPU simultaneously? When I monitor CPU load it
rarely drops below 50% idle, so, if technically possible, I could gain
performance, if multiple CPUs could handle a single request.

Jens

 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Old 07-01-2007, 7:00 PM   #4
Axel Schwenke
 
Axel Schwenke's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Tune performance of fulltext search

jens.bertheau@gmx.de wrote:
>
>> > I got one real big table with 10M rows and fulltext index.

>> How big is the index? (the .MYI file)

>
> It's 3.7G, so no way to fit it completely into RAM


That's bad. To get good performance, all active indexes should fit into
key_buffer. Otherwise you lose performance due to extra I/O operations.

>> However it looks as your servers performance is CPU bound.

>
> Yes, probably. Is there any way to tell MySQL to handle queries with
> more than one logical CPU simultaneously?


Not with current MySQL. Future versions will be able to process a query
in multiple threads, but this will be limited to partitioned tables.
I don't know of any plans to use multiple threads in fulltext search.

Maybe you want to have a look at an external search engine. I heard
good things about Lucene.


XL
--
Axel Schwenke, Senior Software Developer, MySQL AB

Online User Manual: http://dev.mysql.com/doc/refman/5.0/en/
MySQL User Forums: http://forums.mysql.com/
 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Featured Websites
Free Space
Free Space
Free Space Free Space
Closed Thread
Tags: , , ,




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Speakers making whistling noise in tune with engine - HELP Engram Car audio 0 06-17-2007 3:03 PM
FULLTEXT search - getting part of a line Roland Tanner Database 1 06-10-2007 12:26 AM
Fulltext search "LIKE" operator Morten Database 0 06-10-2007 12:22 AM


Featured Websites




All times are GMT +1. The time now is 5:01 AM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.0.0
Cheap Computers
MK PitStop Copyright 2005 - 2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98