-
Junior Member
registered user
Why eats my Knoppix so much memory?
Hi there,
I´m very new to Knoppix and Linux, but although being a Newbie I set up a Webserver including Apache,Mysql,SSH and Samba within 3 afternoons
(hoorray ).
Before I start to explain my problem I want you to know my system details:
Knoppix 3.4 HDD-Install
AMD K6 500Mhz
192MB Memory
8GB HDD (1GB Linux Swap)
Connected to Internet via DSL over Router
10Mbit LAN
As I wanted to start developing on the server I recognized it´s behaving extremely slow. phpSysInfo tells me Knoppix uses always over 85% of Physical Memory and seldom more than 2% of Disk Swap.
Because of the server is behaving that dull, most of the clients which want to connect over Internet get timeout errors, even in my LAN it takes up to 12 seconds for the webpages to be shown.
And I don't know where this comes from..
I already took KDE off the start-inits but it still behaves the same.
Pinging the server is working fine, it´s responding below 1ms.
Hope someone can help me here...
If you want to, you can have a look at http://photonix.ath.cx/ , phpSysinfo will be shown.
-
Senior Member
registered user
Well - 192 MB isn't that much.
If your System isn't a Laptop, additional RAM will be quiete cheap.
Perhaps you may configure apache to use less memory, or samba, or mysql, or php.
sshd shouldn't use that much memory but you know: What you think is false - prove it!
So start 'top', hit 'M' ('m' might be usefull too) and look, who's eating ram.
Do you need a webserver and a samba-server?
-
Junior Member
registered user
Mh I need samba for copying my on Windows developed files, don't want to use ftp for that.
I thought 192MB would be enough for Linux...
I will try 'top' and let you know what it says..
Could anyone open photonix.ath.cx? At my company, with a Novel Border Manager, I can´t...
-
Junior Member
registered user
That's what top is telling me.
miniserv.pl can comes from Webmin IMHO.
Code:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
______________________________________________________________________
647 mysql 9 0 6056 6052 2584 S 0.0 3.2 0:00.12 mysqld
649 mysql 8 0 6056 6052 2584 S 0.0 3.2 0:00.01 mysqld
650 mysql 9 0 6056 6052 2584 S 0.0 3.2 0:00.00 mysqld
653 mysql 9 0 6056 6052 2584 S 0.0 3.2 0:00.00 mysqld
1831 root 10 0 4952 4944 4280 S 0.0 2.6 0:00.05 miniserv.pl
1837 root 10 0 4952 4944 4280 S 0.0 2.6 0:00.04 miniserv.pl
1839 root 10 0 4952 4944 4304 S 0.0 2.6 0:00.01 miniserv.pl
699 root 8 0 4948 4940 4300 S 0.0 2.6 0:01.62 miniserv.pl
563 root 9 0 4560 4556 4440 S 0.0 2.4 0:00.23 apache
570 www-data 9 0 4560 4556 4452 S 0.0 2.4 0:00.00 apache
571 www-data 9 0 4560 4556 4452 S 0.0 2.4 0:00.00 apache
572 www-data 9 0 4560 4556 4452 S 0.0 2.4 0:00.01 apache
573 www-data 9 0 4560 4556 4452 S 0.0 2.4 0:00.00 apache
574 www-data 9 0 4560 4556 4452 S 0.0 2.4 0:00.00 apache
665 root 9 0 2960 2960 1984 S 0.0 1.5 0:00.01 smbd
1650 root 9 0 2452 2452 1244 S 0.0 1.3 0:00.44 bash
577 root 8 0 1972 1968 1380 S 0.0 1.0 0:00.00 mount.smbfs
1506 root 9 0 1944 1940 1684 S 0.0 1.0 0:00.06 sshd
661 root 9 0 1872 1868 1404 S 0.0 1.0 0:00.03 nmbd
582 root 9 0 1568 1568 1192 S 0.0 0.8 0:00.06 cupsd
672 root 9 0 1448 1448 1316 S 0.0 0.8 0:00.47 sshd
608 root 9 0 1232 1232 1024 S 0.0 0.6 0:00.06 mysqld_safe
1662 root 17 0 1040 1040 840 R 0.7 0.5 0:00.53 top
446 root 9 0 632 632 544 S 0.0 0.3 0:00.00 automount
That's the headline of 'top':
Code:
Tasks: 37 total, 1 running, 36 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.3% user, 0.3% system, 0.0% nice, 99.3% idle
Mem: 191440k total, 138116k used, 53324k free, 7540k buffers
Swap: 1084376k total, 0k used, 1084376k free, 106912k cached
The server behaved also dull after I terminated every process except from apache..
-
Senior Member
registered user
Yes, I could open the php-page, and found a load of 95% too.
I even thoght 2 seconds of trying a ssh-login
- hey - only 84% now -
There are 6 apaches, 4 miniservs and 4 mysqlds running, - for fast answering to multiple requests.
Well that isn't very much, but the question is, how many users use the services, how often, and probably at the same time.
You might reduce the number of apaches and mysqlds in the conf-files.
But obviously the php-Page is for a good part measuring itself.
I would repeate the top-session, and while running top, start the php-script, to see, how much memory and cpu it is using. With 's' '1' you may set the interval for top to 1 (sleep, seconds?).
160 MB used - reportet by php, and 140 MB, reported by top, makes a difference of 20 MB for the php-task!
But both scenarios leave some memory free - 30 or 50 MB. So swapping doesn't seem to be involved.
The cpu-usage is very low - so no buggy program...
Is only the first request that slow, or does a second, invoked shortly later, need the same time? I'm thinking of some apm/ acpi saving power and sending harddrive to sleep...
-
Senior Member
registered user
Either there is some caching, or some sleeping involved.
I tried a request - about 12 s.
A repeated request: ca. 4 s.
This might indicate something
-
Junior Member
registered user
-
Senior Member
registered user
I'm not running apache, nor mySql.
I don't need a webserver.
And use postgresql as database-server.
but apache2 is installed, and in
/usr/local/apache2/conf/httpd.conf
there is a section, starting like this
##
## Server-Pool Size Regulation (MPM specific)
##
with settings for this and that.
for mySql search on your own.
-
Junior Member
registered user
Ok, after I regulated the pool-size it's only 65% memory in usage...
hm but still not satisfying I think..
-
Senior Member
registered user
My measurement:
Code:
Mem: 256336k total, 47744k used, 208592k free, 6856k buffers
Swap: 530104k total, 0k used, 530104k free, 24456k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME COMMAND
193 stefan 15 0 5968 2440 4968 S 0.0 1.0 0:00 bash
194 postgres 15 0 5776 2432 4748 S 0.0 0.9 0:00 bash
190 root 16 0 5736 2416 4748 S 0.0 0.9 0:00 bash
319 postgres 16 0 16612 1940 15m S 0.0 0.8 0:00 postmaster
325 postgres 19 0 7692 1744 6948 S 0.0 0.7 0:00 postmaster
324 postgres 19 0 8684 1732 6948 S 0.0 0.7 0:00 postmaster
404 root 16 0 6740 1708 5028 S 0.0 0.7 0:00 cupsd
336 root 15 0 2928 1340 2164 S 0.0 0.5 0:00 xitami
185 root 16 0 2384 1292 1360 S 0.0 0.5 0:00 klogd
165 root 16 0 2400 1056 2024 S 0.0 0.4 0:00 pppd
485 stefan 16 0 2064 960 1856 R 0.0 0.4 0:00 top
180 root 15 0 2164 808 1608 S 0.0 0.3 0:00 pppstatus
135 root 17 0 1732 676 1504 S 0.0 0.3 0:00 pump
183 root 16 0 1700 632 1408 S 0.0 0.2 0:00 syslogd
363 root 16 0 1528 504 1368 S 0.0 0.2 0:00 pppoe
191 root 16 0 1640 472 1352 S 0.0 0.2 0:00 getty
192 root 16 0 1640 472 1352 S 0.0 0.2 0:00 getty
195 root 16 0 1640 472 1352 S 0.0 0.2 0:00 getty
1 root 16 0 80 80 56 S 0.0 0.0 0:04 init
2 root 34 19 0 0 0 S 0.0 0.0 0:00 ksoftirqd/0
3 root 5 -10 0 0 0 S 0.0 0.0 0:00 events/0
SQL-Server: Postgres
HTTP-Servr: xitami
PHP: - none-
note:
- I didn't run any request for xitami and postgres.
- when I start X, and stop it, not all memory is shown as 'available'.
PS: Your server is now reponding in about 3 sec., even for the first request.
Similar Threads
-
By thaumielx72 in forum MS Windows & New to Linux
Replies: 4
Last Post: 11-24-2005, 05:23 PM
-
By Alexxx in forum Customising & Remastering
Replies: 1
Last Post: 02-24-2004, 04:24 PM
-
By billyjobob in forum General Support
Replies: 7
Last Post: 11-04-2003, 07:17 AM
-
By rrolsbe in forum General Support
Replies: 1
Last Post: 09-12-2003, 09:42 PM
-
By pnti in forum General Support
Replies: 3
Last Post: 07-14-2003, 04:46 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Watchguard XCS 570 Firewall SuperMicro 1U Server Intel 4GB VPN Router LINUX ðŸ
$182.36
1U BareMetal pfsense opnsense Router Firewall DNS Server 6x 10GB Ethernet Ports
$149.00
PFSENSE 15" Depth Server Router Firewall Supermicro X11SSH-F E3-1240 V5 32GB RAM
$382.00
POGO Linux WEBWARE 1150 Rack-Mount Server Pentium 4 2.8GHz 512MB - No Drives
$179.99
Domino Lotus Server 5.0.7 for OS/2 WSeB, RH Linux 6, Solaris, AIX, HP-UX, Win NT
$60.00
Red Hat Enterprise Linux 5 Server - New and Sealed
$16.99
2 x HP ProLiant BL460c (447707-B21) Blade Servers No RAM No HDD
$30.00
IBM CS821 20-Core 2.827GHz 128Gb 1.92Tb SSD 1U Linux Server - 8005-12N Power 8
$449.96
8x 240GB SSD 1U Rackmount Deduplication Compression Backup RAID Server X10DRW-iT
$499.00
IBM System X 3250 M5 Single Xeon Quad Core E3-1220 v3 @3.1GHz,8GB RAM,Linux SUSE
$159.00