News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

SMF gets slower as time goes by

Started by Seta Soujiro, July 09, 2005, 11:22:57 AM

Previous topic - Next topic

Seta Soujiro

I think there's something wrong with my php or Apache or MySQL configuration or something. 

When httpd and mysqld are started for the first time, for the first ten minutes or so SMF

runs really fast and the time displayed on the bottom of the screen is never above 1 second

to generate the page.  But then after about fifteen minutes or when more than one or two

people are online, it starts slowing down and goes from 1 second to generate the page, to

about 4 seconds, and then to 13 seconds, and finally about 27 seconds to generate each page.

The only solution that I've found is to restart both httpd and mysqld every fifteen minutes,

and change the priority of Apache to -19. But then nobody can use the website for about 20

or more seconds every fifteen minutes.  I'm using Red Hat Enterprise Linux 4.1.  The

internet connection is I think 1.5Mb/s.  I only have 32MB of memory though.  Does anyone

have any advise about how I should configure?

Ben_S

32MB?

It's deffinatly going to be slow if thats the case.
Liverpool FC Forum with 14 million+ posts.

[Unknown]

Is MySQL configured for such a small amount of ram?  You should be using something similar to my-tiny.cnf.

-[Unknown]

Seta Soujiro

I can't find my-tiny.cnf  Where can I get it?

Grudge

I don't have a my-tiny - but here's the contents of a my-small:


# Example MySQL config file for small systems.
#
# This is for a system with little memory (<= 64M) where MySQL is only used
# from time to time and it's important that the mysqld daemon
# doesn't use much resources.
#
# You can copy this file to
# /etc/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options (in this
# installation this directory is /usr/local/mysql/var) or
# ~/.my.cnf to set user-specific options.
#
# In this file, you can use all long options that a program supports.
# If you want to know which options a program supports, run the program
# with the "--help" option.

# The following options will be passed to all MySQL clients
[client]
#password = your_password
port = 3306
socket = /tmp/mysql.sock

# Here follows entries for some specific programs

# The MySQL server
[mysqld]
port = 3306
socket = /tmp/mysql.sock
skip-locking
key_buffer = 16K
max_allowed_packet = 1M
table_cache = 4
sort_buffer_size = 64K
net_buffer_length = 2K
thread_stack = 64K

# Don't listen on a TCP/IP port at all. This can be a security enhancement,
# if all processes that need to connect to mysqld run on the same host.
# All interaction with mysqld must be made via Unix sockets or named pipes.
# Note that using this option without enabling named pipes on Windows
# (using the "enable-named-pipe" option) will render mysqld useless!
#
#skip-networking
server-id = 1

# Uncomment the following if you want to log updates
#log-bin

# Uncomment the following if you are NOT using BDB tables
#skip-bdb

# Uncomment the following if you are using InnoDB tables
#innodb_data_home_dir = /usr/local/mysql/var/
#innodb_data_file_path = ibdata1:10M:autoextend
#innodb_log_group_home_dir = /usr/local/mysql/var/
#innodb_log_arch_dir = /usr/local/mysql/var/
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
#innodb_buffer_pool_size = 16M
#innodb_additional_mem_pool_size = 2M
# Set .._log_file_size to 25 % of buffer pool size
#innodb_log_file_size = 5M
#innodb_log_buffer_size = 8M
#innodb_flush_log_at_trx_commit = 1
#innodb_lock_wait_timeout = 50

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates

[isamchk]
key_buffer = 8M
sort_buffer_size = 8M

[myisamchk]
key_buffer = 8M
sort_buffer_size = 8M

[mysqlhotcopy]
interactive-timeout

I'm only a half geek really...

Seta Soujiro

Now it's worse  :-X  It takes about 7 seconds to load each page...

[Unknown]


Seta Soujiro

#7
No, that's not the one.  I temporarily copied the forums to a web host.  The real address is http://www.illuminati-order.net/community/ and only works if the useragent string is set to: 0931
(otherwise it just redirects to the temporary address)

username/password: apple/apple

Seta Soujiro

Now it's working a little better at least for the first minute and a half.  Now I set it to restart the server every 2 minutes.

Anki

Get more ram. More ram = faster speeds for that stuff. You shouldn't be running a server with less than 128 megs of ram especially if you get lots of traffic.

Seta Soujiro

I can't get more ram.  But this problem even occurs when only <i>1</i> person is online, and even when viewing a static "hello world" page.

