Alan Hargreaves' Weblog
The ramblings of an Australian SaND TSC* Principal Field Technologist
* Solaris and Network Domain Technology Support Centre - The group I work forTags
(update 1) acoustic bind birthday blues bugs cec cec2007 cec2008 china cmt contention cringley debugging dogs dtrace earthquake encumbered-binaries extra flash funny google guitar halloween huron install kids linux liveupgrade locking mdb music mysql newyear niagra openjava opensolaris oracle patches patents percussion performance redhat secondlife security solaris sru sun support sxcr t2 t2000 timeslider ufs upgrade virtualbox windows youtube zfs
Thursday Jun 30, 2005
Nailing Down a Troll
#opensolaris was invaded by a troll today. Not the first time, certainly won't be the last. What is interesting is that we managed to nail this one down on a timeframe for one of his predictions (well he appears to believe that it's a fact).
Philv (I've saved the email address and full name so I can remind this individual of his comments in 8 months time) firmly believes that in 8 months or less from the posting of this blog entry that Microsoft will buy Sun.
The conversation excerpts from #opensolaris at freenode.org follows.
philv: Much better than Sun's, otherwise SUN wouldn't be in talks with
Microsoft over a buyout
philv: Microsoft is buying SUN.
Tpenta: references?
philv: The Wallstreet Journal
Tpenta: url please
philv: I don't read online news, it could be hacked.
philv: No, you just wait and see.
philv: And when I turn out to be right, you'll all be crying.
philv: And I'll be laughing
Tpenta: ok phil. put up or shut up time. Give me a time frame. If the
time frame elapses, I'd like to see an admission of "oops i was
wrong"
philv: Tpenta: 8 months.
philv: Maybe less.
Tpenta: ok, so in 8 months I *expect* to see an oops I was wrong from
you if it does not occur, correct?
philv: No, because FreeNode will be gone by then.
Tpenta: Phil. I'm posting a blog entry on this today, I will be bringing
this up again (with your name) in 8 months time, you will only
need to comment on the blog
It will be interesting to see what Philv has to say in 8 months time.
Philv, you will note that I have kept your name and email address out of this entry. I'll grant you that much in the way of privacy, but you should expect an email in eight months from today. By the way, if you turn out to be correct, I will be more than happy to say "Oops I was wrong".
Technorati Tags: Troll, Irc, Sun
Posted at 03:35PM Jun 30, 2005 by Alan Hargreaves in General | Comments[5]
Wednesday Jun 29, 2005
Out of Context Sound Bites
Christopher Blizzard did a quick blog entry about one of Scott's comments in this interview.
The following is the text of an email that I've just sent off, then thought that the comments really need to be a bit more public.
I know that I have an obvious bias here, but it might have been nice if you placed the McNealy quote in context. You didn't even mention that he went on to explain and justify it.
The following paragraph was
Let me justify that because I don't think (Gore) justified his (comments about inventing the Internet). I think I can justify ours. (Former Sun Chief Technologist) Bill Joy, as far as I can tell, kind of pioneered the whole concept of open-source kernels at (Berkeley Software Distribution) and created the licensing mechanism. We brought him into Sun, and we were kind of the Red Hat of Berkeley software before (Linux kernel inventor) Linus (Torvalds) was out of diapers. So we've been doing this forever.
Out of context sound bites are nice for the press, but as technical people I had hoped that we were above that kind of thing.
I actually think that this is one of the most candid interviews that Scott's done in an awful long time.
I know that there are a lot of Linux folk out there who like to beat up on Sun, Scott and Jonathan. Fair enough, they are public figures. That's part of the job description. However, ridiculing someone by quoting them out of context is gutter press stuff.
Keeping discussion in context, and better yet, sticking to the technical bits which we are all much better at, raises the level of the discussion and lends credibility to all participants.
technorati Tag: Sun
Posted at 07:26PM Jun 29, 2005 by Alan Hargreaves in General |
Monday Jun 27, 2005
Non-debug Opensolaris
A little more progress today, as shown by the following flash screen grab.
You may notice the absence of the string "DEBUG Enabled" after the initial Solaris Banner.
Be patient, there is a nice long wait in the middle of this one and the astute of you will notice that for some reason my '-' key doesnt work while I'm recording this.
So the pieces are starting to fall together. I just have to get the automation working properly and straighten out some inconsistancies. That will have to wait as I am taking tomorrow off as my little boy is receiving an award at a school assembly and that's far more important :)
Technorati Tag: opensolaris
Posted at 10:35PM Jun 27, 2005 by Alan Hargreaves in OpenSolaris | Comments[3]
Thursday Jun 23, 2005
Non-debug builds of Open Solaris not far away
I've been having a look at what needs to happen to make this work. My main aim in doing this is to make good application of the KISS Principle. I wanted to make minimal change for the best effect.
I've had the answer for bfu and Install for a while now (and the modifications to those are only a matter of a few lines with some smart ksh variable substitution), but it was waiting on us coming up with a simple way of generating the closed binaries tarchive for both the debug and non-debug builds.
A few ideas had occured to me, but they all had largish changes to the way things worked involved, and I really didn't want to go that way.
This morning on the way into the office (on my 90 minute train ride), I think I may have come up with an answer.Without going in to too much detail (as I haven't had a chance to speak to Mike Kupfer about it yet), it should involve a pretty simple addition to the build() function in nightly.sh script to generate the tarchives as a part of a normal nightly run inside Sun if the appropriate flag is set in the environment script for nightly.sh.
Mike already has a script for generating the debug tarchive. If we run this during a nightly on a non-debug build, we should end up with a non-debug set of closed binaries. This will definitely help with folks already attempting to benchmark!
With luck we might have this going shortly.
Technorati Tag: OpenSolaris
Posted at 07:15PM Jun 23, 2005 by Alan Hargreaves in OpenSolaris | Comments[1]
Wednesday Jun 15, 2005
July Australian Personal Computer Magazine Features Solaris 10
This one has been in the works for a couple of months.
Some time back we were approached by the magazine to do a feature issue on Solaris 10, including a copy of Solaris 10 on the DVD that ships with each issue.
It's happened with the July Issue.
The DVD includes the four iso images that comprise Solaris 10 FCS for x86 and amd64.
Reviews from APC staff include
"Solaris is a flexible and powerful OS that can run everything from a home PC to massive multi-CPU servers. Now it is free,Solaris seems a viable option for small to medium businesses wanting a secure and stable OS. To cap it off, a great office suite - StarOffice 7 - is bundled with the program." Tony Sarno, Editor, APC Magazine
"Sun's Solaris is an operating system that typically powers serious computing infrastructures. It is the most successful and widespread commercial Unix OS in the world.... For all its power, Solaris installs as easily on a PC as Windows XP or SUSE Linux." Peter Sbarski, APC reviewer
Features include
- a 2 page article on Sun's strategies with Solaris titled, "Open for Business",
- a first installment of an on-going workshop feature, this month titled, "Solaris, so good", 4 pages instructions on installation.
Also included is installation support for one month from Sun Australia. More information about support can be found by purchasing the magazine and finding the link information enclosed therein. Also at that link you will find pointer to how to install Solaris in a dual boot configuration with Windows XP.
Technorati Tags: Solaris, x86, amd64, magazine, unix, Sun Microsystems.
Posted at 11:07AM Jun 15, 2005 by Alan Hargreaves in Solaris | Comments[2]
Tuesday Jun 14, 2005
I can feel it coming in the air tonight
With apologies to Phil Collins ;)
The following have appeared in the last hour or so.
- Sun begins open-source Solaris era
- Discussion on the above news item.
- Sun to Release OpenSolaris Code, New Developer Web Portal
- Sun releasing OpenSolaris technologies via open source
- Sun Micro to start publishing Solaris source code
- Voices of OpenSolaris (well it appeared a few days ago)
Stay Tuned.
Technorati Tags: OpenSolaris, Solaris
Posted at 02:59PM Jun 14, 2005 by Alan Hargreaves in OpenSolaris | Comments[2]
Friday Jun 10, 2005
How do Solaris Filesystems Update Statistics Without Intimate Knowledge of the cpu Structure?
Well, opensolaris is now available. One of the nice things about this is it means that there are a lot more things that we can freely talk about.
There are a number of kstats that people who use filesystems simply assume should be updated in the cpu structure. Unfortunately, it appears that we never really advertised a method of doing this. Subsequently, some of the third party filesystems directly update them (for which we cannot really fault them).
Some time ago you may remember that we had a problem with various third party filesystems (and a few other things) breaking as a result of installing patch 108528-29 on Solaris 8. The root cause of that problem was that a new element was added into the middle of the cpu structure.
That is, the kstats changed their offset within the structure, so the packages were doing their updates to the wrong structure elements, as they had been compiled with the old definitions.
For my own interest I constructed the following write-up of how ufs does it as a result of that problem. I hope folks find it useful, if nothing else it will also give an introduction to navigating the OpenSolaris Source Browser and the bug tracking interface.
Now that the opensolaris code has been released under the CDDL licence, I can not only talk about this issue, but we can link into the source tree as well.
Kstats that filesystems use
The kstats that filesystems are expected to update form a part of the cpu_t structure. They are
cpu_stat.cpu_sysinfo.bread /* physical block reads */ cpu_stat.cpu_sysinfo.bwrite /* physical block writes (sync + async) */ cpu_stat.cpu_sysinfo.lread /* logical block reads */ cpu_stat.cpu_sysinfo.lwrite /* logical block writes */ cpu_stat.cpu_sysinfo.bawrite /* physical block writes (async) */ cpu_stat.cpu_vminfo.pgin /* pageins */ cpu_stat.cpu_vminfo.pgpgin /* pages paged in */ cpu_stat.cpu_vminfo.anonpgin /* anon pages paged in */ cpu_stat.cpu_vminfo.execpgin /* executable pages paged in */ cpu_stat.cpu_vminfo.fspgin /* fs pages paged in */ cpu_stat.cpu_vminfo.maj_fault /* major page faults */
and can be found in usr/src/uts/common/sys/sysinfo.h
Although ufs forms a part of the ON (O/S and Network) consolidation, it does not directly update the stats in the cpu structure. The updates are performed within a number of the routines that are used to do the I/O. The reason for this is that cpu is considered Contract/Private interface. This basically means that if a project wants to use the interface, a contract must exist with the interface owner. In this way, if the interface changes, we know which other modules are affected. For more information on interface stability, see attributes(5).
All of the cpu_vminfo statistics are updated from pageio_setup().
/* * Allocate and initialize a buf struct for use with pageio. */ struct buf * pageio_setup(struct page *pp, size_t len, struct vnode *vp, int flags)
In the case of (flags & B_READ), this routine will update all of the above values in cpu_vminfo as appropriate.
pgin will be incremented with each call.
pgpgin will be incremented by the number of pages required to page in len bytes.
anonpgin, execpgin and fspgin will be incremented similarly to pgpgin, based upon information found in pp->p_vnode.
maj_fault will be incremented in the case of a syncronous read (ie (flags & B_ASYNC) == 0).
cpu_sysinfo.bread and cpu_sysinfo.lread
lread is updated on every call to bread_common(). If we actually go to disk then bread is also updated.
/* * Common code for reading a buffer with various options * * Read in (if necessary) the block and return a buffer pointer. */ struct buf * bread_common(void *arg, dev_t dev, daddr_t blkno, long bsize)
breada() is similar to bread_common() except that it also triggers a read ahead on the next block.
/* * Read in the block, like bread, but also start I/O on the * read-ahead block (which is not allocated to the caller). */ struct buf * breada(dev_t dev, daddr_t blkno, daddr_t rablkno, long bsize)
cpu_sysinfo.bwrite, cpu_sysinfo.lwrite and cpu_sysinfo.bawrite
/* * Common code for writing a buffer with various options. * * force_wait - wait for write completion regardless of B_ASYNC flag * do_relse - release the buffer when we are done * clear_flags - flags to clear from the buffer */ void bwrite_common(void *arg, struct buf *bp, int force_wait, int do_relse, int clear_flags)
Each call to bwrite_common() increments both bwrite and lwrite. If we are forced to asyncronous, either by force_wait or (flag & B_ASYNC), then bawrite is also incrememented.
/* * Release the buffer, marking it so that if it is grabbed * for another purpose it will be written out before being * given up (e.g. when writing a partial block where it is * assumed that another write for the same block will soon follow). * Also save the time that the block is first marked as delayed * so that it will be written in a reasonable time. */ void bdwrite(struct buf *bp)
bdwrite() also increments lwrite each time it is called.
The future?
In November I logged RFE 6199092 which requests that these kstats be removed from the cpu structure and made a part of the DDI. This would fit quite nicely with some suggestions that we are hearing about creating filesystem statistics on a per zone basis as well as on a per cpu. We'll see how this RFE progresses.
Technorati Tags: Solaris,OpenSolaris

