aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Pages: [1] 2

Author Topic: Various aMuled running?  (Read 6126 times)

scudelari

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 10
Various aMuled running?
« on: August 09, 2005, 04:40:27 PM »

Hello all.
I've got an old computer (PII 233 with 128MB) and I'm using it as a server of everything possible. And, as it it the router of my house's network, I've installed amuled and I'm using amuleweb to control it, with SAMBA to access the files.

The problem is that, I don't know why, there are 3 aMuled running, and that's just killing my memory!!!

Here's a copy of what I can see with the top command, selecting only the user that runs amuled and amuleweb.

Code: [Select]
top - 13:20:31 up 11 days, 19:32,  1 user,  load average: 0.12, 0.21, 0.72
Tasks:  67 total,   2 running,  65 sleeping,   0 stopped,   0 zombie
Cpu(s):  31.6% user,   3.6% system,   0.0% nice,  64.8% idle
Mem:    126544k total,   123196k used,     3348k free,    14580k buffers
Swap:   489940k total,    61120k used,   428820k free,    56944k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 1296 usuario_  12   0 28244  27m 6556 R  3.0 22.1 718:55.68 amuled
 1309 usuario_   9   0 10036 3020 2864 S  0.0  2.4   1:12.78 amuleweb
 1308 usuario_  17   0 10036 3020 2864 S  0.0  2.4   0:57.92 amuleweb
 1307 usuario_   9   0 28244  27m 6556 S  0.0 22.1   0:00.85 amuled
 1306 usuario_   9   0 10036 3020 2864 S  0.0  2.4   0:00.34 amuleweb
 1304 usuario_   9   0 28244  27m 6556 S  0.0 22.1   0:00.11 amuled

As you can see, there are 3 amuled and amuleweb. Each of those amuled processes are using 22.1 % of my memory!!! You can see also that there are only 3MB of memory remaining!

Is that a normal behavior of amuled, or did I do something studip?

Also, buying more memory would solve the problem? Or, if i do buy more memory, those amuled processes would keep greedly using 22.1% each?

If that's just as amuled should work, could anyone tell me why? I'm just curious :P

Thanks ;).


edit:
Added [code] tags for readability.
thedude0001
« Last Edit: August 09, 2005, 07:33:41 PM by scudelari »
Logged

wuischke

  • Developer
  • Hero Member
  • *****
  • Karma: 183
  • Offline Offline
  • Posts: 4292
Re: Various aMuled running?
« Reply #1 on: August 09, 2005, 05:41:05 PM »

Edit: Sorry, my fault. I didn't read properly.
« Last Edit: August 09, 2005, 08:35:47 PM by wuischke »
Logged

thedude0001

  • evil bugfinder ;)
  • Hero Member
  • *****
  • Karma: 6
  • Offline Offline
  • Posts: 827
Re: Various aMuled running?
« Reply #2 on: August 09, 2005, 07:32:14 PM »

wuischke, I think you got it the wrong way round, he is actually asking why there are three such processes ;)

scudelari, it might be that this is all just one amuled running (and one amuleweb). There are versions of top that show all threads amule uses. What also strikes me is that #2 & 3 nearly have no cpu time at all. Could you please give me the output of 'ps -ef' and 'free -m'?
Logged
Das Schlimme auf dieser Welt ist
daß die Dummen so selbstsicher sind
und die Gescheiten so voller Zweifel.

scudelari

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 10
Re: Various aMuled running?
« Reply #3 on: August 10, 2005, 04:11:59 AM »

Hello thedude0001, Thanks for the help ;)
as you requested:

Output from ps -ef:

Code: [Select]
UID        PID  PPID  C STIME TTY          TIME CMD
root         1     0  0 Jul28 ?        00:00:08 init [3]
root         2     1  0 Jul28 ?        00:00:00 [keventd]
root         3     1  0 Jul28 ?        00:00:00 [ksoftirqd_CPU0]
root         4     1  0 Jul28 ?        00:01:32 [kswapd]
root         5     1  0 Jul28 ?        00:00:04 [bdflush]
root         6     1  0 Jul28 ?        00:00:20 [kupdated]
root        10     1  0 Jul28 ?        00:00:00 [mdrecoveryd]
root        11     1  0 Jul28 ?        00:00:00 [kreiserfsd]
root        63     1  0 Jul28 ?        00:00:17 /usr/sbin/syslogd
root        66     1  0 Jul28 ?        00:00:00 /usr/sbin/klogd -c 3 -x
root       114     1  0 Jul28 ?        00:00:00 udevd
root       274     1  0 Jul28 ?        00:00:00 [khubd]
root      1220     1  0 Jul28 ?        00:00:00 /usr/sbin/inetd
root      1232     1  0 Jul28 ?        00:00:00 /usr/sbin/crond -l10
root      1242     1  0 Jul28 ?        00:00:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/run/mys
mysql     1263  1242  0 Jul28 ?        00:00:01 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pi
mysql     1264  1263  0 Jul28 ?        00:00:00 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pi
mysql     1265  1264  0 Jul28 ?        00:00:00 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pi
mysql     1266  1264  0 Jul28 ?        00:00:00 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pi
mysql     1267  1264  0 Jul28 ?        00:00:00 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pi
mysql     1268  1264  0 Jul28 ?        00:00:00 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pi
mysql     1269  1264  0 Jul28 ?        00:00:07 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pi
mysql     1270  1264  0 Jul28 ?        00:00:11 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pi
mysql     1271  1264  0 Jul28 ?        00:00:00 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pi
mysql     1272  1264  0 Jul28 ?        00:00:00 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pi
root      1273     1  0 Jul28 ?        00:00:01 /usr/sbin/httpd
root      1280     1  0 Jul28 ?        00:00:01 /usr/sbin/smbd -D
root      1282  1280  0 Jul28 ?        00:00:00 /usr/sbin/smbd -D
root      1283     1  0 Jul28 ?        00:00:03 /usr/sbin/nmbd -D
root      1285     1  0 Jul28 ?        00:00:01 /usr/sbin/gpm -m /dev/mouse -t ps2
root      1289     1  0 Jul28 ?        00:00:00 dhcpcd eth0
root      1291     1  0 Jul28 ?        00:00:16 dhcpd eth1
1001      1296     1  4 Jul28 ?        12:27:22 amuled
root      1297     1  0 Jul28 tty1     00:00:00 /sbin/agetty 38400 tty1 linux
root      1298     1  0 Jul28 tty2     00:00:00 /sbin/agetty 38400 tty2 linux
root      1299     1  0 Jul28 tty3     00:00:00 /sbin/agetty 38400 tty3 linux
root      1300     1  0 Jul28 tty4     00:00:00 /sbin/agetty 38400 tty4 linux
root      1301     1  0 Jul28 tty5     00:00:00 /sbin/agetty 38400 tty5 linux
root      1302     1  0 Jul28 tty6     00:00:00 /sbin/agetty 38400 tty6 linux
1001      1304  1296  0 Jul28 ?        00:00:00 amuled
1001      1306  1296  0 Jul28 ?        00:00:00 amuleweb --amule-config-file=/home/usuario_hd/.aMule/amule.conf
1001      1307  1304  0 Jul28 ?        00:00:00 amuled
1001      1308  1306  0 Jul28 ?        00:00:57 amuleweb --amule-config-file=/home/usuario_hd/.aMule/amule.conf
1001      1309  1308  0 Jul28 ?        00:01:12 amuleweb --amule-config-file=/home/usuario_hd/.aMule/amule.conf
root      1829     1  0 Jul28 ?        00:00:46 /usr/sbin/sshd
nobody   15688  1220  0 Jul31 ?        00:00:00 in.identd
nobody   15689 15688  0 Jul31 ?        00:00:00 in.identd
nobody   15690 15689  0 Jul31 ?        00:00:00 in.identd
nobody   15691 15689  0 Jul31 ?        00:00:00 in.identd
nobody   15692 15689  0 Jul31 ?        00:00:00 in.identd
nobody   15693 15689  0 Jul31 ?        00:00:00 in.identd
nobody   15694 15689  0 Jul31 ?        00:00:00 in.identd
nobody    6803  1273  0 Jul31 ?        00:00:09 /usr/sbin/httpd
nobody    6804  1273  0 Jul31 ?        00:00:03 /usr/sbin/httpd
nobody    6805  1273  0 Jul31 ?        00:00:04 /usr/sbin/httpd
nobody    6806  1273  0 Jul31 ?        00:00:03 /usr/sbin/httpd
nobody    6807  1273  0 Jul31 ?        00:00:04 /usr/sbin/httpd
nobody    6842  1273  0 Jul31 ?        00:00:07 /usr/sbin/httpd
nobody    6845  1273  0 Jul31 ?        00:00:04 /usr/sbin/httpd
nobody     500  1273  0 Aug02 ?        00:00:00 /usr/sbin/httpd
nobody    4190  1273  0 Aug03 ?        00:00:02 /usr/sbin/httpd
nobody    4191  1273  0 Aug03 ?        00:00:00 /usr/sbin/httpd
1001      6372  1280  0 Aug09 ?        00:00:00 /usr/sbin/smbd -D
root      6624  1829  0 00:48 ?        00:00:00 sshd: root@pts/0
root      6627  6624  0 00:49 pts/0    00:00:00 -bash
root      6640  6627  0 00:49 pts/0    00:00:00 ps -ef

