News:

Wondering if this will always be free?  See why free is better.

Main Menu

My server configuration OK?

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

Previous topic - Next topic

Tiribulus

If some of the many fine folks with much more experience and knowledge about these things than I could take a gander and let me know if you see any glaring problems I sure would appreciate it. I have been working on this self hosted forum for about a month now with absolutely no previous experience with PHP or MYSQL for mostly educational purposes. I had to do a pretty fair amount of manual configuration stuff to get it to where it is now. I'm wondering if there's something staring me in the face I just don't know enough to notice. I think there's a couple more sql variables that could use some adjustment. It's running on a LAMP box, P4 1.6 and a gig of memory.
Thanks.

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

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

EDIT: One question I have is, is SQLite an extra engine I have running that I would do better to disable? I read that innodb and SQLite (or mysqli, can't recall at the moment) are both SQL engines and running more than one at a time is a performance drag.

Something like that

#1
1. Running Firefox and X on your server? What??
2. Your server seems to be coping fine.
3. Look into installing APC. OpenSUSE likely has a package for it. You'll need to do some minor configuration. 64 MB of cache should be adequate.
4. InnoDB is a good thing. Look at this thread: http://www.simplemachines.org/community/index.php?topic=50217.0 . Be sure to increase the variable innodb_buffer_pool in your MySQL configuration to 128M for your machine if you decide to convert tables. Make the change in your MySQL configuration first, restart MySQL, and then convert.

5. You almost certainly don't need SQLite. Disable it.
6. MySQL's key_buffer_size is set to 16M. I'd increase this to 128M, especially if you don't convert the suggested tables to InnoDB.

Don't worry about the struck out stuff until your forum gets busy.

:)

Tiribulus

Quote from: Phalloidium on February 14, 2009, 10:21:29 PM
1. Running Firefox and X on your server? What??
2. Your server seems to be coping fine.
3. Look into installing APC. OpenSUSE likely has a package for it. You'll need to do some minor configuration. 64 MB of cache should be adequate.
4. InnoDB is a good thing. Look at this thread: http://www.simplemachines.org/community/index.php?topic=50217.0 . Be sure to increase the variable innodb_buffer_pool in your MySQL configuration to 128M for your machine if you decide to convert tables. Make the change in your MySQL configuration first, restart MySQL, and then convert.
5. You almost certainly need SQLite. Disable it.
6. MySQL's key_buffer_size is set to 16M. I'd increase this to 128M, especially if you don't convert the suggested tables to InnoDB.


Don't worry about the struck out stuff until your forum gets busy.

:)

Yeah, I'm a gui dood, be gentle  :D

Right now it's more or less my school and a place where my wife and a couple of her friends play around. Sooner or later it may have a few dozen members. Am I correct in assuming that for #5 you mean I almost certainly DON'T need SQLite? It looks like you just forgot to type don't, actually before need or disable.

Something like that

You don't need SQLite :)

You might like the Opera browser on Linux. It's much faster than Firefox.

Tiribulus

Quote from: Phalloidium on February 14, 2009, 11:04:35 PM
You don't need SQLite :)

You might like the Opera browser on Linux. It's much faster than Firefox.

Thanks, BTW. I have Opera on one of my Windows boxes and I really loved some things and couldn't stand a couple others. In the end I can't live without my extensions, but I'll throw it on and have another look.
Thanks again

Tiribulus

Can I just uninstall sqlite with mussin everything up?

Something like that

Just edit your my.cnf file so MySQL doesn't load it. I believe the entry to add is "skip-sqlite", though I could be wrong.

Really though, it's a very minor thing. It might save you a few KB of RAM as it will only be loaded if called upon.

Vekseid

128M for key_buffer would be a bit of overkill, 64M should be fine for a long time. Your thread_cache size is -way- too huge though, set it back to 8.

I would invest the time in learning how to get FastCGI going. You don't need it, per se, but it is very valuable knowledge to have.

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

Alrighty then: now that my head hurts, :P innodb is faster for tables that have high transaction rates meaning they are altered a lot, like threads for instance, but not on forums below a certain amount of this type of action or on forums with lower usage overall.

