on 04-01-2014 6:09 PM
When I try to load 73K rows from ASE 15.7 to IQ 16.0 SP3 the IQ server ‘hang’ at the last phase of the insert (merge RLV store to main IQ dbspace).
Hang: The server stops responding; stop writing to iqmsg; and, I’m unable to stop the server using stop_iq; the only way to stop the server is to kill the process (on Unix).
Any suggestion on how to solve this issue will be appreciated.
Adaptive Server Enterprise/15.7/EBF 21339 SMP SP101 /P/X64/Windows Server/ase157sp101/3439/64-bit/OPT/Thu Jun 06 12:11:05 2013
Sybase IQ/16.0.0.653/131122/P/sp03/Sun_Sparc/OS 5.10/64bit/2013-11-22 01:16:26 (8 cores)
Create and populate the following table:
CREATE TABLE dbo.MyTable (
Program varchar(3) NULL,
EncNum varchar(12) NULL,
MRN varchar(8) NULL,
IntervalStartDtm varchar(19) NULL,
IntervalEndDtm varchar(19) NULL,
IntervalType varchar(50) NULL,
IntervalDuration numeric(19,4) NULL,
PhysFirstName varchar(50) NULL,
PhysLastName varchar(50) NULL,
PhysNum varchar(6) NULL,
Location varchar(3) NULL,
DiseaseSite varchar(20) NULL,
Priority int NULL,
DelayReason int NULL,
ExcludeFlag varchar(1) NULL
)
LOCK ALLPAGES
GO
I’d around 73,000 rows, you can populate the table with random data.
EndNum are of format ‘999999999999’
MRN number are of format ‘99999999’
Create the new RVL STORE
create dbspace IQ_RLVStore
using file IQ_RLVFile1 '/dev/vx/rdsk/datadg/pdevtemp1' size 15360
IQ RLV STORE
Start Up Parameters
-n devDwIqSrvr
-x tcpip{port=4101}
-c 512m
-gc 20
-gd all
-gl all
-gm 100
-gn 150
-gp 4096
-ti 4400
-iqlm 4096
-iqmc 4096
-iqtc 4096
-iqgovern 100
-iqrlvmem 2048
-iqmsgsz 2047
-iqmsgnum 2
-xs http{port=8082}
Create the table
CREATE TABLE DBA. MyTable (
Program varchar(3) NULL,
EncNum varchar(12) NULL,
MRN varchar(8) NULL,
IntervalStartDtm varchar(19) NULL,
IntervalEndDtm varchar(19) NULL,
IntervalType varchar(50) NULL,
IntervalDuration numeric(19,4) NULL,
PhysFirstName varchar(50) NULL,
PhysLastName varchar(50) NULL,
PhysNum varchar(6) NULL,
Location varchar(3) NULL,
DiseaseSite varchar(20) NULL,
Priority integer NULL,
DelayReason integer NULL,
ExcludeFlag varchar(1) NULL IQ UNIQUE (255)
)
GO
set option public.SNAPSHOT_VERSIONING = 'Row-level'
set option public.RV_RESERVED_DBSPACE_MB = 500
alter table DBA. MyTable
enable RLV STORE
Create a new session (disconnect and reconnect)
Create the new server
sp_addserver 'devDwIqSrvr', ASIQ, 'ohdwdbdev01:4101'
Add and external login
sp_addexternlogin devDwIqSrvr, sa, DBA, myPassword
Create proxy a table
`
create proxy_table MyTable _proxy
at 'devDwIqSrvr.devDwIqDb.DBA. MyTable '
Execute
insert into dbo. MyTable _proxy
select * from dbo. MyTable
In the 2 servers where I tested, the IQ server ‘hang’ after around 1 hrs.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You are probably running out of RLV memory. Your approximate row length x the number of rows is more than the -iqrlvmem configuration.
When loading data using RLV, you must commit occasionally in order for the merge to occur to TLV pages. As you are loading in a single transaction, no commit is occuring, so the merge cannot happen.
Since you are running this from the ASE side, you probably need to increase the -iqrlvmem configuration and/or reducing the batch size (using a 'where' clause, etc) to allow the merge to occur and free up RLV memory.
Chris
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Chris,
Thanks a lot for your help.
As per your suggestion, I increased the –iqrlvmem to 4096
And also, set option public.RV_Auto_Merge_Eval_Interval = 1
But, still have the same behavior.
Here you can see the state of the IQ server just a few seconds before it hang.
select SpCount/2 from
sp_iqtransaction()
where TxnID = 119410926
SELECT TOTAL FROM sp_iqrlvmemory('myTable', 'DBA')
exec sp_iqstatus
sp_iqtransaction.SpCount/2
-----------------------------
72607.5 (approximate number of tables already loaded on the RLV part of the table)
1 record(s) selected [Fetch MetaData: 0ms] [Fetch Data: 0ms]
TOTAL
--------
252
1 record(s) selected [Fetch MetaData: 0ms] [Fetch Data: 0ms]
1 record(s) affected
Name Value
-------------------------------------------- -----------------------------------------------------------------------------------
Sybase IQ (TM) Copyright (c) 1992-2013 by SAP AG or an SAP affiliate company. All rights reserved.
Version: 16.0.0.653/131122/P/sp03/Sun_Sparc/OS 5.10/64bit/2013-11-22 01:16:26
Time Now: 2014-04-01 15:10:00.672
Build Time: 2013-11-22 01:16:26
File Format: 23 on 03/18/1999
Server mode: IQ Server
Catalog Format: 2
Stored Procedure Revision: 1
Page Size: 131072/8192blksz/16bpp
Number of Main DB Files: 4
Main Store Out Of Space: N
Number of Cache Dbspace Files: 0
Number of Shared Temp DB Files: 0
Shared Temp Store Out Of Space: N
Number of Local Temp DB Files: 1
Local Temp Store Out Of Space: N
DB Blocks: 1-8716280 IQ_SYSTEM_MAIN_16384
DB Blocks: 9408960-18125239 IQ_SYSTEM_MAIN_2_16387
DB Blocks: 19863360-22484791 SF1
DB Blocks: 22999680-24965759 IQ_RLVFile1
Local Temp Blocks: 1-1966072 IQ_SYSTEM_TEMP_16388
Create Time: 2011-08-07 09:24:11.169
Update Time: 2014-04-01 14:52:51.422
Main IQ Buffers: 32652, 4096Mb
Temporary IQ Buffers: 32652, 4096Mb
Main IQ Blocks Used: 3144428 of 21993858, 14%=23Gb, Max Block#: 23117643
Cache Dbspace IQ Blocks Used: 0 of 0, 0%=0Mb, Max Block#: 0
Shared Temporary IQ Blocks Used: 0 of 0, 0%=0Mb, Max Block#: 0
Local Temporary IQ Blocks Used: 113 of 1940472, 0%=0Mb, Max Block#: 241
Main Reserved Blocks Available: 26214 of 26214, 100%=204Mb
Shared Temporary Reserved Blocks Available: 0 of 0, 0%=0Mb
Local Temporary Reserved Blocks Available: 25600 of 25600, 100%=200Mb
IQ Dynamic Memory: Current: 9502mb, Max: 9526mb
Main IQ Buffers: Used: 2251, Locked: 0
Temporary IQ Buffers: Used: 7, Locked: 0
Main IQ I/O: I: L18549/P79 O: C2336/D2740/P2581 D:519 C:39.7
Temporary IQ I/O: I: L110366/P0 O: C2568/D2592/P32 D:2561 C:97.1
Other Versions: 1 = 69Mb
Active Txn Versions: 0 = C:0Mb/D:0Mb
Last Full Backup ID: 119254657
Last Full Backup Time: 2014-03-30 19:00:00
Last Backup ID: 119415062
Last Backup Type: INCR
Last Backup Time: 2014-04-01 15:00:00
DB Updated: 1
Blocks in next ISF Backup: 8928 Blocks: =69Mb
Blocks in next ISI Backup: 0 Blocks: =0Mb
IQ large memory space: 4096Mb
IQ large memory flexible percentage: 50
IQ large memory flexible used: 0Mb
IQ large memory inflexible percentage: 90
IQ large memory inflexible used: 0Mb
IQ large memory anti-starvation percentage: 50
DB File Encryption Status: OFF
RLV memory limit: 4096Mb
RLV memory used: 348Mb
56 record(s) selected [Fetch MetaData: 1ms] [Fetch Data: 2ms]
[Executed: 01/04/2014 3:10:01 PM] [Execution: 140ms]
Follow the last records on the iqmsg file (Note the frequency in with the last records are written):
Do you have any left over RLV transaction? After you reboot IQ do you see any locks? check with sp_iqlocks.... (Shocked!... You will have orphan trasncation event after IQ reboot)
The tail of iqmsg file has no meaning. Either search for lasst occurance of TableName in iqmsg file or 'Mrg B' and 'Except' string and the messages around this.
or just post o/p from all available IQMSG files. You may not have info in lastest file if file is being rotated. Worth to search messages for last few days.
egrep 'Mrg B|Excep|youtablename' your.iqmsg
Abhijit
Hi Abhijit,
Thanks a lot for your help.
After the IQ reboot I have an Intent lock on the table, but I think this is normal and associated with the RLV process.
conn_name conn_id user_id table_type creator table_name index_id lock_class lock_duration lock_type row_identifier row_range
-------------- ---------- ---------- ------------- ---------- ------------------ ----------- ------------- ---------------- ------------ ----------------- ------------
RLV_CONN_T1290 1000000004 BASE DBA IClinicalWaitTimes (null) Table Transaction Intent (null) (null)
1 record(s) selected [Fetch MetaData: 0ms] [Fetch Data: 0ms]
[Executed: 02/04/2014 10:12:29 AM] [Execution: 7ms]
Also, where I execute the search on the iqmsg I cannot find any Mrg of Except, but I can see some record of the RLV starting 14:53, look like keep trying until 15:10, I killed the IQ process at 15:32 and restarted the database; at that time (15:25) I can see a recovery and the a RLV dump (15:26)
Any idea about what is going on?
(sybase@ohdwdbdev01)/IQ/Data/dev->egrep 'Mrg|xcept|Clin' devDwIqDb.iqmsg | more
Do you see any new messages in iqmsg file?
Before testing RLV, Did you checked if you are able to insert a single record in IQ proxy table from ASE without enabling RLV?
1. disable RLV for the table.
2. reboot IQ -- Check any messages reported
3. Test - inserting a single record from ASE to IQ proxy table. You may use 'insert into MyTable_proxy select top 1 from MyTable'
4. If succesful enable RLV and try to insert few records first.
Also set following options until you have success on RLV,
SET OPTION PUBLIC.RV_MERGE_TABLE_NUMROWS=10000; | --- 10000 rows |
SET OPTION PUBLIC.RV_AUTO_MERGE_EVAL_INTERVAL='1’; --- 1 minute
Regards,
Abhi
Hi Abhijit,
I try it that before, smaller loads (under 10K rows or over 50K rows but with less columns) works ok, But I think 72K rows for the table in use should not be a problem. Look like the merge process never start (it is in some kind of starvation state).
I now that one possible solution of the problem is reduce the number of rows per insert, but, in IQ 15.2 the same load take around 1 hr. In IQ 16 I'm not able to make it finish.
Thanks a lot!
Uvernes
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.