you can see that there are 3 amuled running.

and the output from free -m:

Code: [Select]
            total       used       free     shared    buffers     cached
Mem:           123        115          8          0          7         60
-/+ buffers/cache:         47         76
Swap:          478         59        418

you can see that I really have some memory problem. Only 8MB of free memory...
Please, note that I still haven't restarted my computer since the last post, so this is really what's going on.

And again the top response - an updated one - selecting only the user that runs amuled:
Code: [Select]
top - 00:59:08 up 12 days,  7:11,  1 user,  load average: 0.32, 0.14, 0.04
Tasks:  66 total,   3 running,  63 sleeping,   0 stopped,   0 zombie
Cpu(s):   5.2% user,   1.6% system,   0.0% nice,  93.2% idle
Mem:    126544k total,   117520k used,     9024k free,     7456k buffers
Swap:   489940k total,    61236k used,   428704k free,    61316k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 1296 usuario_  14   0 28088  27m 6424 R  5.2 22.0 747:42.92 amuled
 1304 usuario_   8   0 28088  27m 6424 S  0.0 22.0   0:00.12 amuled
 1306 usuario_   9   0 10036 3020 2864 S  0.0  2.4   0:00.34 amuleweb
 1307 usuario_   9   0 28088  27m 6424 S  0.0 22.0   0:00.85 amuled
 1308 usuario_   8   0 10036 3020 2864 S  0.0  2.4   0:57.92 amuleweb
 1309 usuario_   9   0 10036 3020 2864 S  0.0  2.4   1:12.80 amuleweb
I though that it might be a way that amuled is coded. Perhaps it's process-oriented and not thread-oriented. But that would be kind of a nonsense, so I really don't think that it explains the problem I'm having. But it's the only think that would explain this strange behavior.

What I find curious is that all 3 processes uses almost the same amount of memory...

Waiting for you answer.
Thanks again.
« Last Edit: August 10, 2005, 04:14:12 AM by scudelari »
Logged

stefanero

  • Some Support
  • Developer
  • Hero Member
  • *****
  • Karma: 8
  • Offline Offline
  • Posts: 4235
Re: Various aMuled running?
« Reply #4 on: August 10, 2005, 08:32:15 AM »

you start it amuled with some kind of script?
Logged
In its default setup, Windows XP on the Internet amounts to a car
parked in a bad part of town, with the doors unlocked, the key in
the ignition and a Post-It note on the dashboard saying, "Please
don't steal this."

lfroen

  • Guest
Re: Various aMuled running?
« Reply #5 on: August 10, 2005, 09:06:23 AM »

take a look to ps --forest. You must be started several copies of amuled from badly written script. Each  one in turn started amuleweb.
This way you have 3 amuled + 3 amuleweb. Enjoy !
Logged

scudelari

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 10
Re: Various aMuled running?
« Reply #6 on: August 10, 2005, 02:50:23 PM »

Hello stefanero and everyone else.
I'm using slackware 10.1, so, to start amuled with the system boot, I've just added the following line to the /etc/rc.d/rc.local file.