However myisam is generally better in all cases on smaller forum sites and also still on large ones only for tables with high view rates, but aren't written to very often. Optimal specific configurations (as far as that's possible) where converting high transaction tables to innodb would be called for at all, are achieved by observing not only how much traffic the site gets overall, but what tables get what type of requests most often. Even then configuration is based on trends and every request cannot under the best of circumstances be as fast as every other one.

Also, innodb does not support fulltext search indexing (with some tables) thus necessitating a custom index and it's almost never a good idea to convert all tables to innodb because weird issues like disordered page displays can result.

In short my wife's forum is way to small to have to worry about any of this right now which is a beautiful thing because I have no idea what the hell I'm doing. :o

Tiribulus

I'm gonna see about APC and fast CGI. For some reason I thought SMF didn't use CGI, or SSL supplanted it or something. Been a couple weeks since I read that.


Something like that

Quote from: Tiribulus on February 15, 2009, 01:46:14 PM
Alrighty then: now that my head hurts, :P innodb is faster for tables that have high transaction rates meaning they are altered a lot, like threads for instance, but not on forums below a certain amount of this type of action or on forums with lower usage overall.

However myisam is generally better in all cases on smaller forum sites and also still on large ones only for tables with high view rates, but aren't written to very often. Optimal specific configurations (as far as that's possible) where converting high transaction tables to innodb would be called for at all, are achieved by observing not only how much traffic the site gets overall, but what tables get what type of requests most often. Even then configuration is based on trends and every request cannot under the best of circumstances be as fast as every other one.

Also, innodb does not support fulltext search indexing (with some tables) thus necessitating a custom index and it's almost never a good idea to convert all tables to innodb because weird issues like disordered page displays can result.

In short my wife's forum is way to small to have to worry about any of this right now which is a beautiful thing because I have no idea what the hell I'm doing. :o

Personally, I run all InnoDB. Yes, you have to change one table slightly to fix the board display order. Once you get busy or have over 100K posts or so, it's best to switch to Sphinx for searching. It's much faster than fulltext search or using a custom search index.

The two major advantages InnoDB has are:
1. It keeps data clustered together by the primary key. This avoids fragmentation, and it's especially noticeable in frequently changed tables. It can also make caching more effective for technical reasons I won't get into here.
2. It uses a journal to update the actually database. It writes down everything it will do, and then follows behind and does it. That way, if MySQL should ever crash, it can go back through the journal, make all the changes, and know the database is good to go. MyISAM has to scan through the entire table because the tables could be corrupt.

It's not just about speed :)

But for now, MyISAM will do you fine. Until you get thousands of users and 100K posts, you really don't need to worry about the database that much.

Tiribulus

Yeah, I've been doing some more reading on that actually.

On your other note, do you know where to find some decent documentation on how to get APC going or maybe you could tell me. Can it be installed after everything is already running? Does PHP have to recompiled. Actually Suse doesn't have the package.

Something like that

PHP doesn't need to be recompiled.

You have to download APC, and part of the instructions involves runing "phpize" which adapt the APC code for the version of PHP installed.

Afterwards, it's simple edit to php.ini to enable it.

Tiribulus

#14
This may be beyond the scope of what can be addressed here, but my machine does not bare even a vague resemblance to what is being spelled out in the install file included with APC. I have no sign of phpize which the file says is part of pear. The Suse PM (yast) has about 3 dozen packages with the name pear in them. I picked the one just named "pear" which installed into /usr/share/php5/PEAR/, still with no sign of phpize. And the php.ini file being used on this box is in /etc/php5/apache2 . I installed PHP myself. This may be a Suse thing.

EDIT: It seems that the php-devel package is what's needed for phpize which I have now installed. I now have 2 instances of phpize, one each in /etc/alternatives and /usr/bin, but neither of which make sense with the install file included with APC. I'm gonna get this figured out if it kills me. It's the principle of the thing.

EDIT2: Should APC be unzipped into the install dir for php and do you run phpize from there. I keep getting a message telling me
QuoteMake sure that you run '/etc/php5/phpize' in the top level source directory of the module

EDIT:3 I dunno folks. Of the pretty sparse info I can find on how to enable APC on a lamp box it is conflicting all over the place and none of it appears at least to resemble Suse 11. I need a break for a little while

Vekseid

I'm a Debian guy, myself, sorry. You might try checking CentOS docs as Suse seems to have followed Red Hat's lead.
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

#16
I WIN!!!!!!

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

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

Now I have to get it configured.

I set up this machine from scratch never dreaming of all the stuff I would need for things like this. Had to install GCC, php-devel, make, pecl and pear (I think that's it, maybe not) all in pieces and then ran the pecl install apc  version of the install routine. Actually did it like 4 times each time it telling me something else that wasn't working. Then I added this: ; APC

extension=apc.so
to the php.ini file in /etc/php5/apache2, restarted apache and there it is 8) I am entirely aware that it will get me absolutely nothing on this site, but I refuse to be deated and it became an arm wrestling match on pure principle. Config next.

EDIT: It's an old version :'(  and I cannot find on word on how to update it >:(

EDIT1: OK, I got it updated

Something like that

Quote from: Vekseid on February 16, 2009, 01:08:32 PM
I'm a Debian guy, myself, sorry.

The One, True OS. :D

And with a bit of polish, you can turn it into Ubuntu ;)

Tiribulus

Quote from: Phalloidium on February 16, 2009, 06:06:49 PM
Quote from: Vekseid on February 16, 2009, 01:08:32 PM
I'm a Debian guy, myself, sorry.

The One, True OS. :D

And with a bit of polish, you can turn it into Ubuntu ;)

Suse has always been good to me, but this is the meatiest setup I've ever attempted with it. It does seem that Debian and slackware are much more widely used for this stuff. Suse 11.1 does now have a LAMP option in it's install routine which I haven't tried. I have a bunch of ho hum computers like this one laying around. Maybe I'll give Debian a shot. I have Ubuntu on a laptop which it's fine for, but it seems a bit slim for server stuff. Then again it isn't the server version which probably explains that. Oh well, not to get too far off track.

In the meantime, I'll poke around here for some tips on configuring APC for SMF.

Something like that

Quote from: Tiribulus on February 16, 2009, 06:33:12 PM
Suse has always been good to me, but this is the meatiest setup I've ever attempted with it. It does seem that Debian and slackware are much more widely used for this stuff. Suse 11.1 does now have a LAMP option in it's install routine which I haven't tried. I have a bunch of ho hum computers like this one laying around. Maybe I'll give Debian a shot. I have Ubuntu on a laptop which it's fine for, but it seems a bit slim for server stuff. Then again it isn't the server version which probably explains that. Oh well, not to get too far off track.

There's nothing wrong with SuSE. The rule of thumb for servers is to use what you know.

Quote
In the meantime, I'll poke around here for some tips on configuring APC for SMF.

You can increase the cache size, but there's no point until you have more activity.

Tiribulus

#20
Quote from: Phalloidium on February 16, 2009, 07:00:14 PM
Quote from: Tiribulus on February 16, 2009, 06:33:12 PM
Suse has always been good to me, but this is the meatiest setup I've ever attempted with it. It does seem that Debian and slackware are much more widely used for this stuff. Suse 11.1 does now have a LAMP option in it's install routine which I haven't tried. I have a bunch of ho hum computers like this one laying around. Maybe I'll give Debian a shot. I have Ubuntu on a laptop which it's fine for, but it seems a bit slim for server stuff. Then again it isn't the server version which probably explains that. Oh well, not to get too far off track.

There's nothing wrong with SuSE. The rule of thumb for servers is to use what you know.

Quote
In the meantime, I'll poke around here for some tips on configuring APC for SMF.

You can increase the cache size, but there's no point until you have more activity.

I appreciate your time and the other folks as well.

In the end Suse always plays ball, it just seems like most of the docs I find for anything above basic desktop stuff are for other distros leaving me in "interpret and stab around in the dim light" mode. I had to manually build a directory structure, deftly copying and pasting stuff around, to get the commands to run for APC for instance. But it worked and everything's running :o I was actually chuckling and surprised when it finally was.

