My previous question raised some follow up questions, so I am going to
try to clarify now by explaining the root of my problems:

My original (bash) script is the following:


                                ./getTime.pl >> result.txt
                                echo "started: concurrent."

                                # doing level of concurrency $CL
                                let I=1

                                while [ "$I" -le "$CL" ]; do
                                       ./my_read.pl &
                                        let I=$I+1
                                done

                                ./getTime.pl >> result.txt




My_read.pl just executes a single select statement on a database of 10^4
tuples in a MySQL version 3.23.53 MyISAM table. One such select takes 1.75
seconds to run serially.  The getTime.pl script gives me the time in
microseconds before and after the transaction using gettimeofday().

By running many my_real.pl with the & sign, I am trying to generate
several simultaneous concurrent READ transactions on the database. I want
to measure the change in the timing as I raise the concurrency level ($CL).
Note I am using MyISAM tables.  While they do not have transactional
support, they should cater to concurrent Read-only transactions.

However the time results I have obtained thus far indicate that the
my_read.pl script is running sequentially.  The TPS (transactions per
seconds) ratio remains constant.

I am using Debian with 256MB of RAM, and 4 GB of hard disk. Each tuple in
my database has roughly 4 doubles.

Also, I am pretty sure that the transactions are long enough to be
simultaneous.






---------- Forwarded message ----------
Date: Mon, 25 Nov 2002 12:38:45 -0500 (EST)
To: [EMAIL PROTECTED]
Subject: Executing concurrent select statements from perl on MySQL ISAM
    tables (fwd)


I am trying to make my perl script fork several processes that all execute
'select' statements on MySQL.  I want the statements to happen
concurrently (as I want to monitor the behaviour of MySQL with native ISAM
tables under this concurrent Read access). So I am using 'fork'.  However,
I think my 'select' statements are not happening concurrently.  Is there
something I am missing? Thanks.


Does anyone please have any sample code on how to execute *concurrent*
MySQL select statements on MyISAM tables?  I am looking for perl scripts,
bash scripts, whatever.




---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to