Code: [Select]
su - usuario_hd -c amuled -f &
I'm not an linux expert, but I belive that this line is only executed once per boot, after everything else. What makes me believe in this is that, in this file, I've also added the following line:

Code: [Select]
dhcpd eth1;
and there is only one running process for the dhcp server daemon...

And, lfroen, I've also executed the line you've suggested but, since I'm accessing the server using SSH, it really didn't help ;).

Code: [Select]
root@darkstar:~# ps --forest
  PID TTY          TIME CMD
 7609 pts/0    00:00:00 bash
 7698 pts/0    00:00:00  \_ ps

But, if you really think that executing this line would help in some kind, I could plug the monitor and the keyboard and then reboot the system... I've not made it yet because I'm not using a script to start amuled.

Thanks for the help, everyone. I hope we can fix this problem :)
Logged

thedude0001

  • evil bugfinder ;)
  • Hero Member
  • *****
  • Karma: 6
  • Offline Offline
  • Posts: 827
Re: Various aMuled running?
« Reply #7 on: August 10, 2005, 04:59:31 PM »

lfroen, I think you're wrong here, take a look at the PPID's. The second amuled is started by the first one and the third is started by the second. Same goes for the amuleweb processes. We've had reports on such behaviour of ps and top before, I just can't find them right now to back this up ;)

scrudelari, I can actually see that you don't have a memory problem. Linux uses unused memory as a cache to speed up disk access. That is why any ammount of RAM is shown as used after the computer is running for some time and has made some disk access. If more memory is needed by programs Linux reduces the cache. free is a program that can show you how much memory really is used, and it shows you so in the second line. If you only look at the memory used by programs there are 47 MB used and 76 MB free, so you're ok :)
Logged
Das Schlimme auf dieser Welt ist
daß die Dummen so selbstsicher sind
und die Gescheiten so voller Zweifel.

Vollstrecker

  • Administrator
  • Hero Member
  • *****
  • Karma: 67
  • Offline Offline
  • Posts: 1551
  • Unofficial Debian Packager
    • http://vollstreckernet.de
Re: Various aMuled running?
« Reply #8 on: August 10, 2005, 10:31:22 PM »

scrudelari: You don't need to plugin an monitor. Just try ps --forest -A
Logged
Homefucking is killing prostitution

scudelari

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 10
Re: Various aMuled running?
« Reply #9 on: August 11, 2005, 04:36:19 PM »

Here you go, the response to ps --forest -A

 
Code: [Select]
PID TTY          TIME CMD
    1 ?        00:00:08 init
    2 ?        00:00:00 keventd
    3 ?        00:00:00 ksoftirqd_CPU0
    4 ?        00:01:39 kswapd
    5 ?        00:00:04 bdflush
    6 ?        00:00:21 kupdated
   10 ?        00:00:00 mdrecoveryd
   11 ?        00:00:00 kreiserfsd
   63 ?        00:00:17 syslogd
   66 ?        00:00:00 klogd
  114 ?        00:00:00 udevd
  274 ?        00:00:00 khubd
 1220 ?        00:00:00 inetd
15688 ?        00:00:00  \_ in.identd
15689 ?        00:00:00      \_ in.identd
15690 ?        00:00:00          \_ in.identd
15691 ?        00:00:00          \_ in.identd
15692 ?        00:00:00          \_ in.identd
15693 ?        00:00:00          \_ in.identd
15694 ?        00:00:00          \_ in.identd
 1232 ?        00:00:00 crond
 1242 ?        00:00:00 mysqld_safe
 1263 ?        00:00:01  \_ mysqld
 1264 ?        00:00:01      \_ mysqld
 1265 ?        00:00:00          \_ mysqld
 1266 ?        00:00:00          \_ mysqld
 1267 ?        00:00:00          \_ mysqld
 1268 ?        00:00:00          \_ mysqld
 1269 ?        00:00:07          \_ mysqld
 1270 ?        00:00:11          \_ mysqld
 1271 ?        00:00:00          \_ mysqld
 1272 ?        00:00:00          \_ mysqld
 1273 ?        00:00:01 httpd
 6803 ?        00:00:09  \_ httpd
 6804 ?        00:00:03  \_ httpd
 6805 ?        00:00:04  \_ httpd
 6806 ?        00:00:03  \_ httpd
 6807 ?        00:00:04  \_ httpd
 6842 ?        00:00:07  \_ httpd
 6845 ?        00:00:04  \_ httpd
  500 ?        00:00:01  \_ httpd
 4190 ?        00:00:02  \_ httpd
 4191 ?        00:00:00  \_ httpd
 1280 ?        00:00:01 smbd
 1282 ?        00:00:00  \_ smbd
