Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
* Re: Poor ingres performance on Dec 5000/240
       [not found] <jonas.751639019@beor>
@ 1993-10-30  0:42 ` Alan Rollow - Alan's Home for Wayward Tumbleweeds.
  1993-10-30  1:16   ` Alan Rollow - Alan's Home for Wayward Tumbleweeds.
  1993-10-30  4:01 ` Hans Adams
  1993-11-01 23:11 ` Dave Brower, DBMS hack, [510] 748-3418
  2 siblings, 1 reply; 4+ messages in thread
From: Alan Rollow - Alan's Home for Wayward Tumbleweeds. @ 1993-10-30  0:42 UTC (permalink / raw)



In article <jonas.751639019@beor>, jonas@beor.informatik.rwth-aachen.de (Josef Nelissen) writes:

[ A system of the quoted configuration is running too slowly. ]


>We work on a DEC-system 5000/240, 64 MB, ULTRIX 4.3, INGRES 6.4/03.
>The ULTRIX system, the INGRES system and the database itself have
>their own discs, each of 1.3 GB, a fourth disc is used for PC-network.

Without more specific information it is hard to make specific
suggestions.  So, I'll make the general ones.

1.   Find the bottle neck.  What resource are you running out of?

     CPU speed?
     Disk I/O bandwidth (bytes/unit time)?
     Disk I/O through-put (requests/unit time)?
     Memory?

1a.  The commands iostat(1), vmstat(1) and cpustat(1) include the
     time spent in various CPU modes; user mode, nice, system and
     idle.  You can check these to see where the time is going.
     Typical systems run mostly in user and nice mode, with some
     system time and hopefully some idle time.

     A lack of idle time but "reasonable" balance between system
     and user modes, suggests the bottleneck is the CPU.  You can
     either get a faster CPU (see 260 upgrade) or see if the
     application could be more efficient.

1b.  The built-in and TURBOchannel SCSI adapters (PMAZ) available for the
     DECsystem 5000/240 are capable of moving about 5 MB/sec data each.
     You can use iostat(1) to see is being used.  Database applications
     that I've seen tend not to be bandwidth intensive.  The RZ58 disk
     you are probably use (1.3 GB) is capable of about 2 MB/sec reading
     at large transfer sizes.  Two of them transfering as fast as possible
     can saturate one bus.

1c.  From my experience databases tend to be more request intensive
     than bandwidth intensive.  The requests tend to be relatively
     small and only in extreme circumstances will they be limited by
     the bandwidth of either the disk or the controller.  What does
     limit them is that disks are mechanical and have limits of how
     many I/O requests they can complete in a given time.

     Again, iostat(1) will you give information about how busy the
     disks are.  The maximum request rate that can be supported is
     very dependent on the disk.  For rotating disks it is also
     dependent on how disk space the data is spread over.  I don't
     have an RZ58, but I do have some RZ57s.  The number below were
     obtained using a simple program.  I used different partitions
     to control the seek range.  The percentage given is the size
     of the partition used compared to the size of the device:

	   100.00%: 29.612480 tps.
	    31.44%: 33.398561 tps.
	     9.43%: 36.660399 tps.
	     1.68%: 40.680077 tps.

     The I/O size was 8 KB, since the transfer size will also have
     an affect.  These will give you a rough guess as to whether the
     disks are saturated.

1d.  Use vmstat(1) to look at the system paging stats.  The manual page
     is adequate for at least getting a clue as to whether paging is
     a problem.
 
2.  Once you identify the bottleneck(s), you can attempt to apply
    solutions to each.

a.  As noted before, if the CPU is saturated you either need a faster
    CPU or need to examine the application to see if it can be made
    more efficient.

b.  It is trivially easy these days to saturate a 5 MB/sec SCSI adapter.
    The only solution is to get additional adapters and spread the disks
    out.  The appliation is saturating a single disk, then you need a
    faster disk or Striping to get the bandwidth benefits of spreading
    the I/O across multiple disks.

c.  Similar to the bandwidth problem, if a disk is saturated you either
    need a faster disk or more disks to handle the I/O load.  Which is
    better depends on many things that I'll discuss in a later follow-up.

d.  Buy more memory.  There are some things you can do to make the system
    page and swap more quickly, but avoiding it in the first place is always
    best.  Using the 8 MB memory card for the Model 240 you can get as much
    as 120 MB in a system.  Using the 32 MB card you can get 480 MB.

3.  Other possible changes.

a.  Raw disk vs. the File system.  Most better DBMS allow using either
    raw devices or files on a file system.  When using a file on file
    system the DBMS has to allow for the presense of the UNIX buffer
    cache.  On writes it may prefer to do them all synchronously so that
    when a write claims to be complete it knows it really is.  Or it
    take advantage of the asynchronous nature of the writes and use
    journaling or some other technique to sure that no data is lost.

    When running on a raw device it may do its own buffering to avoid
    doing some I/Os (reads) and with journaling, some writes.  Which
    performs better depends on how well it does its own buffer management.
    It may be worth investigating the differences to see if changing is
    worth the effort.

b.  Prestoserve is a hardware/software layered product that includes a
    non-volatile memory board and the software to manage it.  It can
    be used with block devices or file systems to safely buffer
    synchronous writes.  In the right I/O loads it can make a significant
    difference in I/O performance.

c.  Included in the V4.3 documentation set is a performance guide.  It
    should offer other suggestions about how to study and improve general
    system performance.

>-- 
>Josef Nelissen, Lehrstuhl fuer Angewandte Mathematik, insbesondere Informatik,
>RWTH-Aachen, Ahornstr. 55, D-52074 Aachen, Germany, Tel. +49 241/80-21060,
>FAX +49 241/80-21079, e-mail jonas@beor.informatik.rwth-aachen.de
>*************Experience is what you have got after you needed it.************* 
>
--
Alan Rollow				alan@nabeth.cxo.dec.com



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Poor ingres performance on Dec 5000/240
  1993-10-30  0:42 ` Poor ingres performance on Dec 5000/240 Alan Rollow - Alan's Home for Wayward Tumbleweeds.
@ 1993-10-30  1:16   ` Alan Rollow - Alan's Home for Wayward Tumbleweeds.
  0 siblings, 0 replies; 4+ messages in thread
From: Alan Rollow - Alan's Home for Wayward Tumbleweeds. @ 1993-10-30  1:16 UTC (permalink / raw)



