RE: Weird one
Posted in 2008
Solaris isn't Linux and there are a lot of potential differences under the cover even if both OSs are POSIX compliance.
Get down low enough, there are even differences in the same OS but on different hardware platforms. (I don't think your book deals at that level.)
There are a couple of ways that you can write and control the stack, some include a combination of both a common stack and individual stacks.
Forking a process will also create a new copy of the memory associated with the process for the child, threading is using the same memory.
So what happens if you have two threads from the same parent running on two different cpus? cores? The answer is that it depends. ;-)
The scheduling algorithm will be different based on the hardware and the OS. Some may give preference to keeping children threads on the same stack and same CPU. (Even down to the same core).
Will Solaris on Opteron have the same memory management and process/thread management as say their Rock based chips? Definitely not.
Of course all of this is at a lower level than anyone here has to deal with. As pointed out, you can tune the engine to account for these anomolies so it shouldn't impact you.
The reason I asked the question is that I've always found the OS to be interesting. Solaris used to support the register variables in C. I'm not sure that they do that now in a multi-core/multi-cpu environment. (Yes declaring a variable as a type register will still compile, but the variable isn't actually going to be associated with the register....
Its when you have to write really tight and efficient code that you have to worry about this. Its a lost art since there was this guy named Moore and he wrote this silly law... :-)
-G
> Date: Thu, 25 Sep 2008 22:43:20 -0500
> From: paul@oninit.com
> Subject: Re: Weird one
> To: informix-list@iiug.org
> CC: informix-list@iiug.org; mpruet1@verizon.net
>
> Read the Solaris Internals book by Jack Mauro ???
>
> Ian Michael Gumby wrote:
> > Just out of curiosity, and this may not be at issue...
> >
> > On a multi-core /smp Linux box, does each CPU have its own stack or does
> > it share the same stack?
> >
> > If they share the same stack, how does one track to see if their are
> > thread contention issues.
> > Meaning if Thread A from the same process is on core 1, and Thread B
> > from the same process is on core 2, what sort of contention occurs?
> >
> > If each CPU core has its own stack, is there load balancing among the
> > stacks and would there be process migration between stacks?
> >
> > Ok, this is an OS question and not an Informix question per se.
> >
> > It would be interesting to see how solaris would handle this too.
> >
> >
> > > From: mpruet1@verizon.net
> > > Subject: Re: Weird one
> > > Date: Thu, 25 Sep 2008 05:07:28 +0000
> > > To: informix-list@iiug.org
> > >
> > > Art Kagel wrote:
> > > > <Cross posted to CDI & IDS Forum>
> > > >
> > > > OK, an oddity for you. I'm doing some performance and tuning testing
> > > > using multiple copies of dbload.
> > > >
> > > > I'll tell you what I'm dealing with. Anyone with any idea as to why
> > the
> > > > engine is behaving as it is please pipe in.
> > > >
> > > > Platform: Linux 2.6.9-67.ELsmp, x86-32 with 2 single core 3.4GHZ
> > > > processors, single disk spindle for IDS another for the OS
> > > > IDS Vers: 10.00.UC8
> > > >
> > > > OK, so I'm getting reasonable timings running various numbers of load
> > > > clients against the engine with 1, 2, 4, 6, & 8 CPU VPs truncating the
> > > > table between runs.
> > > >
> > > > I notice in TOP that at some point in the run IO Wait goes way up and
> > > > CPU consumption way down for 10-30 seconds then back to 'normal'. I
> > > > figure, "Oh! Extends are being added." So after completing the set of
> > > > timing runs I change the script to drop and recreate the table with an
> > > > extent size sufficient for the loaded data in the initial load instead
> > > > of the truncate and run the tests again expecting to see that the
> > > > runtimes have decrease by 10-20 seconds per run. NO! the runtimes
> > > > INCREASED by 16 to 64 seconds!
> > >
> > > Also sounds to me like you might need additional page cleaners and maybe
> > > adjust the triggers for firing them. IDS 11 might have non-blocking
> > > checkpoint so LRU MIN/MAX can be pretty high. But that's not the case
> > > with IDS10.
> > >
> > > >
> > > > Yes, I checked that there was indeed still a single extent the size of
> > > > the initial extent size allocation after each load.
> > > >
> > > > Any ideas as to why this should be?
> > > >
> > > > --
> > > > Art S. Kagel
> > > > Oninit (www.oninit.com <http://www.oninit.com>)
> > > > IIUG Board of Directors (art@iiug.org <mailto:art@iiug.org>)
> > > >
> > > > Disclaimer: Please keep in mind that my own opinions are my own
> > opinions
> > > > and do not reflect on my employer, Oninit, the IIUG, nor any other
> > > > organization with which I am associated either explicitly or
> > implicitly.
> > > > Neither do those opinions reflect those of other individuals
> > affiliated
> > > > with any entity with which I am affiliated nor those of the entities
> > > > themselves.
> > > >
> > > _______________________________________________
> > > Informix-list mailing list
> > > Informix-list@iiug.org
> > > http://www.iiug.org/mailman/listinfo/informix-list
> >
> > ------------------------------------------------------------------------
> > Get more out of the Web. Learn 10 hidden secrets of Windows Live. Learn
> > Now
> > <http://windowslive.com/connect/post/jamiethomson.spaces.live.com-Blog-cns!550F681DAD532637!5295.entry?ocid=TXT_TAGLM_WL_getmore_092008>
> _______________________________________________
> Informix-list mailing list
> Informix-list@iiug.org
> http://www.iiug.org/mailman/listinfo/informix-list
_________________________________________________________________
Get more out of the Web. Learn 10 hidden secrets of Windows Live.
http://windowslive.com/connect/post/jamiethomson.spaces.live.com-Blog-cns!550F681DAD532637!5295.entry?ocid=TXT_TAGLM_WL_domore_092008