Re: Latency using UTL_TCP against SendMail on Linux box

From: Tim Cross <tcross_at_pobox.une.edu.au>
Date: 04 Jul 2002 08:29:24 +1000
Message-ID: <87r8ikzbqz.fsf_at_blind-bat.une.edu.au>


alanb_at_captura.com (AlanB) writes:

> I'm using UTL_TCP to support e-mails international because of extended
> ASSCI in the subject line.
>
> I'm noticing a latency between issuing a SMTP command like EHLO or
> MAIL TO or DATA to name a few. This latency takes about 2.5 seconds
> after issuing the command and before any results are retrievable with
> the UTL_TCP.GetLine command.
>
<snip>
>
> How is UTL_TCP communicating with SendMail?
> Is UTL_TCP reading a 'proprietary' buffer or is it using the SMTP
> buffer of SendMail?
> Is there a configuration parameter in SendMail to have the results
> delivered faster?
> Is UTL_TCP using Telnet to communicate with SendMail?

I gather you are using utl_tcp rather than utl_smtp because of the extended ASCII characters? Didn't know you couldn't use utl_smtp if you want to use extended ASCII.

The utl_tcp is implemented in JAVA (at least in 8.1.7). It uses tcp sockets to communicate witht the smtp port. I'm not sure exactly what you are referring to re: buffer use - the tcp_utl does do some buffering and smtp would have some buffering at its end, but the only link between the two ends is the tcp socket.

I would try communicating with the smtp port directly and issue smtp commands via telnet to see if you observe the same delays - its possible the delays you notice have nothing to do with Oracle. Keep in mind that tcp is a connection based protocol (as apart from connectionless protocols like udp), so its possible that if you have any network problems there may be delays due to packets needing to be resent etc. If possible, do this from the same server oracle is running on.

Some smtp/sendmail configurations can be a bit slow depending on the configuration - if the smtp configuration does checks for hosts in "black listed" sites like rbh to protect against spamming (e.g. refusing connections from known open smtp relays etc), this can slow down connections. If sendmail needs to verify originating hostnames etc, this can slow down connections if it has problems verifying hostnames/ip (due to incorrect dns configuration for the originating server etc).

tcp does do some buffering and from memory, there are some tcp settings and commands which can effect the impact of this buffering (like forcing a flush of the buffer, changing buffer size etc) - not sure to what extent you have access to these lower level options within utl_tcp though.

We are using the utl_smtp package to send mail from within plsql and have noticed no significant delays with making connections etc. The utl_smtp package utilizes the utl_tcp package to make connections to the smtp port etc.

Tim Received on Thu Jul 04 2002 - 00:29:24 CEST

Original text of this message