Koozali.org: home of the SME Server

Slow speed

Offline wilsonjc82

  • *
  • 6
  • +0/-0
Slow speed
« on: September 01, 2008, 04:06:32 PM »
I don't think this is a bug, (i've checked the bug tracker)

Although if I'm wrong, please slap me and point me in the direction of the answer

The ISP I work for has an SME server (7.3) it runs great, you could leave it forever and it would be fine, that is until you change something,

It takes ages, (and is only getting worse) to make changes to the domains, ibays etc.

The mail and such like is spot on, just this one issue,

Any ideas?

Thanks

John

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: Slow speed
« Reply #1 on: September 02, 2008, 04:21:07 AM »
wilsonjc82

What is your hardware, ie processor, HDD, memory RAM etc.
What load is the server doing, lot's or little.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline wilsonjc82

  • *
  • 6
  • +0/-0
Re: Slow speed
« Reply #2 on: September 02, 2008, 09:32:49 AM »
Hi Mary,

Server is generally fairly dead, its not that busy, ( no spam checking, antivirus is on, hosting a few domains)

600 user accounts for e-mail.

probably 200-300 domains.

I personally have never seen the processors hit 30% (load average is 0.17,0.32 and 0.25)

The machine is a server class machine, a Dell poweredge 2950
4 gig of RAM ( I can't remember the type off the top of my head)
4x2.0ghz Xeon processors (according to cat /etc/cpuinfo)

I hope this helps, as I can't understand why it takes upwards of 4 minutes to change an I-bay?

Maybe I'm just impatient

Thanks

John






Offline Daniel B.

  • *
  • 1,700
  • +0/-0
    • Firewall Services, la sécurité des réseaux
Re: Slow speed
« Reply #3 on: September 02, 2008, 09:54:39 AM »
Try running htop in a console to see what's going on... but with the spec you have, it shouldn't be a CPU or ram problem...
I've install SME on several Dell 2950, they are working great, and any action in the server manager is really fast compared to 'standard' hardware. But, as you are talking about modify an ibay, just look the amount of data in it. Modifying an ibay imply reseting the permissions on all the files, which can be quite long. Check the disk activity.

C'est la fin du monde !!! :lol:

Offline wilsonjc82

  • *
  • 6
  • +0/-0
Re: Slow speed
« Reply #4 on: September 02, 2008, 11:03:51 AM »
Thank you,

Didn't know about htop, much nicer than top.

This happens when the I bay is empty or has data, ( well it contains a single index.html file)


Running htop, whilst changing an Ibay, there doesn't seem to be a major increase in processor or memory usage, maybe it is re-writing permissions?

Thanks

John

Offline pfloor

  • *****
  • 889
  • +1/-0
Re: Slow speed
« Reply #5 on: September 03, 2008, 01:44:08 AM »
Look at your log files from an "ibay-modify" event and I think you may find your answer.

You have to remember that when you change an ibay the system regenerates some config files including httpd.conf.  If you in fact have 200-300 domains then the httpd.conf templates cycle through the virtual domains one at a time so your setup will take much longer than a system with only one or 2 domains.

600 users will also take a while to cycle through the user related templates.

Your log files will show you what is taking so long.
In life, you must either "Push, Pull or Get out of the way!"

Offline wilsonjc82

  • *
  • 6
  • +0/-0
Re: Slow speed
« Reply #6 on: September 03, 2008, 09:09:35 AM »
Hi, thanks for the heads up, I think I have found the issue, but there are 3 problems,

first, I'm a novice here, we got this server made for us and the company ran away ( they were supposed to look after it)
second, I'm not sure if I'm correct
Third I don't know how to fix it generally.

Now I like to try to work stuff out.

I think its the line I've highlighted that is the issue, but is there a way to make this more effecient?

3:34:44 midway esmith::event[22531]: Processing event: ibay-modify [domain]
Sep  2 13:34:44 midway esmith::event[22531]: Running event handler: /etc/e-smith/events/actions/generic_template_expand
Sep  2 13:34:44 midway esmith::event[22531]: expanding /etc/hosts.allow 
Sep  2 13:34:45 midway esmith::event[22531]: expanding /etc/hosts.deny 
Sep  2 13:34:45 midway esmith::event[22531]: expanding /etc/shells 
Sep  2 13:34:45 midway esmith::event[22531]: expanding /etc/securetty 
Sep  2 13:34:45 midway esmith::event[22531]: expanding /etc/proftpd.conf 
Sep  2 13:34:46 midway esmith::event[22531]: expanding /etc/services 
Sep  2 13:34:46 midway esmith::event[22531]: expanding /etc/httpd/conf/httpd.conf
Sep  2 13:37:06 midway esmith::event[22531]: expanding /etc/atalk/AppleVolumes.default 
Sep  2 13:37:06 midway esmith::event[22531]: expanding /etc/samba/smb.conf 
Sep  2 13:37:12 midway esmith::event[22531]: expanding /etc/samba/smbusers 
Sep  2 13:37:12 midway esmith::event[22531]: generic_template_expand=action|Event|ibay-modify|Action|generic_template_expand|Start|1220358884 898761|End|1220359032 529592|Elapsed|147.630831
Sep  2 13:37:12 midway esmith::event[22531]: Running event handler: /etc/e-smith/events/ibay-modify/S15ibay-modify
Sep  2 13:37:12 midway esmith::event[22531]: S15ibay-modify=action|Event|ibay-modify|Action|S15ibay-modify|Start|1220359032 529890|End|1220359032 733158|Elapsed|0.203268
Sep  2 13:37:12 midway esmith::event[22531]: Running event handler: /etc/e-smith/events/actions/adjust-services
Sep  2 13:37:12 midway esmith::event[22531]: adjusting supervised httpd-e-smith (sigusr1) 
Sep  2 13:37:12 midway esmith::event[22531]: adjusting supervised httpd-e-smith (up) 
Sep  2 13:37:12 midway esmith::event[22531]: adjusting supervised smbd (sighup) 
Sep  2 13:37:12 midway esmith::event[22531]: adjusting supervised smbd (up) 
Sep  2 13:37:13 midway esmith::event[22531]: adjust-services=action|Event|ibay-modify|Action|adjust-services|Start|1220359032 733464|End|1220359033 25250|Elapsed|0.291786
Sep  2 13:37:13 midway esmith::event[22531]: Running event handler: /etc/e-smith/events/ibay-modify/S90atalk-reload


I've included rest of that event too if that helps.

Thanks

John

Offline shell

  • ****
  • 117
  • +0/-0
Re: Slow speed
« Reply #7 on: September 03, 2008, 09:47:47 AM »
Quote
Sep  2 13:34:44 midway esmith::event[22531]: Running event handler: /etc/e-smith/events/actions/generic_template_expand
...
Elapsed|147.630831
...
Sep  2 13:37:13 midway esmith::event[22531]: Running event handler: /etc/e-smith/events/ibay-modify/S90atalk-reload

Total - 2.5 minutes give or take...  not overly speedy but given the number of domains and users not quite
Quote
It takes ages, (and is only getting worse) to make changes to the domains, ibays etc.

More RAM, faster processors ($$$) or more patience, my 2c

Offline wilsonjc82

  • *
  • 6
  • +0/-0
Re: Slow speed
« Reply #8 on: September 03, 2008, 09:54:49 AM »
Processors or Ram don't spike ( I mean they increase a little) but we are not talking 100% for the time this goes on?

so surely more CPU and RAM won't actually make any difference?

John

Online Stefano

  • *
  • 10,894
  • +3/-0
Re: Slow speed
« Reply #9 on: September 03, 2008, 01:01:57 PM »
Sep  2 13:34:46 midway esmith::event[22531]: expanding /etc/httpd/conf/httpd.conf
Sep  2 13:37:06 midway esmith::event[22531]: expanding /etc/atalk/AppleVolumes.default 

2' 20'' to expand httpd.conf.. It's all there..

IMHO not relevant, just be patient :-)

