[Buffalo-pm] Multi-Threaded Perl...

DANIEL MAGNUSZEWSKI dmagnuszewski at mandtbank.com
Tue Jun 14 06:56:53 PDT 2005


It's not a traditional database that I'd be using to store the results.
I'd be using RRDTool, where there is no handle that is needed. I will
have other information in a MySQL database but this should be separate
from the RRD/SNMP polling part.

I'll try and model both approaches, and perhaps this will be something
I can discuss during the July meeting - if anyone sounds interested.

-Dan

>>> "Jim Brandt" <cbrandt at buffalo.edu> 06/14/05 7:33 AM >>>
Dan,

With either approach, I'm thinking the tricky part is dealing with  
the database. For best performance, you only want to connect once,  
but if you have multiple processes contending for that DB handle, I'm 

thinking things could get messy.

Also, I would build a proof of concept with just a single program  
doing it the simple way and prove to yourself that it won't work. I  
agree that you'll probably have performance issues, but premature  
optimization can be a very bad thing. You'll feel better banging on  
the problem if you prove that it can't work the easy way.

Jim


On Jun 13, 2005, at 5:09 PM, DANIEL MAGNUSZEWSKI wrote:

>>> I am in the planning stages of writing a program that will
>>> make queries
>>> to a device (via SNMP), wait for a response, then do
>>> something with the
>>> information received (namely store it into a database), and move
>>>
> on
>
>> to
>>
>>> the next device in the list. Obviously, when having to do
>>> this thousands
>>> of times per a 5 minute time frame, a single threaded program can
>>>
> be
>
>>> restricted by the blocking for the I/O Requests. I figured
>>> that in order
>>> to maximize the speed, it would need to be multithreaded.

==========================================
Jim Brandt
Administrative Computing Services
University at Buffalo





More information about the Buffalo-pm mailing list