24402 ?        00:00:00  \_ smbd
24621 ?        00:00:02  \_ smbd
 1283 ?        00:00:03 nmbd
 1285 ?        00:00:01 gpm
 1289 ?        00:00:00 dhcpcd
 1291 ?        00:00:17 dhcpd
 1296 ?        13:47:08 amuled
 1304 ?        00:00:00  \_ amuled
 1307 ?        00:00:00  |   \_ amuled
 1306 ?        00:00:00  \_ amuleweb
 1308 ?        00:01:01      \_ amuleweb
 1309 ?        00:01:16          \_ amuleweb
 1297 tty1     00:00:00 agetty
 1298 tty2     00:00:00 agetty
 1299 tty3     00:00:00 agetty
 1300 tty4     00:00:00 agetty
 1301 tty5     00:00:00 agetty
 1302 tty6     00:00:00 agetty
 1829 ?        00:00:49 sshd
24646 ?        00:00:00  \_ sshd
24651 pts/0    00:00:00      \_ bash
24664 pts/0    00:00:00          \_ ps
so, I guess that the other amuleds are indeed beeing executed by the first amuled.

What should I do? These processes are using my memory and they are not running!

Please help me out guys... Don't give up ;)
Logged

wuischke

  • Developer
  • Hero Member
  • *****
  • Karma: 183
  • Offline Offline
  • Posts: 4292
Re: Various aMuled running?
« Reply #10 on: August 11, 2005, 05:05:44 PM »

Quote
scrudelari, I can actually see that you don't have a memory problem. Linux uses unused memory as a cache to speed up disk access. That is why any ammount of RAM is shown as used after the computer is running for some time and has made some disk access. If more memory is needed by programs Linux reduces the cache. free is a program that can show you how much memory really is used, and it shows you so in the second line. If you only look at the memory used by programs there are 47 MB used and 76 MB free, so you're ok
If I understood dude right, you don't have any problems, it's just the better using of free memory Linux has.
« Last Edit: August 11, 2005, 05:06:56 PM by wuischke »
Logged

scudelari

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 10
Re: Various aMuled running?
« Reply #11 on: August 11, 2005, 05:31:25 PM »

I know, I've read what he wrote. But that doesn't change the fact that I've got 2 process that are using 22.1% of my memory and aren't doing anything at all - since thet are sleeping.
That's what troubles me...
And, on the other hand, that doesn't explain why there are 3 amuled processes running, and not only 1.
Or is it normal to have 3 amuled process running?
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: Various aMuled running?
« Reply #12 on: August 11, 2005, 05:34:55 PM »

They are using probably the SAME memory than the runnign aMule, not 20% everyone.

It might be normal to have 3 amuled processes, depènds on the threads spawned.
Logged

thedude0001

  • evil bugfinder ;)
  • Hero Member
  • *****
  • Karma: 6
  • Offline Offline
  • Posts: 827
Re: Various aMuled running?
« Reply #13 on: August 11, 2005, 08:32:02 PM »

22% of your 128 MB RAM are 28 MB. If every process really used another 28 MB the three amuled processes alone would be using a total of 84 MB. free shows you that actually only 47MB are used, so I think Kry's explanation might be the right one... So I think everything is alright with you :)
Logged
Das Schlimme auf dieser Welt ist
daß die Dummen so selbstsicher sind
und die Gescheiten so voller Zweifel.

scudelari

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 10
Re: Various aMuled running?
« Reply #14 on: August 11, 2005, 10:46:49 PM »

Ok, You've all convinced me.
Thanks everyone for the help, you all were very kind.
Thinking about this now makes me belive that indeed the 3 processes are using the SAME memory. It would be a damn of a coincidence if they were using different memory places and the same amount...
Logged
Pages: [1] 2