Ciao
Stefano

Offline wilsonjc82

  • *
  • 6
  • +0/-0
Re: Slow speed
« Reply #10 on: September 03, 2008, 01:54:52 PM »
It appears the technical solution.....
is to wait?

Thanks

John

Offline pfloor

  • *****
  • 889
  • +1/-0
Re: Slow speed
« Reply #11 on: September 03, 2008, 07:06:38 PM »
I think its the line I've highlighted that is the issue, but is there a way to make this more effecient?

Sep  2 13:34:46 midway esmith::event[22531]: expanding /etc/httpd/conf/httpd.conf
Sep  2 13:37:06 midway esmith::event[22531]: expanding /etc/atalk/AppleVolumes.default 

As I suspected.  Those 200-300 domains are taking time to process the httpd.conf templates.  httpd.conf is extremely complicated and processes each and every domain separately.  As you can see, the process takes some time to complete.

Quote
Hi, thanks for the heads up, I think I have found the issue, but there are 3 problems,

first, I'm a novice here, we got this server made for us and the company ran away ( they were supposed to look after it)
second, I'm not sure if I'm correct
Third I don't know how to fix it generally.

Now I like to try to work stuff out.

There is really nothing to "work out".  SME is not optimized to be an ISP mail server with 300 domains.  It is a small business server and performs well with just a few domains as it is designed to be used.  I'm not saying you can't have 300 domains but you are using SME for a purpose it really isn't optimized for so you will have to be patient when it comes to reconfigurations.

The template and reconfiguration processes may not be running as a priority (this is mere speculation).  You may want to join the developer's mail list and see if you can get a definitive answer on how the process is run/prioritized and if anyone can give you pointers on how to give those processes more priority.

OR you can just be patient :-)
In life, you must either "Push, Pull or Get out of the way!"

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Slow speed
« Reply #12 on: September 03, 2008, 07:47:47 PM »
The template and reconfiguration processes may not be running as a priority (this is mere speculation).

They run with default priority.

Process is probably I/O limited - lots of files are opened and read, many of them multiple times over per domain. wilsonjc82 should be patient, or should redesign the system.