Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Will more RAM help my database server?

Status
Not open for further replies.

maslett

Technical User
Mar 11, 2004
121
GB
Hi,

I have inherited an apache/mysql server at work. Every morning my colleagues complain about the speed of the database - looking at the sql process list there are usually about 8 SELECTS running, each using multiple tables one of which contains over 2.5 million records.

The thing grinds to a halt. When I do a "top" statement I'm told that out of 256MB RAM only about 5MB is free.

I want to install some more RAM but my immediate boss says this will not make any difference. I disagree.

Any input from you wondferful people here would be appreciated (and I don't mind being wrong).

Regards.
 
What are the specs of the machine?

What Operating System is this Running?

If its Windows with at least 1Ghz processor, at 256MB, any additional RAM will definitely make a difference. As The Server will haver more memory to work with when shuffling the tables and the records around in memory.

If you can increase it to 1GB, it may be your cap, do so.


If its a slow processor like 500MHz, then the difference may be less noticeable.

----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Behind the Web, Tips and Tricks for Web Development.
 
Your very very very first (VERY FIRST) task to look at is which queries are being run regularly. You want to see if you can find some poorly designed SQL. If it's the same SQL being used over and over again, well you have a few options.

You can:
-talk to the programmer who wrote the pile of junk and coach them on how to rewrite it (it will improve the results time for them, so they should be game) (also don't call it a pile of junk)

-check to see if the index is appropriate for the table with 2.5m rows

There are more drastic options. But I wouldn't even consider them without addressing the first one.
 
Cheers guys/gals.

OS:
Code:
Linux 2.4.31 #6 Sun Jun 5 19:04:47 PDT 2005 i686 unknown unknown GNU/Linux

Specs:
Code:
xxxxxxx
    description: Low Profile Desktop Computer
    product: OptiPlex GX1 450L+
    vendor: Dell Computer Corporation
    serial: RRDNL
    width: 32 bits
    capabilities: smbios-2.2 dmi-2.2 defhandler_coff defhandler_elf defhandler_lcall7 defhandler_libcso fake_utsname trace
    configuration: 
  *-core
       description: Motherboard
       physical id: 0
     *-firmware
          description: BIOS
          vendor: Dell Computer Corporation
          physical id: 0
          version: A07 (08/04/99)
          size: 64KiB
          capacity: 192KiB
          capabilities: isa pci pnp apm upgrade shadowing escd cdboot bootselect edd int13floppytoshiba int13floppy360 int13floppy1200 int13floppy720 int13floppy2880 int5printscreen int9keyboard int14serial int17printer int10video agp ls120boot zipboot
     *-cpu
          description: CPU
          product: Pentium III (Katmai)
          vendor: Intel Corp.
          physical id: 400
          bus info: cpu@0
          version: 6.7.3
          slot: Microprocessor
          size: 450MHz
          capacity: 600MHz
          width: 32 bits
          clock: 100MHz
          capabilities: fpu fpu_exception wp vme de pse tsc msr pae mce cx8 sep mtrr pge mca cmov pat pse36 mmx fxsr sse
        *-cache:0
             description: L1 cache
             physical id: 700
             size: 32KiB
             capacity: 32KiB
             capabilities: internal varies unified
        *-cache:1
             description: L2 cache
             physical id: 701
             size: 512KiB
             capacity: 512KiB
             capabilities: pipeline-burst synchronous internal varies unified
     *-memory
          description: System Memory
          physical id: 1000
          slot: System board or motherboard
          size: 256MiB
          capacity: 768MiB
        *-bank:0
             description: DIMM DRAM Synchronous
             physical id: 0
             slot: DIMM_A
             size: 256MiB
             width: 64 bits
        *-bank:1
             description: DIMM DRAM Synchronous [empty]
             physical id: 1
             slot: DIMM_B
             width: 64 bits
        *-bank:2
             description: DIMM DRAM Synchronous [empty]
             physical id: 2
             slot: DIMM_C
             width: 64 bits

Gruuu - I'll get back to you tomorrow on your post.

Thanks!
 
Your memory cap is 768MB. Which means you'll likely see some improvement if you add the max amount of RAM. However being a PIII at 450MHz will limit how noticeable it may be.

With that said, at under 40 bucks for a 512MB chip, I would think its low enough to warrant a try before spending 400 dollars on a new machine.


----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Behind the Web, Tips and Tricks for Web Development.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top