EG

my forum did this a few months ago

Unknown suggested I made sure that "Check the avatar size every time it is displayed" was disabled as it was known to slow down the loading of each topic, as it checks each avatar for size every time a topic is opened

Fizzy

Not being crytical or anything, but what sort of server can only carry 32Mb of RAM? Is that EDO RAM?
"Reality is merely an illusion, albeit a very persistent one." - A.E.


Seta Soujiro

Quotemy forum did this a few months ago

Unknown suggested I made sure that "Check the avatar size every time it is displayed" was disabled as it was known to slow down the loading of each topic, as it checks each avatar for size every time a topic is opened
It's disabled.  But this affects every single page on the website.

QuoteIs that EDO RAM?
What's EDO?

Harro

It's old ram.
Not used in computers anymore (unless you've got a really old one :p )

kegobeer

#15
EDO

If you only have 32MB, I think you would be better off finding a cheap webhost for your site.  That little bit of RAM just isn't going to perform well.  You can tweak and tweak and tweak, but you just can't get much more out of it.
"The truth of the matter is that you always know the right thing to do. The hard part is doing it." - Norman Schwarzkopf
Posting and you (Click "WATCH THIS MOVIE")

Harro

Or look for a free one.
Lots of hosts are posted here somewhere on the forum.
Maybe you can find something good there :)

[Unknown]

The problem is, the reason you can only have one user online... 32 mb of ram isn't dedicated to the uses of SMF!

With an accelerator like eAccelerator installed, SMF is going to take 3 megabytes of ram per request.  Your operating system has to take at least 8 itself, so we already have 11 used.  Apache and MySQL together have to have at least 20 megs (and probably more) so there go 31 megabytes of ram.  The other meg is probably used for various other services - to the point where you're already using swap for the first and only request you get.

Restarting MySQL will flush all its ram and caches - but in the long run, servers just won't run without a disgusting amount of swap if you have 32 megs.  I'm sorry.

You could mitigate this by using something like eAccelerator, but that just takes ram itself.  It will take about... say... 3 megs static + 250 kb per request.  That's indeed a lot better, but still asking too much from your server.

-[Unknown]

Seta Soujiro

Would it go faster if I upgraded to a 486 processor?

kegobeer

You've been running a server on a 386 machine???  Don't bother "upgrading" to a 486 - that requires a new motherboard and new memory.  If you plan on doing that, just find yourself a cheap Pentium III or IV (or AMD equivilent) machine.  If you can buy a brand new Dell Pentium IV, complete with monitor and printer, for less than $350 USD, I'm sure you can find a used Pentium III for less than $100 USD.
"The truth of the matter is that you always know the right thing to do. The hard part is doing it." - Norman Schwarzkopf
Posting and you (Click "WATCH THIS MOVIE")

Yonkey

I didn't even know 386's could access the internet. :-X

Dannii

of course they can, if you set it up correctly.

I thought i saw someone say they set up SMF on a little PDA thingy. That would be slow i'd expect. but it can be done
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

Yonkey

Quote from: eldacar on July 22, 2005, 11:31:03 PM
of course they can, if you set it up correctly.

I thought i saw someone say they set up SMF on a little PDA thingy. That would be slow i'd expect. but it can be done
Someone installed Apache, MySQL, PHP, and SMF onto a PDA?  Sounds a little far fetched to me...  Who runs a web server off a palm pilot anyway? :-\

Dannii

"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

Yonkey

Besides someone saying it's possible to install Apache on a Pocket PC, I don't think any of them actually installed SMF onto a PDA. :P

Also, after visitng Apache's site, it doesn't even look like you can install it on a Pocket PC:
Quote
This document covers compilation and installation of Apache on Unix systems. For compiling and installation on other platforms, see:

Using Apache with Microsoft Windows
Using Apache with Cygwin
Using Apache with Novell Netware
Using Apache with HP MPE/iX
Compiling Apache under UnixWare
Overview of the Apache TPF Port

Sakurako

probably the Windows Mobile [nofollow]
back to topic ^_^ probably it would be better to look for free webhosting from hosting directory as clickherefree [nofollow]....
If all the useful topics were stickies, then there would be pages of stickies in practically every board.  -[Unknown]
Any difficulty in looking for useful topics that is not sticky? The problem should be solved once Digest Feature released. Please support the request by posting. Thanks ^_^

Advertisement: