RE: sybperl and perl ithreads
"Ashish Gupta" <[email protected]>
| Newsgroups | gmane.comp.lang.perl.modules.dbi.sybase |
|---|---|
| Organization | Mizuho Securities Co., Ltd |
| Message-ID | <[email protected]> |
Hi Michael, Thanks for your suggestion. I tried using parallel processing using forking, and found that for my case linear processing is faster ! I checked 194 ase servers. Logged in and checked to see if there are any log suspended or blocked processes or if the number of used up locks is more than 80% of the max configured. In case the server is down, or any of the check fails (i.e., there are blocked processes etc.) then I send an email. 8 servers were down and 2 had blocked processes. I used Parallel::ForkManager. For max (10, 15, 20) processes, times were (34,35,34) seconds. And without any forking, the time was 25 seconds. So, seems for my case (1 CPU, program does a basic sybping kind of test, program needs to write results in a log file), forking processes is not worth while. I was thinking that maybe there was blocking amongst processes to write to the single log file ... but even if I remove writing to a log file, for parallel processes, the time is about 34 seconds. So, this probably is due to overhead related to forking new processes. Anyway thanks for your tip. I can try it for some other case. Thanks and regards, Ashish -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of [email protected] Sent: Thursday, September 22, 2005 8:28 PM To: [email protected] Cc: [email protected] Subject: RE: sybperl and perl ithreads Threads should normally work, although I stay away from them. You can achieve a similar result with multiple child processes forked from a main "parent" process that handles the coordination. There are some modules on CPAN that make that sort of thing easier (Parallele::ForkManager, for example). Michael Internet [email protected]@peppler.org - 22/09/2005 13:15 Please respond to [email protected] Sent by: [email protected] To: Michael PEPPLER cc: sybperl-l Subject: RE: sybperl and perl ithreads Hi Michael, Sybase : 12.5 Perl : 5.8.6 Sybperl : 2.18 I get the following errors: Use of uninitialized value in numeric lt (<) at sybping_ctlib line 199. Subroutine Sybase::CTlib::CS_SUCCEED redefined at (eval 12) line 1. The code near line 199 is: sub f_ctlib_srv_cb { ... return CS_SUCCEED if ($severity < 17); ... } Thanks and regards, Ashish -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of [email protected] Sent: Thursday, September 22, 2005 8:07 PM To: [email protected] Cc: [email protected] Subject: Re: sybperl and perl ithreads Which version of perl, which version of sybperl and which version of Sybase? Michael Internet [email protected]@peppler.org - 22/09/2005 12:58 Please respond to [email protected] Sent by: [email protected] To: sybperl-l cc: Subject: sybperl and perl ithreads Hi, Has anybody experienced problems while using perl threads with sybperl? I was trying to write a sybping program. We have about 200 servers. The program takes about 45 seconds to check all the servers. I thought that maybe I could reduce the time by using threads in perl. When I use threads, the program returns errors. These have to do with the parameters in the callback routines being undefined. Thanks for your help in advance. Best regards, Ashish This message and any attachments (the "message") is intended solely for the addressees and is confidential. If you receive this message in error, please delete it and immediately notify the sender. Any use not in accord with its purpose, any dissemination or disclosure, either whole or partial, is prohibited except formal approval. The internet can not guarantee the integrity of this message. BNP PARIBAS (and its subsidiaries) shall (will) not therefore be liable for the message if modified. --------------------------------------------- Ce message et toutes les pieces jointes (ci-apres le "message") sont etablis a l'intention exclusive de ses destinataires et sont confidentiels. Si vous recevez ce message par erreur, merci de le detruire et d'en avertir immediatement l'expediteur. Toute utilisation de ce message non conforme a sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse. L'internet ne permettant pas d'assurer l'integrite de ce message, BNP PARIBAS (et ses filiales) decline(nt) toute responsabilite au titre de ce message, dans l'hypothese ou il aurait ete modifie. Note: This e-mail contains privileged and confidential information and is for the sole use of the intended recipient(s). If you are not an intended recipient, you are hereby kindly requested to refrain from printing, copying, or distributing the information contained herein. Furthermore, any other use of the information contained herein is strictly prohibited. If you have received this transmission in error, please kindly notify the sender immediately and destroy all copies of the original message. Note: This e-mail contains privileged and confidential information and is for the sole use of the intended recipient(s). If you are not an intended recipient, you are hereby kindly requested to refrain from printing, copying, or distributing the information contained herein. Furthermore, any other use of the information contained herein is strictly prohibited. If you have received this transmission in error, please kindly notify the sender immediately and destroy all copies of the original message.