In article <1993Oct30.004219.3291@nntpd2.cxo.dec.com>, alan@nabeth.cxo.dec.com (Alan Rollow - Alan's Home for Wayward Tumbleweeds.) writes:
>
[ I responded to... ]

>In article <jonas.751639019@beor>, jonas@beor.informatik.rwth-aachen.de (Josef Nelissen) writes:
>
>[ A system of the quoted configuration is running too slowly. ]
>
>
>>We work on a DEC-system 5000/240, 64 MB, ULTRIX 4.3, INGRES 6.4/03.
>>The ULTRIX system, the INGRES system and the database itself have
>>their own discs, each of 1.3 GB, a fourth disc is used for PC-network.
>

and made at least one typo in the commentary on 2b...

>    The appliation is saturating a single disk, then you need a
>    faster disk or Striping to get the bandwidth benefits of spreading
>    the I/O across multiple disks.

This should be preceded by an "If".

But more importantly promised...

>
>c.  Similar to the bandwidth problem, if a disk is saturated you either
>    need a faster disk or more disks to handle the I/O load.  Which is
>    better depends on many things that I'll discuss in a later follow-up.

If the DBMS insists on doing synchronous writes and has only one process
doing the writing there are few things you can do to make the writes
faster, except get a faster disk.  The problem in this case is that
the *next* write has to wait for the current to finish.  For this case
the best you can do is use a solid state disk.  Their seek time and
rotational latency are very small (having to neither seek nor rotate).
Unfortunately they tend to be more expensive than other disks.

In the single threaded I/O case Striping will do very little to help.
For a constant capacity device it may help some simply by having each
member be smaller and thus reducing the seek time.  When the I/O
is asynchronous or the I/O is multi-threaded Striping can help more
by spreading the I/O among multiple devices.  Spreading the I/O
among multiple controller can help even more as it allows multiple
transfers to take place at once.

This feature is somewhat limited when using the PMAZ because it
requires the CPU to copy data from the PMAZ intermediate buffer
to memory.  I have heard plans for support of the PMAZB (dual
channel, DMA SCSI adapter) on a future version of ULTRIX, so
this limitation may not be a problem eventually.  

>
>>-- 
>>Josef Nelissen, Lehrstuhl fuer Angewandte Mathematik, insbesondere Informatik,
>
--
Alan Rollow				alan@nabeth.cxo.dec.com



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Poor ingres performance on Dec 5000/240
       [not found] <jonas.751639019@beor>
  1993-10-30  0:42 ` Poor ingres performance on Dec 5000/240 Alan Rollow - Alan's Home for Wayward Tumbleweeds.
@ 1993-10-30  4:01 ` Hans Adams
  1993-11-01 23:11 ` Dave Brower, DBMS hack, [510] 748-3418
  2 siblings, 0 replies; 4+ messages in thread
From: Hans Adams @ 1993-10-30  4:01 UTC (permalink / raw)



In-reply-to: jonas@beor.informatik.rwth-aachen.de's message of 26 Oct 93 12:36:59 GMT
Newsgroups: comp.databases.ingres,comp.unix.ultrix,comp.sys.dec
Subject: Re: Poor ingres performance on Dec 5000/240
References: <jonas.751639019@beor>
Distribution: 
--text follows this line--
In article <jonas.751639019@beor> jonas@beor.informatik.rwth-aachen.de (Josef Nelissen) writes:

>   Hey experts!
No way beeing expert, but we experienced same, below mentioned problem. 

>   Must an INGRES-Application really be as slow as that ??

No DBMS application should run as slow as often seen under ULTRIX 4.3.

We had the problem, that access to CAD data organized in a DB took about 10 minutes.
System was:
	Decstation 5000/133, 64 or 48 MByte RAM (did not matter indeed),
	Ultrix 4.3 running as delivered.

>   Our problem is that we have to import at least about 1 MB of data per day
>   into an INGRES database. 

Should be a snap.

>   The program that should import these data, however, succeeds only to
>   import 500 to 700 KB per day. <You see the problem (J.N.) :->
>
	Unbelievable.	


>   The question for us as users (*not* authors) of this program is:

First:

	1) Is DB put on a raw device, or on a file.

	2) I/O performance of delivered SCSI interface is beyond 
	anything worth to be discussed ......
	about 120 kB through filesystem, 400kByte through pager...
	
	3) Operating system delivered is optimized for RAM less than 8 MBytes,
	(have a look at your manuals). You have to fix parameters in 
	param.c. 


>   What can we do about this ?

	1) Put DB onto a raw device.

	2) Do not rely on built-inSCSI interface. Some companies
	offer IPI or HPPI interface for Turbo-Channel. These interfaces
	provide at least the twenty fold performance of the 4.3 SCSI subsystem.
	Using these you will need new drives.

	SCSI subsystem was completely redesigned in 4.3.A. It might be worth
	a try.

	3) Rebuild a kernel parameters set properly. 
	Fix parameters in param.c

>   Is it necessary (and possible) to optimize the (FORTRAN)-program used
>   for this procedure ?

No, as access should be optimized inside DBMS.

>   Is it necessary to change the structure of the original datafiles ?
Would not expect too much. It might be reasonable to regenerate indeces.

>   Is this performance due to a wrong configuration of our machine ?

May be. System configuration required......

>   We work on a DEC-system 5000/240, 64 MB, ULTRIX 4.3, INGRES 6.4/03.
>   The ULTRIX system, the INGRES system and the database itself have
>   their own discs, each of 1.3 GB, a fourth disc is used for PC-network.

Reasonable.

>   The data that have to be imported have got different time intervals, 
>   from one value every 15 minutes to one value per year. The data have to be 
>   compressed, that means for 8 values every 15 minutes the sum or average 
>   over 2 hours has to be computed, 12 values every 2 hours result in one sum or 
>   average per day, etc. until you get the value for the whole year.

Hardly anything demanding ....

adams

PS. please mail to "adams@decus.decus.de", as my accounts are moving. 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Poor ingres performance on Dec 5000/240
       [not found] <jonas.751639019@beor>
  1993-10-30  0:42 ` Poor ingres performance on Dec 5000/240 Alan Rollow - Alan's Home for Wayward Tumbleweeds.
  1993-10-30  4:01 ` Hans Adams
@ 1993-11-01 23:11 ` Dave Brower, DBMS hack, [510] 748-3418
  2 siblings, 0 replies; 4+ messages in thread
From: Dave Brower, DBMS hack, [510] 748-3418 @ 1993-11-01 23:11 UTC (permalink / raw)


It seems to me that there is something likely to be seriously wrong
with the database design, or the queries being run.  The volume you
are discussing seems pretty trivial.  On any current system, I'd
expect to be able to handle megabytes per hour, not day.

Your wife's company should have an INGRES support contact, and should
get a hold of that person for some help.

cheers,
-dB
-- 
"It's hard to find a black cat in a dark room.  Especially when the
cat's not there.  But we will!"




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1993-11-01 23:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <jonas.751639019@beor>
1993-10-30  0:42 ` Poor ingres performance on Dec 5000/240 Alan Rollow - Alan's Home for Wayward Tumbleweeds.
1993-10-30  1:16   ` Alan Rollow - Alan's Home for Wayward Tumbleweeds.
1993-10-30  4:01 ` Hans Adams
1993-11-01 23:11 ` Dave Brower, DBMS hack, [510] 748-3418

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox