Dave,

  That's a complex answer and you can't really answer it properly in a forum
for such a broad range of setups. I'll try to answer as generically as
possible focusing on O/S and CPU threading specifically. Please correct me
if I'm wrong here.

  You don't really need multiple processors to handle multi-threading.
Multi-threading has more to do with time slicing, priority marking and
keeping up with all of the threads running "at the same time". "At the same
time" can vary from taking turns on one merry-go-round or taking turns on 16
merry-go-rounds depending on whether there are 50 kids or 50,000. The more
load the more cores you need to sustain decent throughput of "sharing".
Think of the processor cores and level-one cache banks as turn-styles at the
amusement park or subway entrance.

  Since a processor can only handle one instruction at a time on each core
each thread will take a single-file turn submitting one instruction, or a
few dozen depending on how the schedule is setup for that thread. On
multi-core systems the multiple turn-styles allows more threads to run
'concurrently'. Regardless of core count, both thread priority and processor
affinity/assignment are how scheduling affects the length of time a single
kid can play on one specific merry-go-round and also how often that one kid
is allowed to jumping in front of everyone else on other merry-go-rounds.
Time priority and core assignment are handled a bit differently at the user
/app level on different operating systems but they all do basically the same
thing at the root.

  A multi-threaded application allows one parent process to spawn child
threads (not fork()) to handle specific workloads. Each thread is basically
a separate O/S process that has some shared memory space with the parent.
The parent is responsible for keeping up with the children for all phases of
the thread task cycle. Outside of signal/interrupt control, the child thread
is on its own to make the task happen.

  So a multi-threaded strategy is irrelevant to hardware architecture in a
general sense, but the O/S architecture plays a primary role in how threads
are handled and how efficient the application will operate. Together, they
both determine how overall efficient the threading will work. In a lot of
cases the idea of "throw more iron at it" stems from a mismatch of
efficiency between the hardware, the O/S and the application.

Regards,

----------------------------------------
Glen Batchelor
IT Director/CIO/CTO
All-Spec Industries
 phone: (910) 332-0424
   fax: (910) 763-5664
E-mail: webmas...@all-spec.com
   Web: http://www.all-spec.com
  Blog: http://blog.all-spec.com
----------------------------------------

> -----Original Message-----
> From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-
> boun...@listserver.u2ug.org] On Behalf Of Dave Taylor
> Sent: Monday, March 07, 2011 10:58 AM
> To: U2 Users List
> Subject: Re: [U2] Multi-Threading Universe Socket traffic
> 
> Symeon, and others,
> 
> How does a multi-threading strategy relate to the use of a multi-core,
> multi-cpu and/or clustered hardware server configuration using various
> operating systems and multi-value databases in terms of performance and
> thruput?  (A complete answer gets you an honorary PhD in whatever subject
> you'd like).
> 
> Dave Taylor
> Sysmark Information Systems, Inc.
> 49 Aspen Way
> Rolling Hills Estates, CA 90274
> (O) 800-SYSMARK (800-797-6275)
> (F) 310-377-3550
> (C) 310-561-5200
> www.sysmarkinfo.com
> ----- Original Message -----
> From: "Symeon Breen" <syme...@gmail.com>
> To: "'U2 Users List'" <u2-users@listserver.u2ug.org>
> Sent: Monday, March 07, 2011 1:16 AM
> Subject: Re: [U2] Multi-Threading Universe Socket traffic
> 
> 
> > Ok the python solution mentioned is one way - however this multi
> threading
> > you requiree is not a multi threading requirement - you are consuming a
> > socket service, and not accepting connections, - we do this kind of
> thing
> > all the time using phantoms.
> >
> >
> >
> > Lets say your batch of transactions is in a file, as you process each
> one
> > set a flag saying it is done, or delete the record or something, then
> > yourprogram can select the file, loop through the records and if the
> flag
> > is
> > set or the record does not exist it just skips onto the next one. You
> can
> > then start 10 processes running all doing the same thing and they will
> > work
> > through the file. Or you could have process 1 doing all the ones
> beginning
> > with a 1, 2 for 2 and so on.  You may want a controlling program that
> runs
> > up, counts the records on the file/in the batch and from that determined
> > how
> > many phantoms to run up. It then runs up the phantoms and then stops.
> >
> >
> >
> > Rgds
> >
> > Symeon.
> >
> >
> >
> > From: u2-users-boun...@listserver.u2ug.org
> > [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of nschroth
> > Sent: 05 March 2011 16:55
> > To: u2-users@listserver.u2ug.org
> > Subject: [U2] Multi-Threading Universe Socket traffic
> >
> >
> >
> >
> >
> > On Universe 10.1.14 over AIX 5.3, we currently communicate Credit Card
> > transactions via sockets (ISO-8583) using the following logic (works
> > fine):
> >  OPEN.ERR=openSocket(THIS.IP,THIS.PORT,TCP.MODE,TIMEOUT,THIS.HANDLE)
> >  INFO.ERR=getSocketInformation(THIS.HANDLE,PEER.FLAG,SOCKETINFO)
> >  WRITE.ERR=writeSocket(THIS.HANDLE,SEND.MSG,TIMEOUT,TCP.MODE,SEND.SIZE)
> >
> >
> READ.ERR=readSocket(THIS.HANDLE,RECV.MSG,RECV.LEN,TIMEOUT,TCP.MODE,RECV.SI
> ZE
> > )
> >
> > I am looking into using some sort of multi-threading logic to allow
> > increased volume in shorter timeframes.  For example, we now send
> batches
> > of
> > up to 3,000 cards via a ftps mechanism that responds normally within 3-5
> > minutes.  We want to benchmark doing this via the sockets instead.
> >
> > The Subroutine that does this Socket comm takes about 0.7 secs per trx,
> so
> > a
> > 3,000 card batch would take over 30 minutes single-threaded
> > (unacceptable).
> > Probably 80% of that 0.7 secs is transforming the data to send and then
> > transforming the response back to process.
> >
> > I hearthat my BASIC applicaton program can utilize PHANTOM processes
> > (unfamiliar territory) to launch multiple requests but I am not sure how
> > to
> > throw multiple trxs over the wall and make sure to put te correct
> > responses
> > back together with the appropriate request.
> >
> > Can anyone point me to some good documentation and/or example code for
> > doing
> > this?
> > --
> > View this message in context:
> > http://old.nabble.com/Multi-Threading-Universe-Socket-traffic-
> tp31076011p310
> > 76011.html
> > Sent from the U2 - Users mailing list archive at Nabble.com.
> >
> > _______________________________________________
> > U2-Users mailing list
> > U2-Users@listserver.u2ug.org
> > http://listserver.u2ug.org/mailman/listinfo/u2-users
> >
> >  _____
> >
> > No virus found in this message.
> > Checked by AVG - www.avg.com
> > Version: 10.0.1204 / Virus Database: 1435/3482 - Release Date: 03/04/11
> >
> > _______________________________________________
> > U2-Users mailing list
> > U2-Users@listserver.u2ug.org
> > http://listserver.u2ug.org/mailman/listinfo/u2-users
> >
> 
> _______________________________________________
> U2-Users mailing list
> U2-Users@listserver.u2ug.org
> http://listserver.u2ug.org/mailman/listinfo/u2-users

_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to