Re: Informix Performance
Posted in 2004
--0-770701732-1077895028=:2607
Content-Type: text/plain; charset=us-ascii
Daniel,
Here are the answers by the topic number that u are having problems with.
1. The raw devices is the best because the IO is faster on raw devices. Have your sysadmin create rawdevices for you. (Informix 9.4 allows chunks to be created larger than two gigs, so please upgrade to 9.4 to take advantage of large chunks ).
2. Ok. onstat -g seg shows that your IDS is dynamically allocating virtual segments !! This not good. Increase your SHMVRTSIZE.
4. Ok, your onstat -u shows that the processes are not waiting for buffers, which is a good thing.
10. Ok, HERE IS YOUR PROBLEM ! Your IDS is stuck at the check point, this means you are trying to write a whole bunch of stuff to disk at the check point and when this happens IDS has to slow down because it has to write all the data into the disk. Now the solution for this is to increase your LRU writes. In order to do this you must know how to tune LRU_MAX_DIRTY and LRU_MIN_DIRTY parameters. Before you mess with those parameters please read about them and test them in the test box and get a handle of how it works. I can guarantee you that your checkpoint duration is very long. You can check that on your online.log. The 2 most important commands to figure out how to tune these are onstat -F and onstat -R. The outputs from them will give u an idea how your LRUs and Cleaners are behaving. Also, you are doing your check point in every 10 minutes, try to do it every 5 minutes or less and test to see how the engine reacts. When u wait for a whole 10 minutes the IDS may have
gathered a whole bunch of stuff to write to disk.
10. Try not to use the default. Edit your onconfig and enter NETTYPE on it.
13. This will give u more cleaners to do the work. Cleaners do their work and go to sleep. More Cleaners u have is the better but don't go haywire on that. Increase is gradually and monitor !
14. sar 2 20 will execute sar in every 2 seconds for 20 times. If the %wio column of the output of this command shows you high numbers (50,80,90) that means you have to tune your OS, your OS is waiting for blocks, I don't know much sysadmin stuff, but know enough to say thats a big problem.
17. Ok, ipcs is important ! This will show you what memory segments are allocated to informix from the OS. Now, you need to learn how to map these memory segments to Informix onstat -g seg output, another words how to map them to your Informix server. Now, you have to be very carefull, if you are running more than one Informix instance on this machine, then you need to map them to all those instances and figure out which ones are useless and get rid of the ones that are useless.
18. Yes, this is another area you should only mess with after reading about it and knowing how they work. Your /etc/system will show u the configuration. Increase the sem* parameters in this file gradually and test in the test machine.
I know this is too much. Everyone, please chip in areas I may have explained vaguely.
Hope this helps.
Ravi Thero.
Daniel Castro <daniel.castro@feliciorocho.org.br> wrote:
Ravi T wrote:
> You seem to have many misconfigurations on your Informix server !!!
>
> Start investigating the following areas !
>
> 1. Why are u using cooked files ?
> 2. How does your onstat -g seg looks like when the slow down happens ?
> 3. Check all the processes that are running when the slow down
> happens. Backups, update statistics, batch jobs etc etc.
> 4. How does the onstat -u look like when the slow down happens. Are
> there processes waiting for buffers ?
> 5. What kind of locking are you using ? Page level locks, row locks etc.
> 6. When users complain of slowness you need to see what they are
> trying to do and check if the tables they are trying to hit are locked
> at the time.
> 7. When the slowness happens are there logical logs that have not
> been backep up ?
> 8. Did you change any /etc/system parameters ? If so did u reboot
> the Unix server after doing so ?
> 9. How does your onstat -g ntt look like ? Does it show processes
> that are very old and just sitting there ?
> 10. What kind of connections are you using and how many ? Is your
> Nettype paramer configured correctly ? By the way you don't even show
> NETTYPE parameter on your onconfig file that you have pasted here.
> 11. Have you tried the add extra CPUVPS dynamically when slowness
> happens.
> 12. Is your TEMP dpspace big enough ? Can you add more TEMP
> spaces and monitor the system. Its better to have several TEMP spaces
> rather than having one big TEMP space.
> 13. Increase the CLEANERS to 5 or 6 and monitor the system.
> 14. From the OS side when you issue sar command does it show that OS
> is waiting for block writes ?
> 15. Check onstat -g dic, mem, stk, ses to figure out the memory and
> caching by process.
> 16. Reset your profile counts using onstat -z and monitor onstat -p
> 17. Use ipcs to lookat memory from OS side and see if there is memory
> allocated other stuff other than Informix and investigate.
> 18. See if u are allocating enough semophores at the IDS start.
>
> Those abvoe thoughts are some things to check to start with.
>
> Ravi Thero
>
> */Daniel Castro /* wrote:
>
> Hi,
>
> I am having informix performance problems. I don't know where to
> start.
> Sometimes the database hangs, always from 00:00am to 5:00 am, but it
> gives no error in the log file. Can you help me?
> Sometimes the users says that the system is slow, but I can't identify
> why.
> First, the result of onstat -p:
>
> Informix Dynamic Server Version 9.30.UC1 -- On-Line -- Up 9 days
> 21:06:09 -- 1582656 Kbytes
>
> Profile
> dskreads pagreads bufreads %cached dskwrits pagwrits bufwrits %cached
> 67223627 173897813 2077681908 96.76 12042759 61104633 222993237
> 94.60
>
> isamtot open start read write rewrite delete commit
> rollbk
> 2790216351 184683421 616967012 4148277112 65017319 12219659 28562330
> 8807460 884
>
> gp_read gp_write gp_rewrt gp_del gp_alloc gp_free gp_curs
> 0 0 0 0 0 0 0
>
> ovlock ovuserthread ovbuff usercpu syscpu numckpts flushes
> 7 0 0 336038.88 116702.45 1385 4099
>
> bufwaits lokwaits lockreqs deadlks dltouts ckpwaits compress
> seqscans
> 7192942 14028 903998567 4 0 6224 6824574
> 39496093
>
> ixda-RA idx-RA da-RA RA-pgsused lchwaits
> 12311760 5075181 15389056 32074507 56519934
>
> Second my onconfig file:
>
> #**************************************************************************
> #
> # INFORMIX SOFTWARE, INC.
> #
> # Title: onconfig.producao
> # Description: Informix Dynamic Server Configuration Parameters
> #
> #**************************************************************************
> # Root Dbspace Configuration
> ROOTNAME rootdbs # Root dbspace name> ROOTPATH /cooked_file/dbs_rootP # Path for device containing
> root dbspace
> ROOTOFFSET 0 # Offset of root dbspace into device
> (Kbytes)
> ROOTSIZE 471039 # Size of root dbspace (Kbytes)> # Disk Mirroring Configuration Parameters
> MIRROR 0 # Mirroring flag (Yes = 1, No = 0)
> MIRRORPATH # Path for device containing mirrored> root
> MIRROROFFSET 0 # Offset into mirrored device (Kbytes)> # Physical Log Configuration
> PHYSDBS wpdphlog # Location (dbspa