From 025e15b2ba7f54f87cf409fd7c3dd77746c72858 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sun, 3 Feb 2013 10:44:49 +0100 Subject: add hosts --- sload.buetow.org/OLDPROJECT | 1 + sload.buetow.org/content/50.SVN-Download.xml | 7 ++++ sload.buetow.org/content/98.contact.xml | 20 ++++++++++ sload.buetow.org/content/99.license.xml | 54 +++++++++++++++++++++++++++ sload.buetow.org/content/home.xml | 54 +++++++++++++++++++++++++++ sload.buetow.org/htdocs/images/haskell.png | Bin 0 -> 8184 bytes 6 files changed, 136 insertions(+) create mode 100644 sload.buetow.org/OLDPROJECT create mode 100644 sload.buetow.org/content/50.SVN-Download.xml create mode 100644 sload.buetow.org/content/98.contact.xml create mode 100644 sload.buetow.org/content/99.license.xml create mode 100644 sload.buetow.org/content/home.xml create mode 100644 sload.buetow.org/htdocs/images/haskell.png (limited to 'sload.buetow.org') diff --git a/sload.buetow.org/OLDPROJECT b/sload.buetow.org/OLDPROJECT new file mode 100644 index 0000000..54dc28c --- /dev/null +++ b/sload.buetow.org/OLDPROJECT @@ -0,0 +1 @@ +SLoad is an abbreviation for serverload. SLoad uses basic parameters (current CPU peak, current requests per second) for approximating the need of additional servers. It's programmed in Haskell. diff --git a/sload.buetow.org/content/50.SVN-Download.xml b/sload.buetow.org/content/50.SVN-Download.xml new file mode 100644 index 0000000..cace27e --- /dev/null +++ b/sload.buetow.org/content/50.SVN-Download.xml @@ -0,0 +1,7 @@ + + + SVN Download + SLoad can be downloaded from SVN. Use the following steps to do so: + svn co https://ssl.buetow.org/repos/utils/sload/ + + diff --git a/sload.buetow.org/content/98.contact.xml b/sload.buetow.org/content/98.contact.xml new file mode 100644 index 0000000..f46ee65 --- /dev/null +++ b/sload.buetow.org/content/98.contact.xml @@ -0,0 +1,20 @@ + + + Contact Me/Us + + Please use the + Development Mailing List + for any considerations of this humble programming project or any other programming project of mine. + + + But you may also use other methods such as listed + on this site + for example. + + + If you are interested in other projects please visit + http://dev.buetow.org + :) + + + diff --git a/sload.buetow.org/content/99.license.xml b/sload.buetow.org/content/99.license.xml new file mode 100644 index 0000000..3f04d0a --- /dev/null +++ b/sload.buetow.org/content/99.license.xml @@ -0,0 +1,54 @@ + + + License + + SLoad is (C) by Paul Buetow. + + + + All rights reserved. + + + + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + + + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + + + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + + + + * Neither the name of buetow.org nor the names of its contributors may + be used to endorse or promote products derived from this software + without specific prior written permission. + + + + +THIS SOFTWARE IS PROVIDED BY Paul Buetow ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL Paul Buetow BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING +IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + + + + diff --git a/sload.buetow.org/content/home.xml b/sload.buetow.org/content/home.xml new file mode 100644 index 0000000..24c99ae --- /dev/null +++ b/sload.buetow.org/content/home.xml @@ -0,0 +1,54 @@ + + + SLoad + Calculating server CPU loads + + + In order to learn functional programming and to calculate server loads at work I programmed in my spare time this small tool using the purely functional programming language + Haskell! + SLoad is an abbreviation for serverload. SLoad uses basic parameters (current CPU peak, current requests per second) for approximating the need of additional servers. + + In order to get started check it out from the Subversion repository. You also need to install GHC (the Haskell compiler). + +pbuetow@earth:~/svn/sload/trunk$ make +ghc SLoad.hs -o sload + + Lets imagine you own an apache server cluster which consists of 12 physical servers. The current maximum CPU usage (CPU peak) is 70%. A single server of the cluster handles at the moment 323 requests per seconds (request peak). And you want to know "does my farm handle 5000000 more requests per day?": + +pbuetow@earth:~/svn/sload/trunk$ ./sload --name=serverfarm.example.net --servers=12 \ + --cpuPeak=70 --peak=323 --requests=5000000 +Requests : 5000000.0 +Percentage of req. to use: 100.0 +Approximated peak: 277.77777 requests per second (Peak = 2 * (5000000.0/(60 * 60 * 10))) +serverfarm.example.net (12.0 Servers): + currentPeakPerServer: 323.0 + currentCpuPeakPerServer: 70.0 + currentPeakPerFarm: 3876.0 + possiblePeakPerFarm: 5038.8 + possibleAddPeak (possiblePeakPerFarm - currentPeakPerFarm): 1162.7998 + addPeakPerServer: 23.148148 + addPeakPerFarm: 277.77777 + leftPeak (possibleAddPeak - addPeakPerFarm): 885.02203 + currentCpuPerPeak (currentCpuPeakPerServer / currentPeakPerServer): 0.21671827 + neededCpuPeakPerServer (currentCpuPeakPerServer + addPeakPerServer * currentCpuPerPeak): \ + 75.016624 + + The approximated peak is being calculated using 2 * (requestsPerDay/10h). This formular has been well-tried and tested. It is not proven that this formular is always right, but it is more a 'worst case' approach. Which is ok for calculating server loads as long as you don't do a 'best case' calculation which may lead to a server overload. The value of neededCpuPeakPerServer shows if the cluster will handle the additional amount of requests. If neededCpuPeakPerSerer is less than 85 it should be ok. A value between 85 and 100 may be critical. A value more than 100 shows that there is definitive not enough power behind your cluster. + + + Requests: Requests per day your server should handle additionally to the current server load. You want to find out if your server cluster will handle this. + Percentage of req. to use: If you use 50, only half of "Requests" will be used in the following calculations.. + currentPeakPerServer: Requests per seconds a single server of the cluster handles (peak) + currentCpuPeakPerServer: The maximum (peak) CPU load of one of your servers. + currentPeakPerFarm: currentPeakPerServer * number of servers in the cluster. + possiblePeakPerFarm: How many requests per seconds your farm may handle (depending on the CPU % which is left) + possibleAddPeak: How many requests per seconds your farm may handle additionally to the CPU usage (depending on the CPU % which is left) + addPeakPerServer: How many requests per seconds a single server of your cluster may handle additionally. + addPeakPerFarm: addPeakPerServer * number of servers in the cluster. + leftPeak: How many requests per second can be handled more even after adding "Requests" to the cluster. + currentCpuPerPeak: How many CPU % is needed for a single request. + neededCpuPeakPerServer: How many CPU % (peak) is needed for a single server of the cluster after adding "Requests". + + + + diff --git a/sload.buetow.org/htdocs/images/haskell.png b/sload.buetow.org/htdocs/images/haskell.png new file mode 100644 index 0000000..6e4d7aa Binary files /dev/null and b/sload.buetow.org/htdocs/images/haskell.png differ -- cgit v1.2.3