News:

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

Main Menu

My server configuration OK?

Started by Tiribulus, February 14, 2009, 09:46:27 PM

Previous topic - Next topic

Vekseid

Quote from: Phalloidium on February 18, 2009, 06:05:43 PM
I didn't know that about SSL in Apache. Good to know.

Actually I should take that back, that would be if you were using virtualhosts... if you are only using ssl for your main domain and set that up to be apache's default, I think you could actually get away with just one fcgi-php process.

I'm not, however, and currently my little VPS is averaging 4 php calls/second. It handles fine until someone else on the server gets hoggy. But! I just ordered a nice dedicated package... will look to see how nginx performs versus apache in siege tests, I think >_>
Adult Role Playing Forums - - Over five million posts - - Elliquiy's LAMP configuration (maybe NSFW)

Blog about Forums and Servers - - Twenty things to make Simple Machines Forum go faster

Private/Instant Message requests for free support will be ignored.

Tiribulus

Clearly, I still have a lot to learn :)

Something like that


Tiribulus

Am I correct in assuming that 100% fragmentation for APC is bad and I need to adjust something?

http://gregnmary.gotdns.com:8080/apc.php

Something like that

Yes. You're running out of cache space. I'd increase the size of it in php.ini. Try doubling it.

Tiribulus

Quote from: Phalloidium on February 19, 2009, 09:08:12 PM
Yes. You're running out of cache space. I'd increase the size of it in php.ini. Try doubling it.

I added these basic settings I found somewhere and restarted Apache which of course reset the cache. Do you see anything that could use improvement? I had nothing except the line to start APC before. I assume shm_size is the cache?

apc.enabled=1                                               # default = 1
apc.shm_segments=1                                   # default = 1
apc.shm_size=128                                        # default = 30
apc.ttl=7200                                                  # default = 0
apc.user_ttl=7200                                         # default = 0
apc.num_files_hint=1024                            # default = 1000
apc.mmap_file_mask=/tmp/apc.XXXXXX   # default = no value
apc.enable_cli=1                                            # default = 0

Something like that

I would adjust the apc.ttl and apc.user_ttl to something like 604800 (one week). There's no sense emptying the cache early.

I'd watch your cache usage and adjust apc.shm_size smaller if the cache mostly sitting empty. :)

Tiribulus

#47
Did that, thanks.

So that is the cache size then?

Thanks for your help again btw.

EDIT: Actually, putting those lines in my php.ini right under extension=apc.so file has no effect. The settings are showing the same. hmmmm

EDIT1: Oh yeah, I did restart Apache

EDIT2: I figured out I wasn't supposed to include the default values at the end of each line. Got rid of those, restarted Apache again there the settings are. :-[

Vekseid

Be sure that your shared memory maximum can take the value -

cat /proc/sys/kernel/shmmax
268435456


That's mine, but the default is 32MB, not 256MB.
Adult Role Playing Forums - - Over five million posts - - Elliquiy's LAMP configuration (maybe NSFW)

Blog about Forums and Servers - - Twenty things to make Simple Machines Forum go faster

Private/Instant Message requests for free support will be ignored.

Tiribulus

Quote from: Vekseid on February 19, 2009, 09:58:58 PM
Be sure that your shared memory maximum can take the value -

cat /proc/sys/kernel/shmmax
268435456


That's mine, but the default is 32MB, not 256MB.

4294967295

I assume that's bytes, but which default do you mean? The APC default probably. Mine read 30. I changed it to 64 for now

Something like that

Quote from: Vekseid on February 19, 2009, 09:58:58 PM
Be sure that your shared memory maximum can take the value -

cat /proc/sys/kernel/shmmax
268435456


That's mine, but the default is 32MB, not 256MB.

Odd. I have the default 32MB, but I'm running a 128MB shm in APC, and it's working fine.

Tiribulus


Vekseid

Quote from: Phalloidium on February 19, 2009, 11:09:24 PM
Odd. I have the default 32MB, but I'm running a 128MB shm in APC, and it's working fine.

Linux is awesome and horrifying at the same time, it may let you allocate over 32mb, it'll only cause problems if you actually use it (and may just block it silently).

It's also per allocation, the normal mode is to use 32 mb and have apc allocate multiple blocks (I'd have to look up the settings >_>)
Adult Role Playing Forums - - Over five million posts - - Elliquiy's LAMP configuration (maybe NSFW)

Blog about Forums and Servers - - Twenty things to make Simple Machines Forum go faster

Private/Instant Message requests for free support will be ignored.

Tiribulus

Is it a problem that the client and global character sets are different? They also show as orange lines in phpmyadmin

character set client     utf8
(Global value)             latin1
character set connection utf8
(Global value)              latin1

Thanks

Advertisement: