1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

measuring CPU, RAM, disk, and network performance (ubuntu 18.04)

Discussion in 'Programming' started by seductiveapps.com, Nov 1, 2018.

  1. #1

    i've built a web-app (a CMS, http://seductiveapps.com) that runs nicely and which is based on a growing number of opensource, free-to-use-commercially, libraries and software stacks.

    now i'd like to know when one of them is running into trouble, performance-wise

    what i have is :
    3 functional ubuntu computers behind 1 adsl line, 1 dev machine, 1 server with plenty of RAM, and 1 spare server with lubuntu and just 4G of RAM. All have SSDs of plentiful size.
    plenty of PHP and Javascript knowledge (and related stuff knowledge)
    database design experience in both couchdb (JSON, scalable, free) and PostGreSQL (SQL, scalable, free)
    outgoing email routines for PHP that work
    some experience with graphing libraries like Raphael (http://dmitrybaranovskiy.github.io/raphael/)
    what i need is :
    - via PHP calls to the operating system (ubuntu, via php's exec function), to monitor and store performance data (in SQL or CouchDB, if you have suggestions on how to store and retrieve i'm most willing to hear about it) *and* what that server activity is generated by, which ubuntu process, preferably also what started that process, including if possible which HTTP request generated the server activity,
    - the percentage of CPU and RAM used by each process during each sampling moment, and the same for each server request executed by any HTTP daemon (couchdb works by HTTP), and the same for PostGreSQL of which i don't know yet if it's able to do it's business via TCP/IP (i'm guessing and hoping it does),
    - an efficient way to extract all this data using PHP's exec() command, and i don't care how many commands i have to call and parse the output of, it's just that i don't know any of these commands besides "top", and that doesnt give me enough information,
    - and an intelligent suggestion on how often i could sample this data without affecting server performance, (writes into couchdb and postgresql are cheap, and are my preferred storage platforms because of scalability used in other features on the same server),

    of course, if there's some already-built free-to-use-commercially software out there that does this, i'd love to hear about that.

    if there's not, i'll have to build it myself, and i'll consider licensing it under the MIT license instead of my own license which is like the MIT license but which does demand 1% of a person's/organization's revenue for commercial usage.
    i think i owe the ubuntu and apache community, along with the tinymce builders, jquery guys, etc, etc, something back, which is MIT licensed, and available as a PHP app of which the output can be called up as a (semi-transparent) iframe. this might be it.

    i do need notification with full identification of server bottleneck as it happens, by email.

    and i kind of need the same for my network. i'm running a publicly accessible server from behind an ADSL line that's currently got 2MByte/sec outgoing bandwidth, which has to serve around 100KB per client itself (the rest is comfy stored at ISP hosting space and referenced from the HTML spit out by this server behind my ADSL line), and which is predicted to increase to 4MByte/sec in the coming year or so. After that, eventually fiber to my home in an old neighborhood will be put into the ground, and that growth path has me thinking of dedicated hosting like it's a waste of money (that i don't even have, btw).

    now, as i run into performance problems with specific software stacks (say for instance the IMAP server or LDAP server is responding too slowly because initially everything would run on 1 machine),
    move the ailing software stack to another machine (initially behind the same ADSL line and thus on the same internal network),
    then i need to measure performance of the internal network and external network too.
    any thoughts you have on how to get this data with the least amount of developer time spent, i'd love to hear as well.
    seductiveapps.com, Nov 1, 2018 IP