Useostime Question on Solaris
Posted in 2008
Topics: Platform-Specific Issues
Does any one have any test/experience on the cost difference on setting
USEOSTIME to 1?
Bruce Simms
Data Base Services
TALX Corporation
2330 Ball Drive
St. Louis, MO 63146
Phone (314) 214-7703
FAX (314) 983-3238
bsimms@talx.com
Bruce Simms wrote:
> Does any one have any test/experience on the cost difference on setting
> USEOSTIME to 1?>
The cost is VERY low, Bruce. It was made an ONCONFIG parameter because
way back when, SCO Xenix and some other UNIXes did not have an efficient
system call to provide high resolution time data so it was costly on
some platforms. Today all OSes that IDS runs on provide an efficient
implementation of gettimeofday() (or the Windoze equivalent) which is
the system call that IDS now uses on UNIX. It is VERY cheap.
I used it to calculate the maximum resolution of gettimeofday() and
therefore DATETIME YEAR TO FRACTION(5) on different platforms calling it
in a tight loop up to 100 million times todetermine if there was any
value to storing more than FRACTION(2) resolution. I'm going from
memory here (and I posted the resolution results on CDI a few years
ago), but on Solaris the resolution was ~1/300 seconds and the test
program reported that an average of 300-500 calls to gettimeofday)()
returned the same time value within the loop which also had to include
the two integer value comparisons and possibly an if test. That makes
the runtime cost of a call somewhere in the neighborhood of 1/150000
seconds on 1.2GHZ single core UltraSparc II (or III?) processors (24 IB)
the last time I ran the test. Darned efficient I'd say.
I can give you the source for the test program if you want it.
Art S. Kagel
Oninit
> Bruce Simms
> Data Base Services
> TALX Corporation
> 2330 Ball Drive
> St. Louis, MO 63146
>
> Phone (314) 214-7703
> FAX (314) 983-3238
> bsimms@talx.com
>
>
================================================================================
===========
Please access the attached hyperlink for an important electronic
communications disclaimer:
http://www.oninit.com/home/disclaimer.php
================================================================================
===========
Art,
Thanks for all you do for Informix and I was looking as I knew you had
something but had not been able to find it.
Bruce Simms
Data Base Services
TALX Corporation
2330 Ball Drive
St. Louis, MO 63146
Phone (314) 214-7703
FAX (314) 983-3238
bsimms@talx.com
-----Original Message-----
From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of
Art S. Kagel (Oninit)
Sent: Thursday, March 06, 2008 9:35 AM
To: ids@iiug.org
Subject: Re: Useostime Question on Solaris [11517]
Bruce Simms wrote:
> Does any one have any test/experience on the cost difference on
setting
> USEOSTIME to 1?>
The cost is VERY low, Bruce. It was made an ONCONFIG parameter because
way back when, SCO Xenix and some other UNIXes did not have an efficient
system call to provide high resolution time data so it was costly on
some platforms. Today all OSes that IDS runs on provide an efficient
implementation of gettimeofday() (or the Windoze equivalent) which is
the system call that IDS now uses on UNIX. It is VERY cheap.
I used it to calculate the maximum resolution of gettimeofday() and
therefore DATETIME YEAR TO FRACTION(5) on different platforms calling it
in a tight loop up to 100 million times todetermine if there was any
value to storing more than FRACTION(2) resolution. I'm going from
memory here (and I posted the resolution results on CDI a few years
ago), but on Solaris the resolution was ~1/300 seconds and the test
program reported that an average of 300-500 calls to gettimeofday)()
returned the same time value within the loop which also had to include
the two integer value comparisons and possibly an if test. That makes
the runtime cost of a call somewhere in the neighborhood of 1/150000
seconds on 1.2GHZ single core UltraSparc II (or III?) processors (24 IB)
the last time I ran the test. Darned efficient I'd say.
I can give you the source for the test program if you want it.
Art S. Kagel
Oninit
> Bruce Simms
> Data Base Services
> TALX Corporation
> 2330 Ball Drive
> St. Louis, MO 63146
>
> Phone (314) 214-7703
> FAX (314) 983-3238
> bsimms@talx.com
>
>
========================================================================
===================
Please access the attached hyperlink for an important electronic
communications disclaimer:
http://www.oninit.com/home/disclaimer.php
========================================================================
===================
************************************************************************
*******
Forum Note: Use "Reply" to post a response in the discussion forum.
See you at the IIUG Informix 2008 Conference
The Power Conference for Informix Professionals
April 27 - 30, 2008 Marriott Overland Park (Kansas City), Kansas
http://www.iiug.org/conf
Registration Now Open!!
I tried just that thing this morning and I found that the number of inserts
done over a particular time period were about the same.
Walt Lowich
Bruce Simms <BSimms@talx.com> wrote:
Does any one have any test/experience on the cost difference on setting
USEOSTIME to 1?
Bruce Simms
Data Base Services
TALX Corporation
2330 Ball Drive
St. Louis, MO 63146
Phone (314) 214-7703
FAX (314) 983-3238
bsimms@talx.com
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.
See you at the IIUG Informix 2008 Conference
The Power Conference for Informix Professionals
April 27 - 30, 2008 Marriott Overland Park (Kansas City), Kansas
http://www.iiug.org/conf
Registration Now Open!!
---------------------------------
Looking for last minute shopping deals? Find them fast with Yahoo! Search.
On Thu, Mar 6, 2008 at 7:34 AM, Art S. Kagel (Oninit) <art@oninit.com> wrote:
> Bruce Simms wrote:
> > Does any one have any test/experience on the cost difference on setting
> > USEOSTIME to 1?>
> The cost is VERY low, Bruce. It was made an ONCONFIG parameter because
> way back when, SCO Xenix and some other UNIXes did not have an efficient
> system call to provide high resolution time data so it was costly on
> some platforms. Today all OSes that IDS runs on provide an efficient
> implementation of gettimeofday() (or the Windoze equivalent) which is
> the system call that IDS now uses on UNIX. It is VERY cheap.
>
> I used it to calculate the maximum resolution of gettimeofday() and
> therefore DATETIME YEAR TO FRACTION(5) on different platforms calling it
> in a tight loop up to 100 million times todetermine if there was any
> value to storing more than FRACTION(2) resolution. I'm going from
> memory here (and I posted the resolution results on CDI a few years
> ago), but on Solaris the resolution was ~1/300 seconds and the test
> program reported that an average of 300-500 calls to gettimeofday)()
> returned the same time value within the loop which also had to include
> the two integer value comparisons and possibly an if test. That makes
> the runtime cost of a call somewhere in the neighborhood of 1/150000
> seconds on 1.2GHZ single core UltraSparc II (or III?) processors (24 IB)
> the last time I ran the test. Darned efficient I'd say.
>
> I can give you the source for the test program if you want it.
Art's analysis of the raw performance of gettimeofday() is accurate -
it is fast. It isn't a system call on Solaris; it is a direct read of
some memory locations. You can compare the speed of getpid() - which
is about the simplest system call - and gettimeofday() is way faster.
However, when IDS calls gettimeofday(), it also has to do some
post-processing of the data, and the way it does that post-processing
is a lot more expensive than the simple gettimeofday() call. Thus, if
you speak to Tech Support or R&D, they will tell you that USEOSTIME is
expensive.
Treat my comment with a large pinch of salt (because I only run toy
systems), but:
I run my systems with USEOSTIME 1 so I can get sub-second resolution
out of CURRENT. The performance impact for me is negligible. If you
are running a TPC benchmark and need to wring the utmost performance
out of the system, then USEOSTIME 0 may make sense. But for most
people most of the time, the difference is not measurable.
--
Jonathan Leffler #include <disclaimer.h>
Email: jleffler@earthlink.net, jleffler@us.ibm.com
Guardian of DBD::Informix v2007.0914 -- http://dbi.perl.org/
NB: Please do not use this email for correspondence.
I don't necessarily read it every week, even.