Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 24

Thread: Memory usage on Ubuntu Desktop 12.04 64 bits

  1. #11
    Join Date
    May 2012
    Beans
    48

    Re: Memory usage on Ubuntu Desktop 12.04 64 bits

    Stop work mean that when i try to load the site with browser, I can't. It takes too long to respond.

    Type of site: Dynamic content with a database behind it.
    Database: Mysql
    Webserver: Apache

    When i run command:
    Code:
    top
    i receive this:
    top - 15:52:05 up 11:21, 1 user, load average: 9.16, 6.43, 5.89
    Code:
    Tasks: 195 total,   8 running, 187 sleeping,   0 stopped,   0 zombie
    Cpu(s): 89.8%us,  9.2%sy,  0.0%ni,  0.3%id,  0.0%wa,  0.0%hi,  0.7%si,  0.0%st
    Mem:   8161688k total,  7344168k used,   817520k free,   117612k buffers
    Swap:  8370172k total,        0k used,  8370172k free,  6308200k cached
    
      PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
      515 mysql     20   0 2464m 105m 7444 S  174  1.3  16:16.88 mysqld
    13888 www-data  20   0  161m  31m 5472 R   99  0.4 377:15.31 ffmpeg
    12936 www-data  20   0  153m  23m 5040 R   98  0.3 399:06.39 ffmpeg
     1910 www-data  20   0  152m  21m 5228 R   60  0.3   0:04.11 ffmpeg
     1828 www-data  20   0  166m  38m 5772 R   47  0.5   1:13.89 ffmpeg
     1909 www-data  20   0  133m 6592 4496 R   39  0.1   0:03.21 ffmpeg
     1836 www-data  20   0  158m  26m 5264 R   37  0.3   1:04.56 ffmpeg
     1603 www-data  20   0  134m 8372 4904 S   32  0.1   0:39.91 ffmpeg
     1898 www-data  20   0  134m 8004 4896 S   11  0.1   0:02.67 ffmpeg
      741 www-data  20   0  471m  13m 4388 S    0  0.2   0:00.06 apache2
      794 root      20   0     0    0    0 S    0  0.0   0:00.13 kworker/1:1
     1892 www-data  20   0  469m  14m 4308 S    0  0.2   0:00.03 apache2
     1923 www-data  20   0  471m  13m 4232 S    0  0.2   0:00.01 apache2
     1924 www-data  20   0  470m  13m 3852 S    0  0.2   0:00.01 apache2
        1 root      20   0 24440 2424 1356 S    0  0.0   0:01.22 init
        2 root      20   0     0    0    0 S    0  0.0   0:00.00 kthreadd
        3 root      20   0     0    0    0 S    0  0.0   0:00.44 ksoftirqd/0
    No erros in mysql error log.
    In apache log there are only information about ffmpeg converstion.

  2. #12
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: Memory usage on Ubuntu Desktop 12.04 64 bits

    Code:
      PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
      515 mysql     20   0 2464m 105m 7444 S  174  1.3  16:16.88 mysqld
    13888 www-data  20   0  161m  31m 5472 R   99  0.4 377:15.31 ffmpeg
    12936 www-data  20   0  153m  23m 5040 R   98  0.3 399:06.39 ffmpeg
     1910 www-data  20   0  152m  21m 5228 R   60  0.3   0:04.11 ffmpeg
     1828 www-data  20   0  166m  38m 5772 R   47  0.5   1:13.89 ffmpeg
     1909 www-data  20   0  133m 6592 4496 R   39  0.1   0:03.21 ffmpeg
     1836 www-data  20   0  158m  26m 5264 R   37  0.3   1:04.56 ffmpeg
     1603 www-data  20   0  134m 8372 4904 S   32  0.1   0:39.91 ffmpeg
     1898 www-data  20   0  134m 8004 4896 S   11  0.1   0:02.67 ffmpeg
    Is apache supposed to be running ffmpeg?
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

  3. #13
    Join Date
    Dec 2007
    Location
    Idaho
    Beans
    4,976
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: Memory usage on Ubuntu Desktop 12.04 64 bits

    also a load average of 9 how many cores do you have, sounds like your CPU is pegged and that's why your site is unresponsive.
    "You can't expect to hold supreme executive power just because some watery tart lobbed a sword at you"

    "Don't let your mind wander -- it's too little to be let out alone."

  4. #14
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: Memory usage on Ubuntu Desktop 12.04 64 bits

    Quote Originally Posted by jerome1232 View Post
    also a load average of 9 how many cores do you have, sounds like your CPU is pegged and that's why your site is unresponsive.
    From their OP, it looks like it's a hex core CPU.

    I have a feeling the load is that high because ffmpeg is running 8 times, all as www-data, which shouldn't be launching ffmpeg, as far as I know...
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

  5. #15
    Join Date
    May 2012
    Beans
    48

    Re: Memory usage on Ubuntu Desktop 12.04 64 bits

    CPU : AMD FX-6200 /3.8G/X6/BOX AM3+
    Many users use ffmpeg to convert at same time. This can be the problem or no ? And if this is the problem how to correct it ?

    Thanks !

  6. #16
    Join Date
    Mar 2007
    Location
    Hillsboro, OR
    Beans
    169
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: Memory usage on Ubuntu Desktop 12.04 64 bits

    Quote Originally Posted by icaka92 View Post
    CPU : AMD FX-6200 /3.8G/X6/BOX AM3+
    Many users use ffmpeg to convert at same time. This can be the problem or no ? And if this is the problem how to correct it ?

    Thanks !
    Yes, this would be the problem. I assume your site is calling ffmpeg to convert video. Video conversion is very, very CPU and RAM intensive and what's most likely happening is that there are too many conversions happening at once. If there are more than 6, then your CPU can't really keep up and will stop responding while it tries to chug through all the video data. You'll either need to reprogram the site to queue video conversions and limit them to 4 or 5 at a time, or add more CPU cores to your server (though there are very diminishing returns on that as the highest you'd be able to go with that platform is 8 cores with an FX-8xxx CPU.

    EDIT: perhaps this will be helpful in reorganizing your application: http://ffmpeg.org/trac/ffmpeg/wiki/U...0PHP%20scripts
    Last edited by CrucifiedEgo; November 13th, 2012 at 10:52 PM.
    Apollo(ss): Ubuntu 8.10, Pentium T2330, 2GB RAM, 200GB(Laptop)
    Hestia: Ubuntu 8.04.1, 2.4Ghz P4, 1GB RAM, 500GB, (SMB/FTP/Torrent) {Rebuilding}
    Poseidon: Ubuntu Server 8.04.1, 512MB, LAMP, Mail (VPS)

  7. #17
    Join Date
    Nov 2008
    Location
    S.H.I.E.L.D. 6-1-6
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Memory usage on Ubuntu Desktop 12.04 64 bits

    Small explanation in order.

    Immagine each CPU is a checkout line at the supermarket.

    Each = represents full processor utilization, and is equal to 1.0 load in linux.


    So, if you have two lines, it looks like this


    ------------------
    ==================
    ------------------
    ==================
    ------------------

    And if you have more lanes, and so on.

    Now, If you have four processors, and a load of 8, it will look something like this


    ------------------
    ==
    ------------------
    ==
    ------------------
    ==
    ------------------
    ==
    ------------------

    The second = (after the first) shows that there is exactly 4.0 loads waiting to process ( one on each processor due to SMP).

    That means that there are tasks queued to run on the processor, but cannot due to the fact that the processors are still processing the first =. Those tasks will be queued until some of the tasks in the first '=' finish running.

    As a result, you are experiencing very slow response times- your query is queued somewhere in the line
    Don't waste your energy trying to change opinions ... Do your thing, and don't care if they like it.

  8. #18
    Join Date
    May 2012
    Beans
    48

    Re: Memory usage on Ubuntu Desktop 12.04 64 bits

    Hello,

    Thanks you for help ! I try
    Code:
    http://ffmpeg.org/trac/ffmpeg/wiki/Using%20FFmpeg%20from%20PHP%20scripts
    , but it is the same. I don't know how to correct it to work okay

  9. #19
    Join Date
    May 2012
    Beans
    48

    Re: Memory usage on Ubuntu Desktop 12.04 64 bits

    Any ideas ?

  10. #20
    Join Date
    Mar 2007
    Location
    Hillsboro, OR
    Beans
    169
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: Memory usage on Ubuntu Desktop 12.04 64 bits

    Quote Originally Posted by icaka92 View Post
    Any ideas ?
    Yes, fix your code and buy more hardware, your site is taxing the server and it can't handle the load.
    Apollo(ss): Ubuntu 8.10, Pentium T2330, 2GB RAM, 200GB(Laptop)
    Hestia: Ubuntu 8.04.1, 2.4Ghz P4, 1GB RAM, 500GB, (SMB/FTP/Torrent) {Rebuilding}
    Poseidon: Ubuntu Server 8.04.1, 512MB, LAMP, Mail (VPS)

Page 2 of 3 FirstFirst 123 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •