Loading ...
Sorry, an error occurred while loading the content.
 

Is the Rpi Up to it?

Expand Messages
  • w4jpa
    I would be interested in hearing from anyone using a database(s) on the pi. A program I m hoping to use has to access some very small dbs, typically
    Message 1 of 8 , May 12 9:52 AM
      I would be interested in hearing from anyone using a database(s) on the pi.

      A program I'm hoping to use has to access some very small dbs, typically < 20 records. The time for a request to come up with an answer seems unduly long to me. Is db'ing perhaps the pi's Achilles heel? I'm really hoping it's something I'm doing wrong in the app.
      73 BobJ W4JPA
    • Gerry Hull
      Lordy, yes!! I run an Asterisk PBX on my Pi which has a MySQL database with lots of records! (check out http://nerdvittles.com/?p=3026) 73, Gerry W1VE
      Message 2 of 8 , May 12 10:36 AM
        Lordy, yes!!  I run an Asterisk PBX on my Pi which has a MySQL database with lots of records!  (check out http://nerdvittles.com/?p=3026)

        73, Gerry W1VE


        On Sun, May 12, 2013 at 12:52 PM, w4jpa <abjarvis@...> wrote:
         

        I would be interested in hearing from anyone using a database(s) on the pi.

        A program I'm hoping to use has to access some very small dbs, typically < 20 records. The time for a request to come up with an answer seems unduly long to me. Is db'ing perhaps the pi's Achilles heel? I'm really hoping it's something I'm doing wrong in the app.
        73 BobJ W4JPA


      • Dave Cochran
        What kind of times are you getting for your queries to return? A small database of 20 records should not be very intensive, even full table scans should
        Message 3 of 8 , May 12 11:32 AM
          What kind of times are you getting for your queries to return?  A small database of 20 records should not be very intensive, even full table scans should return pretty quickly.
          What are you using for storage? 

          I have two Pi's running MySQL servers... they are not terribly fast... but they are adequate for the purposes I'm using them for...  MediaWiki one one and the other is a private DB.  my Pi with the Class 10 SD card does OK with ~200M databases.  The other with a Class 4 card no so much, better performance mounting the databases over NFS.  Otherwise I offload the the queries to my remote MySQL servers over the network for my bigger databases (about 16G worth of data) works out well.


          Dave




          Performance is really going to be based on the speed and access times of the media being accessed.

          On Sun, May 12, 2013 at 11:52 AM, w4jpa <abjarvis@...> wrote:
           

          I would be interested in hearing from anyone using a database(s) on the pi.

          A program I'm hoping to use has to access some very small dbs, typically < 20 records. The time for a request to come up with an answer seems unduly long to me. Is db'ing perhaps the pi's Achilles heel? I'm really hoping it's something I'm doing wrong in the app.
          73 BobJ W4JPA




          --
          Dave Cochran
          --
          Μολον λαβέ

        • Stephen Misel
          MySQL works fine, although you might want to look at something more lightweight like SQLite... assuming you need the complexities of SQL. 73, Steve K4WEB
          Message 4 of 8 , May 12 11:35 AM
            MySQL works fine, although you might want to look at something more lightweight like SQLite... assuming you need the complexities of SQL.

            73,

            Steve K4WEB


            On Sun, May 12, 2013 at 12:52 PM, w4jpa <abjarvis@...> wrote:
             

            I would be interested in hearing from anyone using a database(s) on the pi.

            A program I'm hoping to use has to access some very small dbs, typically < 20 records. The time for a request to come up with an answer seems unduly long to me. Is db'ing perhaps the pi's Achilles heel? I'm really hoping it's something I'm doing wrong in the app.
            73 BobJ W4JPA


          • Kevin Kleinfelter
            How long is unduly long? Are we talking msec, second, or tens of seconds? When it is processing the queries, how busy is your CPU? e.g. What does top
            Message 5 of 8 , May 12 12:09 PM
              How long is 'unduly long?'  Are we talking msec, second, or tens of seconds?

              When it is processing the queries, how busy is your CPU?  e.g. What does 'top' tell you are the top 3 processes and what percent of CPU is each using?

              What does 'iotop' tell you are your top 3 I/O sources and what percent of I/O is each doing?

              Knowing what your expectations are, and knowing what your Pi is busy doing, I can give a better answer.  My *intuition* is that what is happening is that most of your DB program is paged out, and has to get paged in before starting query execution.  If that's the case, setting the options on your DB to use the minimum subset of your DB features may help.  But if your Pi is busy doing other work, that's the cause.

              There isn't anything fundamentally absent from the Pi which would prevent a small database program from accessing your data almost as effectively as a custom-written program doing file I/O.  Which DB are you using?  MySQL is going to have a larger footprint than SQLite.  Since the Pi has little memory, loading MySQL is going to take longer than loading SQLite.  OTOH, if you have 20 records and you can store them in text format, 'grep' is going to be faster than either.
              Kevin / K4KPK

              On Sun, May 12, 2013 at 12:52 PM, w4jpa <abjarvis@...> wrote:
               

              I would be interested in hearing from anyone using a database(s) on the pi.

              A program I'm hoping to use has to access some very small dbs, typically < 20 records. The time for a request to come up with an answer seems unduly long to me. Is db'ing perhaps the pi's Achilles heel? I'm really hoping it's something I'm doing wrong in the app.
              73 BobJ W4JPA


            • w4jpa
              Thank you, and the others that replied. I tried to keep my original request concise but did mention up to 20 seconds against a small (
              Message 6 of 8 , May 12 1:06 PM
                Thank you, and the others that replied. I tried to keep my original request concise but did mention up to 20 seconds against a small (<20) record table.

                This db work is internal to the application program so I'm not able to query the table through a separate app. (Though I am considering setting MySQL/PHP just to get the feel of this). In the meantime I'll look out for those 'top' and 'iotop' numbers. I have two weeks experience with Linux so in a learning curve here. One replier brought my attention differently performing SD disks, something I had no idea about.

                So again, thank you for your replies and to conclude this thread (for hopefully more exciting things) it is the program or more likely my setup rather than a generic pi restraint that causes the slow response.
                73 All

                --- In Raspberry_Pi_4-Ham_RADIO@yahoogroups.com, Kevin Kleinfelter <kleinfelter.groups@...> wrote:
                >
                > How long is 'unduly long?' Are we talking msec, second, or tens of seconds?
                >
                > When it is processing the queries, how busy is your CPU? e.g. What does
                > 'top' tell you are the top 3 processes and what percent of CPU is each
                > using?
                >
                > What does 'iotop' tell you are your top 3 I/O sources and what percent of
                > I/O is each doing?
                >
                > Knowing what your expectations are, and knowing what your Pi is busy doing,
                > I can give a better answer. My *intuition* is that what is happening is
                > that most of your DB program is paged out, and has to get paged in before
                > starting query execution. If that's the case, setting the options on your
                > DB to use the minimum subset of your DB features may help. But if your Pi
                > is busy doing other work, that's the cause.
                >
                > There isn't anything fundamentally absent from the Pi which would prevent a
                > small database program from accessing your data almost as effectively as a
                > custom-written program doing file I/O. Which DB are you using? MySQL is
                > going to have a larger footprint than SQLite. Since the Pi has little
                > memory, loading MySQL is going to take longer than loading SQLite. OTOH,
                > if you have 20 records and you can store them in text format, 'grep' is
                > going to be faster than either.
                > Kevin / K4KPK
                >
                > On Sun, May 12, 2013 at 12:52 PM, w4jpa <abjarvis@...> wrote:
                >
                > > **
                > >
                > >
                > > I would be interested in hearing from anyone using a database(s) on the pi.
                > >
                > > A program I'm hoping to use has to access some very small dbs, typically <
                > > 20 records. The time for a request to come up with an answer seems unduly
                > > long to me. Is db'ing perhaps the pi's Achilles heel? I'm really hoping
                > > it's something I'm doing wrong in the app.
                > > 73 BobJ W4JPA
                > >
                > >
                > >
                >
              • Jim Thisdale
                one thing you might do is mount a usb memory stick and put your DB on that to keep the writes down on your sdcard. -Jim- N1JMM, KB1YPL_B Visit my Pi running
                Message 7 of 8 , May 12 2:29 PM
                  one thing you might do is mount a usb memory stick and put your DB on that to keep the writes down
                  on your sdcard.

                  -Jim- N1JMM, KB1YPL_B
                  Visit my Pi running ircddb, dvrptr, Apache & many other things:
                  http://n1jmm.no-ip.org

                  On 5/12/13 12:52 PM, w4jpa wrote:
                  > I would be interested in hearing from anyone using a database(s) on the pi.
                  >
                  > A program I'm hoping to use has to access some very small dbs, typically < 20 records. The time for a request to come up with an answer seems unduly long to me. Is db'ing perhaps the pi's Achilles heel? I'm really hoping it's something I'm doing wrong in the app.
                  > 73 BobJ W4JPA
                  >
                  >
                  >
                  > ------------------------------------
                  >
                  > (Please trim inclusions from previous messages) Yahoo! Groups Links
                  >
                  >
                  >
                  >
                • John Ferrell
                  There is one more thing I need to figure out!!! ... -- John Ferrell W8CCW That which can be destroyed by the truth should be. P.C. HODGELL
                  Message 8 of 8 , May 12 6:36 PM
                    There is one more thing I need to figure out!!!

                    On 5/12/2013 5:29 PM, Jim Thisdale wrote:
                    > one thing you might do is mount a usb memory stick and

                    --
                    John Ferrell W8CCW
                    That which can be destroyed by the truth should be.
                    P.C. HODGELL
                  Your message has been successfully submitted and would be delivered to recipients shortly.