Anyway, this leg of the journey is completed. I'll leave the APC config alone for now and relish the victory as, like you say, there's not enough action to even tell me how to proceed at this point.
Thanks again.

EDIT: This may be hard to believe, but even on this no traffic "toy" site with like 10 members the performance increase with APC is profound. Accessing it on other machines on my network from the outside loads every page in less than .2 seconds as opposed to like .5 or .6 before. The apc.php file is showing cache hits so it is definitely working 8)

Something like that

Quote from: Tiribulus on February 16, 2009, 08:32:29 PM
EDIT: This may be hard to believe, but even on this no traffic "toy" site with like 10 members the performance increase with APC is profound. Accessing it on other machines on my network from the outside loads every page in less than .2 seconds as opposed to like .5 or .6 before. The apc.php file is showing cache hits so it is definitely working 8)

It's not hard to believe at all. APC does two things:

  • It caches compiled PHP code. This saves about 300 ms every time the same page is loaded.
  • It stores user variables. This allows SMF to cache the results of some queries, dramatically reducing the number of queries needed for each page load.

I remember hearing something about APC planned to be included in PHP 6 by default.

青山 素子

Quote from: Tiribulus on February 16, 2009, 08:32:29 PM
I had to manually build a directory structure, deftly copying and pasting stuff around, to get the commands to run for APC for instance. But it worked and everything's running :o I was actually chuckling and surprised when it finally was.

Sorry I didn't get here sooner. A simple "pear install APC" should be all you need, assuming that PHP's pear script was installed (some distros put it in its own package). This also assumes you have the standard development tools and headers (including for PHP) installed.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


Tiribulus

#23
Quote from: Motoko-chan on February 16, 2009, 10:41:47 PM
Quote from: Tiribulus on February 16, 2009, 08:32:29 PM
I had to manually build a directory structure, deftly copying and pasting stuff around, to get the commands to run for APC for instance. But it worked and everything's running :o I was actually chuckling and surprised when it finally was.

Sorry I didn't get here sooner. A simple "pear install APC" should be all you need, assuming that PHP's pear script was installed (some distros put it in its own package). This also assumes you have the standard development tools and headers (including for PHP) installed.

Long story, short as possible:

A buddy of mine asked me in January if I would be interested in a possible business venture which would involve a forum site and since I was the only real "computer guy" in the group he asked me if I thought I could get something going within several months.

I'd never touched such a thing but told him I'd see what I could do. The big player being PHPBB I went over to arstechnica and asked those guys how hard it was. One the guys there with tons of forum experience recommended SMF which I'd never heard of.

I came here read the requirements and set about putting together a LAMP box that it would run on and decided to whip up a gardening forum my wife could fiddle around with. Forgetting the initial gymnastics I went through just getting SMF live and online it turns out I also had exactly none of the stuff you mention installed which are prerequisites for APC. Every install tut I found was for distros other than Suse so I wound up doing what I said which was piecing together a directory structure like the ones in the tutorials and running the pecl install learning one step at a time about all the stuff you mention (and more) as the terminal messages informed me what was missing. I didn't know ahead of time they would be needed.

This is just one thing. This whole process since the middle of last month has been, while frustrating at times, utterly fascinating. Truth be told I probably learned a lot more just because none of it has been that easy. I didn't go with a hosting service precisely because I wanted to learn how to do it all myself from the ground up.

Not so short, sorry about that, but there it is. I guess I said all that to say that assuming that I had anything ready to go would be a grand assumption indeed. Thanks for your guys time and patience. The fact I got it running pretty tight with no issues is very gratifying. I wish I would have started playing around with this kinda stuff years ago. I'd be good at it by now.

Something like that

Everyone starts somewhere. And knowing how things are put together is critical when you try to figure out why something isn't working. It's one of the best advantages open source systems have over Windows.

Tiribulus

#25
Vekseid mentioned fastcgi which I've spent quite a bit of time reading about now. That little voice is telling me that I could really throw a monkey wrench in my server if I don't set that up right. suse has packages for it, but I don't know. Seems a pretty major alteration.

