Joinutility seperatorLogin utility separator Infobright.com
   
1 of 4
1
load data too slowly
Posted: 21 April 2009 12:40 AM   Ignore ]  
Newbie
Rank
Total Posts:  26
Joined  2009-04-01

Hi,

i’ve got problem about load data.
usualy load data process is fast enough, but after i rewrite my table (drop then write again) twice, suddenly load data process is being slowly.
the size file only 1.2GB while the load data until 32 minute, it hasn’t been complete.

i don’t understand about it.

any body know?

Thanks,
Sifa.

Profile
 
Posted: 21 April 2009 07:59 AM   Ignore ]   [ # 1 ]  
Jr. Member
RankRank
Total Posts:  87
Joined  2008-08-18

Hi,

We haven’t observed similar problems before. We would like to help you but we need more information.

Do I understand correctly that you are loading the same file to the table with the same schema?
Didn’t you do similar operation (dropping and creating again) with other tables?
How long did it take to load the data before recreating the table?
How many IB tables do you have and how many columns is in the table you were trying to rewrite?
Could you try to restart ICE and repeat the same procedure. If it help then it will help us to find the cause.

Cheers

Profile
 
Posted: 21 April 2009 09:19 AM   Ignore ]   [ # 2 ]  
Super Duper Member
Avatar
RankRankRankRankRank
Total Posts:  966
Joined  2008-08-18

Hi !

Can you put your DROP TABLE, CREATE TABLE, LOAD DATA statements into a script and submit to the forum? My understanding is that if you run the script once, the load works fine. If you run the script again (without any change to it, without any other action and using the same load data) the load becomes slower - is that true?

Cheers,
J.

Profile
 
Posted: 22 April 2009 04:24 AM   Ignore ]   [ # 3 ]  
Newbie
Rank
Total Posts:  26
Joined  2009-04-01

First, I want to explain that my table consists of 10 files (sum of record are 62 million). So, it needs
10 times of file load to enter the data into the table.

At the first attempt, it was a success. The whole files were entered
successfully to the table. But then I needed to drop the table because
there was something wrong on the content of the data. After the table had
been dropped, I recreated the table and loaded the data. Again, it was a
success. Unfortunately, with the same reason as before, I needed to drop
it again.

At the third attempt, the load process was failed. From 10 files that
should have been loaded, only 1 file was successful. When it tried to load
the second file, it never completed.

the table has 44 columns. but after I rechecked my data (before load to the database) there was error. it wasn’t match with table datatype.

So,there isn’t something wrong with infobright.

I’m sorry (^_^) ..

Thanks,
sifa.

Profile
 
Posted: 22 April 2009 09:04 AM   Ignore ]   [ # 4 ]  
Member
Avatar
RankRankRank
Total Posts:  160
Joined  2009-04-01

Now worries Sifa.

We are glad you were able to resolve the problem.

Thank you for letting us know and please do not hesitate to post other questions to the forum in the future.

Regards, Bob Newell

Profile
 
Posted: 04 May 2009 01:15 AM   Ignore ]   [ # 5 ]  
Newbie
Rank
Total Posts:  42
Joined  2009-03-26

Hi all,

I think I have the same problem that is ICE load data too slow. After I upgraded to ICE 3.1 all things so Ok (so fast and very stable). Last week, I upgraded to ICE 3.1.1 too and ICE has no any problems before. But right now, I the problem occur, Load data very slow:
ex: before, Load Data InFile statement very fast, It take about <100ms per files (the sample file was attached in this post).
Right now, It take about more than 2s per files. I tried to reset the server, but Load data speed was not fast as I expected.

more info: I scheduled load data in 1 minute per time, and my load data infile script look like:

LOAD DATA INFILE '/glfs/adsdata//adv1241406361871.dat' INTO TABLE ad0409 FIELDS TERMINATED BY '    ' EN 

the ad0409 table schema:

CREATE TABLE `ad0409` (
  `
TimecreateTIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Size[MB]: 35.4; Ratio: 939.39',
  `
browser_codeTINYINT(4) DEFAULT NULL COMMENT 'Size[MB]: 235.7; Ratio: 8.36',
  `
browser_nameVARCHAR(50COLLATE ascii_bin DEFAULT NULL COMMENT 'lookup; Size[MB]: 235.7; Ratio: 36.64',
  `
browser_verVARCHAR(20COLLATE ascii_bin DEFAULT NULL COMMENT 'lookup; Size[MB]: 567.7; Ratio: 11.80',
  `
os_nameVARCHAR(50COLLATE ascii_bin DEFAULT NULL COMMENT 'lookup; Size[MB]: 25.4; Ratio: 489.20',
  `
os_codeTINYINT(4) DEFAULT NULL COMMENT 'Size[MB]: 25.4; Ratio: 77.38',
  `
os_verVARCHAR(20COLLATE ascii_bin DEFAULT NULL COMMENT 'lookup; Size[MB]: 141.8; Ratio: 38.73',
  `
banneridVARCHAR(100COLLATE ascii_bin DEFAULT NULL COMMENT 'lookup; Size[MB]: 1538.5; Ratio: 6.91',
  `
ipINTEGER(11NOT NULL COMMENT 'Size[MB]: 3447.2; Ratio: 2.03',
  `
domainVARCHAR(150COLLATE utf8_general_ci DEFAULT NULL COMMENT 'lookup; Size[MB]: 249.8; Ratio: 87.49',
  `
url_pathVARCHAR(255COLLATE utf8_general_ci DEFAULT NULL COMMENT 'Size[MB]: 1.4; Ratio: 149.63',
  `
clickorviewTINYINT(4) DEFAULT NULL COMMENT 'Size[MB]: 6.1; Ratio: 321.01',
  `
cookie_createTIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'Size[MB]: 4143.0; Ratio: 8.03',
  `
banner_view_countINTEGER(11) DEFAULT NULL COMMENT 'Size[MB]: 1.0; Ratio: 999.99',
  `
guidBIGINT(20) DEFAULT NULL COMMENT 'Size[MB]: 7301.5; Ratio: 1.95',
   ...
  `
zoneidINTEGER(11) DEFAULT NULL COMMENT 'Size[MB]: 3.5; Ratio: 999.99',
  `
campaignVARCHAR(100COLLATE ascii_bin DEFAULT NULL COMMENT 'lookup; Size[MB]: 11.9; Ratio: 751.72',
  `
channelidINTEGER(11) DEFAULT NULL COMMENT 'Size[MB]: 1.4; Ratio: 999.99'
)ENGINE=Brighthouse
CHARACTER SET 
'utf8' COLLATE 'utf8_general_ci'
COMMENT='Overall compression ratio: 13.393'

I’m currently using lastest of ICE (revision=IB_3.1-1_r3718_3855(ice))
OS: Linux localhost 2.6.18-92.el5 #1 SMP Tue Jun 10 18:51:06 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux
RAM: 48 Gb
processor : GenuineIntel Intel(R) Xeon(R) CPU X5550 @ 2.67GHz [GenuineIntel 16 cores Family 6 Model 26 Stepping 5]


For more detail about the problem issue, I attached the full log files, including: bh.err, brighthouse.ini, and sample file was used in load data infile script.

File Attachments 
brighhouse.zip  (File Size: 5KB - Downloads: 386)
adv1241406361871.zip  (File Size: 174KB - Downloads: 424)
Signature 

Thanh Nguyen

skype: thanhntvt
Website: Admicro.vn

Profile
 
Posted: 04 May 2009 09:27 AM   Ignore ]   [ # 6 ]  
Sr. Member
Avatar
RankRankRankRank
Total Posts:  505
Joined  2008-08-18

The problem could be the ‘lookup’ columns. If there are too many distinct values in a ‘lookup’ column, load will become extremely slow.

Only use Lookup for columns with just a few distinct values. Also, do not use Lookup on integer or date columns (only char, varchar).

Hope this helps,
Geoffrey

Signature 
Profile
 
Posted: 04 May 2009 09:46 AM   Ignore ]   [ # 7 ]  
Member
RankRankRank
Total Posts:  106
Joined  2008-08-18

I checked your bh.err

090429 14:39:29  mysqld started
Loading configuration 
for Infobright instance ...
OptionAllowMySQLQueryPathvalue0.
Option
BufferingLevelvalue2.
Option
CacheFoldervalue: /data/infobright_home/cache.
OptionCachingLevelvalue1.
Option
ClusterSizevalue2000.
Option
ControlMessagesvalue0.
Option
HugefileDirvalue: .
OptionInternalMessagesvalue0.
Option
KNFoldervalueBH_RSI_Repository.
OptionKNLevelvalue99.
Option
LoaderMainHeapSizevalue800.
Option
LoaderSaveThreadNumbervalue16.
Option
PushDownvalue1.
Option
ServerCompressedHeapSizevalue4000.
Option
ServerMainHeapSizevalue36000.
Infobright instance configuration loaded
.
/
usr/local/infobright/bin/mysqldTable 'mysql.general_log' doesn't exist
/usr/local/infobright/bin/mysqld: Table '
mysql.slow_log' doesn't exist
090429 14
:39:29 [Note] Infobright Community Edition 3.1 is ready for connections.
socket'/tmp/mysql-ib.sock' port3306 build number (revision)=IB_3.1-1_r3718_3855(ice)
090429 14:39:29 [Note] SCHEDULERLoaded 0 events
*** glibc detected *** /usr/local/infobright/bin/bhloaderdouble free or corruption (!prev): 0x000000001973b160 ***
======= 
Backtrace: =========
[0xaa0e36]
[0xaa48f7]
[0x7eb70e]
[0x754595]
[0x84a17b]
[0x6fef26]
[0x6f9b69]
[0x40320a]
[0xa763c7]
[0x4001b9]
======= Memory map: ========
00400000-00d2e000 r-xp 00000000 fd:00 26706988                           /usr/local/infobright-3.1.1-x86_64/bin/bhloader
00f2d000
-00f81000 rw-p 0092d000 fd:00 26706988                           /usr/local/infobright-3.1.1-x86_64/bin/bhloader
00f81000
-010ec000 rw-p 00f81000 00:00 0 
19518000
-19a0c000 rw-p 19518000 00:00 0 
2b0cfe543000
-2b0d38545000 rw-p 2b0cfe543000 00:00 0 
2b0d38545000
-2b0d38546000 rw-s 00000000 00:13 4366007                    /dev/shm/sem.ib_named_mutex_1775173517
2b0d38546000
-2b0d3940d000 rw-p 2b0d38546000 00:00 0 
2b0d3c000000
-2b0d3c051000 rw-p 2b0d3c000000 00:00 0 
2b0d3c051000
-2b0d40000000 ---p 2b0d3c051000 00:00 0 
7fffac551000
-7fffac567000 rw-p 7fffac551000 00:00 0                      [stack]
ffffffffff600000
-ffffffffffe00000 ---p 00000000 00:00 0                  [vdso]
*** glibc detected *** /usr/local/infobright/bin/bhloaderfree(): invalid next size (normal): 0x000000001b5bc120 ***
======= 
Backtrace: =========
[0xaa0e36]
[0xaa48f7]
[0x7eb70e]
[0x754595]
[0x84a17b]
[0x6fef26]
[0x6f9b69]
[0x40320a]
[0xa763c7]
[0x4001b9]
======= Memory map: ========
00400000-00d2e000 r-xp 00000000 fd:00 26706988                           /usr/local/infobright-3.1.1-x86_64/bin/bhloader
00f2d000
-00f81000 rw-p 0092d000 fd:00 26706988                           /usr/local/infobright-3.1.1-x86_64/bin/bhloader
00f81000
-010ec000 rw-p 00f81000 00:00 0 
1aeb0000
-1b760000 rw-p 1aeb0000 00:00 0 
2b2695af7000
-2b26cfaf9000 rw-p 2b2695af7000 00:00 0 
2b26cfaf9000
-2b26cfafa000 rw-s 00000000 00:13 4366007                    /dev/shm/sem.ib_named_mutex_1775173517
2b26cfafa000
-2b26d09c1000 rw-p 2b26cfafa000 00:00 0 
2b26d4000000
-2b26d4051000 rw-p 2b26d4000000 00:00 0 
2b26d4051000
-2b26d8000000 ---p 2b26d4051000 00:00 0 
7fff14f9d000
-7fff14fb3000 rw-p 7fff14f9d000 00:00 0                      [stack]
ffffffffff600000
-ffffffffffe00000 ---p 00000000 00:00 0                  [vdso]
*** glibc detected *** /usr/local/infobright/bin/bhloaderfree(): invalid next size (normal): 0x00000000025be080 ***
======= 
Backtrace: =========
[0xaa0e36]
[0xaa48f7]
[0x7eb70e]
[0x754595]
[0x84a17b]
[0x6fef26]
[0x6f9b69]
[0x40320a]
[0xa763c7]
[0x4001b9]
======= Memory map: ========
00400000-00d2e000 r-xp 00000000 fd:00 26706988                           /usr/local/infobright-3.1.1-x86_64/bin/bhloader
00f2d000
-00f81000 rw-p 0092d000 fd:00 26706988                           /usr/local/infobright-3.1.1-x86_64/bin/bhloader
00f81000
-010ec000 rw-p 00f81000 00:00 0 
01eb2000
-02762000 rw-p 01eb2000 00:00 0 
2b969829d000
-2b96d229f000 rw-p 2b969829d000 00:00 0 
2b96d229f000
-2b96d22a0000 rw-s 00000000 00:13 4366007                    /dev/shm/sem.ib_named_mutex_1775173517
2b96d22a0000
-2b96d3167000 rw-p 2b96d22a0000 00:00 0 
2b96d4000000
-2b96d4051000 rw-p 2b96d4000000 00:00 0 
2b96d4051000
-2b96d8000000 ---p 2b96d4051000 00:00 0 
7fff127f7000
-7fff1280d000 rw-p 7fff127f7000 00:00 0                      [stack]
ffffffffff600000
-ffffffffffe00000 ---p 00000000 00:00 0                  [vdso]
*** glibc detected *** /usr/local/infobright/bin/bhloaderfree(): invalid next size (normal): 0x000000001bddb0a0 ***
======= 
Backtrace: =========
[0xaa0e36]
[0xaa48f7]
[0x7eb70e]
[0x754595]
[0x84a17b]
[0x6fef26]
[0x6f9b69]
[0x40320a]
[0xa763c7]
[0x4001b9]
======= Memory map: ========
00400000-00d2e000 r-xp 00000000 fd:00 26706988                           /usr/local/infobright-3.1.1-x86_64/bin/bhloader
00f2d000
-00f81000 rw-p 0092d000 fd:00 26706988                           /usr/local/infobright-3.1.1-x86_64/bin/bhloader
00f81000
-010ec000 rw-p 00f81000 00:00 0 
1b6cf000
-1bf7f000 rw-p 1b6cf000 00:00 0 
2b3fa13b7000
-2b3fdb3b9000 rw-p 2b3fa13b7000 00:00 0 
2b3fdb3b9000
-2b3fdb3ba000 rw-s 00000000 00:13 4366007                    /dev/shm/sem.ib_named_mutex_1775173517
2b3fdb3ba000
-2b3fdc281000 rw-p 2b3fdb3ba000 00:00 0 
2b3fe0000000
-2b3fe0051000 rw-p 2b3fe0000000 00:00 0 
2b3fe0051000
-2b3fe4000000 ---p 2b3fe0051000 00:00 0 
7fff096de000
-7fff096f3000 rw-p 7fff096de000 00:00 0                      [stack]
ffffffffff600000
-ffffffffffe00000 ---p 00000000 00:00 0                  [vdso] 

There are possibilities of:
1) corruption of database, can you try a fresh install, which wipe out all old database.
2) disable selinux and try again? Because we see similar Amazon EC2 problem.
3) reduce memory setting from 34000 -> 24000 to free more memory
4) some bad data, and bhloader not handling those bad data very well.

Profile
 
Posted: 04 May 2009 02:15 PM   Ignore ]   [ # 8 ]  
Newbie
Rank
Total Posts:  42
Joined  2009-03-26

Hi Geoffrey,

All lookup columns in my table were char and varchar(have got 7 lookup columns/25 total of columns), and the distinct values less than 5000 (In fact, I had read the article http://www.infobright.org/Forums/viewthread/88/ before the table was designed, then I think the lookup columns were not the main reason make the load data command too slow).

For more detail about the problem, I attach the brigthouse.log in this post.

(Right now, I tried to load data to another table (a new table with the same schema), load data too slow again)

File Attachments 
brighthouse.zip  (File Size: 7KB - Downloads: 381)
Signature 

Thanh Nguyen

skype: thanhntvt
Website: Admicro.vn

Profile
 
Posted: 04 May 2009 04:07 PM   Ignore ]   [ # 9 ]  
Sr. Member
Avatar
RankRankRankRank
Total Posts:  764
Joined  2008-08-18

Hi,

There are lines like that in the log:

2009-04-29 15:42:24 ErrorWrong data or column definitionRow24839field24. 

Wrong data in file may result in a slowdown, or even hang.

Regards,

Signature 
Profile
 
Posted: 05 May 2009 07:32 AM   Ignore ]   [ # 10 ]  
Jr. Member
RankRank
Total Posts:  87
Joined  2008-08-18

Hi,

As Jakub pointed out in your logs there are plenty of “Error: Wrong data or column definition…” error messages. Such message means that the load failed. The other thing is that I can see up to 3 such messages with in the same second. Does it mean that you for instance load the same file to 3 different tables in parallel?

Cheers

Profile
 
Posted: 05 May 2009 03:08 PM   Ignore ]   [ # 11 ]  
Newbie
Rank
Total Posts:  42
Joined  2009-03-26

Hi Jakub,

I agree with you about “Wrong data in file may result in a slowdown, or even hang.”, I will fix the error after. But now, I can’t load data into my table (the ad0409 table), after load fail I saw some error in the brighthouse.log, especially :

ErrorExpression evaluation failed

that I can’t find any the same error in this forum at all.
Right now, I have to load data into another table (I created a new table with the same schema of ad0409), and with the same files, load data in to new table was fine, but with the ad0409 table was fail, always can’t to load.

I had read the article How does the Knowledge Grid handle corruption, so I’m very worried about my KG was corruption and no way to fix it. In this case, how can I check my KG status?

for more about fail to load data : currently the data size of the ad0409 in hard disk are about 20Gb. And the loader load files from mount disk (NFS mount).


Regard,

File Attachments 
brighthouse.zip  (File Size: 3KB - Downloads: 385)
Signature 

Thanh Nguyen

skype: thanhntvt
Website: Admicro.vn

Profile
 
Posted: 06 May 2009 03:02 AM   Ignore ]   [ # 12 ]  
Newbie
Rank
Total Posts:  26
Joined  2009-04-01

Hi aLL,

I come back with the same problem. I have 4.3 GB data in the table then I try to Select data like these

Select callingnumber,callednumber,nodeid,count(callingnumber) from ascii2 where callingnumber=‘123456789101’ group by callingnumber,callednumber,nodeid;

It needs time to show the result 29 min 49.13 sec.

I think it is too slowly. Isn’t it ?

Profile
 
Posted: 06 May 2009 03:33 AM   Ignore ]   [ # 13 ]  
Sr. Member
Avatar
RankRankRankRank
Total Posts:  487
Joined  2008-08-18

Hello,

Thanh, Sifa, before we discuss it more, I have a short question:

Sifa, would you mind running the following query?

select callednumber,nodeid,count(callingnumber) from ascii2 where callingnumber=‘123456789101’ group by callednumber,nodeid;

The result should be the same (except the value of callingnumer displayed) but I’d be mostly interested in comparison of the speed.

The next question would be about the following query:

select callednumber,nodeid,count(*) from ascii2 where callingnumber=‘123456789101’ group by callednumber,nodeid;

I’m asking because “count(callingnumber)” might be a problem…

Many thanks and best greetings!

Dominik

Signature 
Profile
 
Posted: 06 May 2009 03:51 AM   Ignore ]   [ # 14 ]  
Super Duper Member
Avatar
RankRankRankRankRank
Total Posts:  966
Joined  2008-08-18

Hi Sifa!,

Every time you have a question about query performance, try setting “ControlMessages = 2” in “brighthouse.ini”. Then restart server and execute the queries again. A log file bh.err will be created next to the brighthouse.ini file. This log file will contain information how the queries have been processed. Please post this file, so we can see how each of the queries has been handled by the engine. Then some conclusions on the resulting performance could be derived.

However, from your query I can guess you are grouping on 2 x CHAR(12) + INT + counter + data structure overhead, so you need around 60 bytes per group. How many groups you have, how much memory you have, how big is your MainHeapSize? Maybe the result is not fitting in the memory and multipass processing or swapping occurs.

Why you do not store phone numbers as integers - it is more efficient.

Profile
 
Posted: 06 May 2009 05:21 AM   Ignore ]   [ # 15 ]  
Sr. Member
Avatar
RankRankRankRank
Total Posts:  764
Joined  2008-08-18

Hi Sifa,

Indeed, “bh.err” log should help us a lot. BTW, “count(callingnumber)” is a bit superfluous here, you can safely use “count(*)”. Note that these are equivalent as callingnumber is not null inside groups (nulls will fall to a separate group anyway). “Count(*)” is faster.

Regards,

Signature 
Profile
 
   
1 of 4
1