I have 4 GB RAM but still my server is very slow

Discussion in 'Site & Server Administration' started by Freewebspace, Aug 13, 2007.

  1. #1
    I have 4 GB RAM but still my server is very slow

    I am running 20 cron jobs at a time .Will it affect the server performance?

    my processor is AMD Opteron 1216HE [2.4GHz] Whether I should upgrade the processor also?
     
    Freewebspace, Aug 13, 2007 IP
  2. ES-Amar

    ES-Amar Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Got a few questions:

    How often are the cron jobs being run?
    What kind of processes are they running? (large db backups?)
    What OS are you running?

    Your processor is unlikely to be causing the problem, unless the process the cronjobs are running are very draining. If you are running very basic jobs, then it could be something with the way your server is built.
     
    ES-Amar, Aug 13, 2007 IP
  3. powerspike

    powerspike Peon

    Messages:
    312
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #3
    What i would suggest, is to be logged into the server when it's running slow, and check out ram usage(free -m), cpu useage (top), and network useage, one of them might be exceeding the limits of your server. It could also possibley be Disk i/o (ie using swap for ram), but i am unsure on how to check that one (disk i/o)
     
    powerspike, Aug 13, 2007 IP
  4. cyanide

    cyanide Peon

    Messages:
    483
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    0
    #4
    do any optimizing of mysql and apache?
    how about installation of caching software?
     
    cyanide, Aug 13, 2007 IP
  5. ilxeon

    ilxeon Peon

    Messages:
    336
    Likes Received:
    48
    Best Answers:
    0
    Trophy Points:
    0
    #5
    check out the swap of the server,free ram tells nothing as linux first uses it all and then distributes.
    use top when your server is running slow and post the results here :)
     
    ilxeon, Aug 13, 2007 IP
  6. agnivo007

    agnivo007 Peon

    Messages:
    4,290
    Likes Received:
    289
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Right...the suggested things are good enough at the moment to try out.
    Also comment on the nature of cron jobs, sites etc. on the server.
     
    agnivo007, Aug 13, 2007 IP
  7. EGS

    EGS Notable Member

    Messages:
    6,078
    Likes Received:
    438
    Best Answers:
    0
    Trophy Points:
    290
    #7
    There's a number of things that you need to look at to analyze WHY exactly your server is running slow.

    Looking at its processor, I don't think that the server could possibly process tasks or cron jobs slow. Being that it's a 64-bit processor, what operating system are you using with it?

    Now let's take a look at your RAM speed. If your RAM is 400mhz, that's the problem. Your processor is based on faster speeds of DDR2 RAM, which should be at least 640mhz.

    Now comes the question of how fast are your hard drive(s) and what are its cache(s)? You're going to want a single OR dual hard drive of at least 7200rpm speed and 8mb of cache.

    How are the loading speeds of the server? Any example IP to ping or website to ping/visit?
     
    EGS, Aug 13, 2007 IP
  8. Freewebspace

    Freewebspace Notable Member

    Messages:
    6,213
    Likes Received:
    370
    Best Answers:
    0
    Trophy Points:
    275
    #8
    I am using windows 2003 64 bit OS

    My cron jobs are just like a Search Engine .(It will not store the content)

    My Cpu usage is 100% whereas my RAM usage is just 25%

    I will post more details about it here.

    Microsoft Windows 2003 STD 64 bit SP2 STD-SRV-SP2-64

    Mother Board:SuperMicro H8SMI-2 AMD Opteron DualCore SingleProc Sata [1Proc]

    Processor: AMD Opteron 1216HE [2.4GHz]

    Hard Drive:250 GB, 3 Gb/s, 16 MB Cache, 7200 RPM

    Also the cron job I am running is just like an search engine,It will index page and then take out internal links and external links and store it and then will again index it
     
    Freewebspace, Aug 13, 2007 IP
  9. MrOrange

    MrOrange Peon

    Messages:
    117
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Well if your CPU is at 100% that's your problem.

    You'll have to rethink the way you go about spidering the pages &/or re-write the scheduled tasks to make them more efficient.
     
    MrOrange, Aug 13, 2007 IP
  10. Freewebspace

    Freewebspace Notable Member

    Messages:
    6,213
    Likes Received:
    370
    Best Answers:
    0
    Trophy Points:
    275
    #10
    that means instead of havinhg 20 Cron jobs at a time and spidering

    Whether I should I have five or anything?
     
    Freewebspace, Aug 13, 2007 IP
  11. EGS

    EGS Notable Member

    Messages:
    6,078
    Likes Received:
    438
    Best Answers:
    0
    Trophy Points:
    290
    #11
    Sounds like whatever application you're having these cron jobs do take up a lot of processing power...you need to decrease the number or change the set-up fo the cron jobs.

    I can't believe you're using 100% of your CPU...insane.
     
    EGS, Aug 13, 2007 IP
  12. Freewebspace

    Freewebspace Notable Member

    Messages:
    6,213
    Likes Received:
    370
    Best Answers:
    0
    Trophy Points:
    275
    #12
    Yes indeed

    I hav 20 cron jobs and it runs every hour!

    for example

    suppose cron starts at 1.03 AM ,It will finish on 1.58 AM (

    second cron will start on 1.06 AM It will finish on 2.02 AM

    like these 20 Crons....


    I should find a way out for this,I think my database would be using a lot of power as there are many queries in it...


    If you can't believe I will even show you a snap shot I should find a way out for this.
     
    Freewebspace, Aug 13, 2007 IP
  13. MrOrange

    MrOrange Peon

    Messages:
    117
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #13
    What sort of access do you have to the box? If you can remote to it you can try running a program like sysinternals process explorer (now microsoft) from here: http://www.microsoft.com/technet/sysinternals/Utilities/ProcessExplorer.mspx

    It'll identify what process in particular is chewing the CPU usage better than the windows task manager.

    What is the scheduled task executing? A web page, back end script ?
     
    MrOrange, Aug 14, 2007 IP
  14. webcosmo

    webcosmo Notable Member

    Messages:
    5,840
    Likes Received:
    153
    Best Answers:
    2
    Trophy Points:
    255
    #14
    Its your Cron Job I believe causing the problem. I had similar problem. You should check your database operations. If you put them on stored procedure, would help. Also On paging (page 1,2,3) you should retrieve only the requested page data, not all, and that should be done on a stored procedure.

    If any of your table has large number of data, it greatly affects the performance. To overcome this you should use properly designed indexing.

    I believe this would greatly improve the performance.
     
    webcosmo, Aug 14, 2007 IP
  15. agnivo007

    agnivo007 Peon

    Messages:
    4,290
    Likes Received:
    289
    Best Answers:
    0
    Trophy Points:
    0
    #15
    Distribute the cron jobs into smaller cron jobs and run them at 30 min intervals...this will lessen the load on the box considerably.

    Eg- 20 crons each spidering 500 sites at a time. Break into 48 smaller crons and set them to run with 30 min difference.
     
    agnivo007, Aug 14, 2007 IP
  16. webcosmo

    webcosmo Notable Member

    Messages:
    5,840
    Likes Received:
    153
    Best Answers:
    2
    Trophy Points:
    255
    #16
    If you are running search engine like thing for crawling, best idea is not to the cron on same server. instead you can do it on a different server, then update the public server at convenient. There may be some sort of synchronization required.
    Ask Google how they do it :)
     
    webcosmo, Aug 14, 2007 IP
  17. EGS

    EGS Notable Member

    Messages:
    6,078
    Likes Received:
    438
    Best Answers:
    0
    Trophy Points:
    290
    #17
    If you are wanting a large database that is fast in performance, then I'd really suggest going with PostreSQL or MS SQL.
     
    EGS, Aug 14, 2007 IP
  18. Freewebspace

    Freewebspace Notable Member

    Messages:
    6,213
    Likes Received:
    370
    Best Answers:
    0
    Trophy Points:
    275
    #18
    That means whether I should run the file path from another server

    like this http://www.site.com/run.php

    should be run on another server?
     
    Freewebspace, Aug 14, 2007 IP
  19. InfiniteTech

    InfiniteTech Active Member

    Messages:
    380
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    70
    #19
    I for one, do not know about any Cron job/tab for Windows :S

    Isnt it called Scheduled Tasks? If you are using cron job, let me know which one as I need one for my Windows server.

    Secondly... CPU means, Apache/Mail, check them.

    Secondly your crons. Make it in such away that when the second cron starts, the first should end and so on. Manage it, you will like it.

    Upgrade your process, always better!

    Install eAccelerator, save 25% CPU usage :p
     
    InfiniteTech, Aug 14, 2007 IP
  20. bouncer69

    bouncer69 Peon

    Messages:
    978
    Likes Received:
    43
    Best Answers:
    0
    Trophy Points:
    0
    #20
    Upgrade your machine to dual or quad processor.
     
    bouncer69, Aug 14, 2007 IP