Something like that

Quote from: Tiribulus on February 17, 2009, 11:17:00 PM
Vekseid mentioned fastcgi which I've spent quite a bit of time reading about now. That little voice is telling me that I could really throw a monkey wrench in my server if I don't set that up right. suse has packages for it, but I don't know. Seems a pretty major alteration.

There are two reasons for running PHP as FastCGI.

The first is that it removed PHP from each Apache thread. Right now, every thread has a few MB memory space for PHP. If you end up having a hundred Apache threads, that's a LOT of MB being used -- especially when most of those threads will just be serving images and the like.

The second is it allows you to control the number of PHP processes running at once. As each takes up a few MB of RAM, you can limit your RAM usage. You can also stop your server from being overwhelmed when things get busy -- extra requests queue up, and requests are still filled at top speed.

Tiribulus

#27
How hard is it to get set up and how bad can I cripple my server if I do it wrong is the source of my trepidation. Does it matter if I have apache2-mod_php5 already installed? Apparently it's supposed to work fine with APC... assuming both are setup correctly to work together. There's php5-fastcgi, apache2-mod_fcgid, FastCGI-devel and plain FastCGI. Am I going to need the dev pack regardless of which one I choose? On that note which one DO I choose?

Try finding answers to those questions online :(

What you posted is a capsulization of what I've seen and good reasons to learn it. I just don't want to wind up with a blank screen where my pages used to be :o

Vekseid

APC will work with fastcgi but it does not used shared memory, so you will need to disable any active acceleration - just the opcode cache. eAccelerator has not released a 5.2 compatible version, making the only 'reasonable' php accelerator xcache.

You will want apache2-mod_fcgid, for the module, as well as suexec, and possibly php5-fastcgi if fastcgi support was not directly compiled into your normal php-cgi binary.

I'm currently working on an article about how to set it up properly in Debian - gimme a week or so and it should go a long way to telling you how, even with Suse.
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

QuoteForum:~ # suexec2 -V
-D AP_DOC_ROOT="/srv/www"
-D AP_GID_MIN=96
-D AP_HTTPD_USER="wwwrun"
-D AP_LOG_EXEC="/var/log/apache2/suexec.log"
-D AP_SAFE_PATH="/usr/local/bin:/usr/bin:/bin"
-D AP_UID_MIN=96
-D AP_USERDIR_SUFFIX="public_html"

It looks like suexec was included when I installed Apache. I only have APC running. I downloaded eaccellerator, but never installed it. Maybe I'll hang on and see what you put together. If my reading is accurate fastcgi radically changes the way the web server piece does business.

Vekseid

Err, yeah, forgot that caveat. Generally it's been recommended to have Apache rather than php handle the threading, however.

There is a slight flaw in that if you allow ssl you need to have a minimum of two processes running, however. This is less of an issue but people who decide to bounce between ssl and normal would notice, at least in Apache (don't know if nginx or lightty would let you bottle it to the same process...)
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.

Something like that

#31
Quote from: Vekseid on February 18, 2009, 05:27:54 PM
There is a slight flaw in that if you allow ssl you need to have a minimum of two processes running, however. This is less of an issue but people who decide to bounce between ssl and normal would notice, at least in Apache (don't know if nginx or lightty would let you bottle it to the same process...)

I didn't know that about SSL in Apache. Good to know.

I'm not too familiar with lightty (other than it leaks RAM like a sieve), but Nginx doesn't even start PHP itself. It relies on you setting up a PHP FastCGI daemon that listens for requests. Then you configure Nginx to pass off all PHP requests to the PHP daemon. That PHP daemon can have APC running, which is what I do. It's a very stable configuration. My setup is currently handling over 27 million PHP hits per month. That's an average of 9 per second, but at peak times it's well over 30.

Tiribulus

I think my next major project is going to be getting a LAMP box built on Debian and Nginx. A thing I suspect will make this machine look like a walk in the park. I spent about an hour reading about Nginx yesterday. I like the minimalist mindset which is the way I've always run my Windows machines (as far as that's possible), but have never gotten good enough with Linux to go that way.

Something like that

Nginx is beautiful. It serves about 2.6 million requests a day for me, about 44GB/day, all in about 7 MB of RAM, and about 1% CPU. I love Nginx almost as much as freedom and liberty lol. I've actually found it easier to use than Apache, surprisingly enough.

PHP is still the big CPU eater, followed by MySQL. APC helps a lot.

Debian is nice to use on the command line. A new version was just released the other day. You can't go wrong with Debian for stability and reliability. You may also like Ubuntu, which is basically Debian made pretty. It's kept more up to date, but the underlying system is almost exactly the same. It's what I prefer to use, for servers and the desktop.

Tiribulus

When I get ready to do it I'll probably have some questions if that's OK. I like the little is a lot thing. My home gateway is a 13 year old Compaq deskpro P90 with 16 megs of ram, couple old intel nics, no hard drive, running Coyote Linux from a floppy disk for this same reason.

Something like that

Quote from: Tiribulus on February 18, 2009, 09:11:12 PM
When I get ready to do it I'll probably have some questions if that's OK. I like the little is a lot thing. My home gateway is a 13 year old Compaq deskpro P90 with 16 megs of ram, couple old intel nics, no hard drive, running Coyote Linux from a floppy disk for this same reason.

In the early 2000's, I was running Debian on a 486 as a gateway, with my own iptables scripts. It had 8 MB of RAM, two 130 MB harddrives (/var was on its own drive), and two ISA-bus NICs. I actually had Apache running on that sucker, but it would take about 5 seconds to respond to requests as it was swapped into RAM. lol. It also ran a mail daemon (either Qmail or Postfix, I forget), and Bind for DNS.

Your machine is a speed daemon! lol Just watch out for that F00F bug ;)

I'm now running a Linksys WRT54GS router with 32! MB of RAM, with a Tomato MLPPP firmware. It allows me to avoid the BitTorrent throttling Bell Canada has on their ADSL system, as the reseller I'm subscribed to, Teksavvy, supports Multi-link PPP on their infrastructure. It's got a 200 MHz BCM4712 MIPS CPU, overclocked to 216 MHz to improve stability (don't ask me why it does; I don't know). It's got 8 MB of flash, so there's lots of room to install stuff, too. Oh, and it does 215 BogoMips. My desktop does 3354. My server for my forums does 6138.

青山 素子

Quote from: Phalloidium on February 18, 2009, 06:46:41 PM
You can't go wrong with Debian for stability and reliability.

If you want stability and fairly updated stuff, look no further than Slackware. It's an awesome system and even more friendly to optimization than Debian.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


Something like that

Quote from: Motoko-chan on February 18, 2009, 09:47:07 PM
Quote from: Phalloidium on February 18, 2009, 06:46:41 PM
You can't go wrong with Debian for stability and reliability.

If you want stability and fairly updated stuff, look no further than Slackware. It's an awesome system and even more friendly to optimization than Debian.

It's been amazing Patrick has been able to keep up all those years. I'd miss my apt-get though ;)

青山 素子

Quote from: Phalloidium on February 18, 2009, 09:53:23 PM
It's been amazing Patrick has been able to keep up all those years. I'd miss my apt-get though ;)

Yes it is, and now we have Fred with Slamd64 (a multi-lib x86_64 port of Slackware). Also, there is slapt-get, although I use slackpkg for my needs.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


Something like that

Quote from: Motoko-chan on February 18, 2009, 09:56:31 PM
Quote from: Phalloidium on February 18, 2009, 09:53:23 PM
It's been amazing Patrick has been able to keep up all those years. I'd miss my apt-get though ;)

Yes it is, and now we have Fred with Slamd64 (a multi-lib x86_64 port of Slackware). Also, there is slapt-get, although I use slackpkg for my needs.

Well it's good to know you don't have to install everything off 40 floppies still ;)

Though who am I kidding... I first installed Linux off a CD only 10 years ago. I've never done a full floppy install, other than a mini-distro.

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: