Michael Peppler
Sybase Consulting
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
Sybase on Linux FAQ
Sybperl FAQ
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: mpeppler at itf dot ch (Michael Peppler)
Subject: Re: Efficiency of Sybperl 2.0 packages
Date: Dec 27 1995 2:05PM

> We're looking at the effects of using Sybperl in our web scripts, and would be
> grateful if anyone has an idea of the CPU and security issues that are
> associated with using Sybase::DBlib, Sybase::Sybperl, or Sybase::CTlib
> packages.

I just did some testing of different versions of Sybperl to measure the
overhea of starting the process. The idea was to measure the cost of
loading both the perl binary, but also of loading any shared libraries
that are required.

The script I tested did this

use Sybase::CTlib;   # Or Sybase::DBlib

require '';

$dbh = new Sybase::CTlib mpeppler;

I tested this on a Sun SS20/50, running SunOS 4.1.4

1) Linktype = dynamic

   CTlib:	1.00 user + 0.33 sys.
   DBlib:	0.33 user + 0.20 sys.

2) Static

   CTlib:	0.94 user + 0.41 sys.
   DBlib:	0.45 user + 0.20 sys.

It is obvious from this that the multiple shared libraries that the
CTlib extension must load has a cost. So I tried building a copy of
perl with all the Sybase stuff statically linked in:

3) FULL static (both libraries are linked in to one perl binary)

   CTlib:	0.78 + 0.33
   DBlib:	0.29 + 0.15
And just to be complete, I built a dynamic load version using the
static libraries:

4) dynamic static :-)

   CTlib:	1.05 + 0.42
   DBlib:	0.50 + 0.25

Interesting results...

Basically, my interpretation is that the startup of the CTlib module is
inherently slower than the DBlib module in the current implementation
(10.0.2). This appears to be due both to the loading of multiple shared
objects, but also apparently to a more complex initialisation

I'm going to look at this some more to see if there is something that
can be done from the perl point of vue, but at this point it would seem
that the Sybase::DBlib module is the better one to choose for Web-type