From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96078724211821.tru64-unix-managers.marc@archive.invalid> From: Gary Menna Date: Wed, 14 Oct 1998 03:26:25 +0000 To: tru64-unix-managers Subject: SUMMARY : How to get 200% CPU X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96078724211821 Hi ALL , Thanks again for the help . Question : Alpha 4100A ver 4.0B 2X 533 CPUs Hi All , I have just gotten a second CPU for my 4100 . I run a few sybase Dataservers on it . "Top" always shows one of the dataservers running at 99% CPU . "monitor" always shows it running at 99 % on one CPU or eg: 41 % on one and 59% on the other (see below) I was under the understanding that sybase was a multithreaded program . Shouldn't it be capable of utilizing 100% of both CPUs if needed . ? I know it will try and run on the last CPU it used , so when it shows it split up over the two CPUs is that just lag in the display . ? If it is running on both CPUs why the 100% or (50% of total) limit . ? Answers : Tom Blinn: Even if Sybase is multithreaded, the applications you're using to look at the system work on a per-process basis. Threads run in the context of a process. If Sybase doesn't create multiple processes, you'll only see one (or two if it is clever enough to create two processes). In fact, if you've got something that reports process activity per-CPU, then a multithreaded process might be using in excess of 100% of a single CPU because it's running threads on more than one CPU at a time. However, multi-threading does not, in itself, make an application capable of effectively utilizing multiple CPUs; that depends a lot on the data structures and locking used inside the application. If there is some critical resource that can't be easily shared among threads running on multiple CPUs, then you might have most threads blocked most of the time. Jirik Stephen: You need to run multiple sybase engines per server to take advantage of SMP hardware. This results in the creation of additional "dataserver" processes which co-ordinate via the shared memory area. We have quite "successfully" driven a 2 processor machine to 2 x 100% cpu utilisation using the one SQLserver, with 2 engines. On a multiprocessor machine you might want to leave 1 processor for other tasks. eg on our 4 processor production box we run a SQLserver with 3 engines. I haven't done the necessary testing to see if this is in fact optimal. eg 1> sp_configure "max online engines" 2> go Parameter Name Default Memory Used Config Value Run Value ------------------------------ ----------- ----------- ------------ ----------- max online engines 1 1728 3 3 Bruce Hines: Digital UNIX 4.0B is not true SMP, not unit 4.0D. So I/O still has to be done on CPU0. How many engines do you have defined to Sybase? Typically, Sybase ROT is N-1 (where N is number of CPU in system). If this is the case the most you could expect is what you are getting. Alan Rollow: It looks like there isn't enough work to keep the 2nd CPU completely busy. That could indicate a bottleneck somewhere else, or it could just be that your load isn't high enough. Most would consider some idle time a good thing. Oisin McGuinness: I'ld be interested to hear what substantive responses you get on this. We have a 2100a 5/300 2cpu machine where the master piece of our Sybase database lives. The DBA here recently asked me a very similar question, since we wanted to get more performance out of the machine. I showed him that ps -A -m -O SCHED will show all the threads in a process (-m) and that one of the parts of the output format for SCHED shows which processor is in use by a process. Successive runs show the process scheduler (we're running DU4.0B on this box, soon to go to DU4.0D) moving the dataserver process from 1 cpu to another, as it feels like it. And it shows NO THREADS inside dataserver. So if Sybase uses threading, it is not the OS threads. Anyway, just this weekend the DBA reconfigured our dataserver, following some help from Sybase, to use 2 engines. I'm not sure if they have affinity bound to any particular processor, but the OS seems to schedule them better, so that both CPU's seem to get used more evenly, and hopefully more efficiently. Thanking you , Gary Menna E-Mail g.menna@isu.usyd.edu.au Information Technology Services Phone +61 2 9351-6360 University of Sydney (G05) Fax +61 2 9351-7711 #=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=# # # # Quidvis Recte Factum, Quamvis Humile, Praeclarum # # # # R-R # #=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#