From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f9ef7,60a2ab3d901d0d0a X-Google-Attributes: gidf9ef7,public X-Google-Thread: 1164f8,60a2ab3d901d0d0a X-Google-Attributes: gid1164f8,public X-Google-Thread: 10b612,60a2ab3d901d0d0a X-Google-Attributes: gid10b612,public X-Google-ArrivalTime: 1993-10-30 09:19:45 PST Xref: gmd.de comp.databases.ingres:4486 comp.unix.ultrix:11592 comp.sys.dec:11397 Newsgroups: comp.databases.ingres,comp.unix.ultrix,comp.sys.dec Path: gmd.de!xlink.net!howland.reston.ans.net!usc!elroy.jpl.nasa.gov!ames!decwrl!pa.dec.com!nntpd2.cxo.dec.com!nabeth.cxo.dec.com!alan From: alan@nabeth.cxo.dec.com (Alan Rollow - Alan's Home for Wayward Tumbleweeds.) Subject: Re: Poor ingres performance on Dec 5000/240 Message-ID: <1993Oct30.004219.3291@nntpd2.cxo.dec.com> Keywords: ingres, database, ultrix, performance, help Sender: usenet@nntpd2.cxo.dec.com (USENET News System) Reply-To: alan@nabeth.cxo.dec.com (Alan Rollow - Alan's Home for Wayward Tumbleweeds.) Organization: Digital Equipment Corporation References: Date: Sat, 30 Oct 1993 00:42:19 GMT In article , 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