Server config questions

Hi, we're in process of setting up a dedicated server, and we have the choice to configure it exactly the way we want.



I had a few config questions, aside from the basic config options that im already aware of.


  • SHMEM - can this caching method be used on 3 x Cs Cart websites all running on the same web server? The server comes with a total of 2gb ram. (Is shmem still considered the best caching method if resources allow?)


  • suPHP - is this the best choice of php handler? If so, is it true that i dont change the skins, var and images directory to 777?


  • Was going to go with CENTOS for the operating system, anyone have a better choice?



    Thanks in advance,



    Scott.

Centos / suPHP ~ Unsure about SHMEM given your circumstances.

[quote name='JesseLeeStringer' timestamp='1330129211' post='132021']

Centos / suPHP ~ Unsure about SHMEM given your circumstances.

[/quote]



I also changed the default server php core memory limit to 256, changed PHP realpath_cache settings, and some other php settings and it seems pretty speedy now, even though I was never able to get smartoptimzer fully working.

Thanks for the answers guys. Jesse - did you know if i have to alter any directory permissions under suPhp?


[quote name='dotell' timestamp='1330131575' post='132027']

I also changed the default server php core memory limit to 256, changed PHP realpath_cache settings, and some other php settings and it seems pretty speedy now, even though I was never able to get smartoptimzer fully working.

[/quote]



Are you able to elaborate on that? What specific realpath_cache settings did you employ? I've already set the maximum memory limit in config.local.php to;



// Set maximum memory limit

@ini_set('memory_limit', '128M');



I seem to remember reading that 128mb was the maximum. Can the server php core memory itself handle a larger memory setting? Makes sense I guess, i think the memory setting in the config.local.php file is for one instance of an application, not a server-wide setting.



I actually do run SmartOptimizer - it was a little tricky in the initial setup but it seems to help quite a bit. It mostly came down to configuring the .htaccess file properly and making the cache directory inside Smartoptimizer writable.



Cheers,



Scott.

[quote name='dotell' timestamp='1330131575' post='132027']

I also changed the default server php core memory limit to 256, changed PHP realpath_cache settings, and some other php settings and it seems pretty speedy now, even though I was never able to get smartoptimzer fully working.

[/quote]



I recommend a higher value than 256 if your CPU speed isn't upto scratch and/or you expect visitors.

My server php core is plentiful as I don't allow anything except Wordpress and CS-Cart to be installed.



CS-Cart have per-account max usage of 512MB, this is normally to ensure that if the site gets hit by mass-traffic then it'll stand on it's two legs for upto an hour before I raise resources limits to cope.


[quote name='Scott_C' timestamp='1330143509' post='132043']

Thanks for the answers guys. Jesse - did you know if i have to alter any directory permissions under suPhp?







Are you able to elaborate on that? What specific realpath_cache settings did you employ? I've already set the maximum memory limit in config.local.php to;



// Set maximum memory limit

@ini_set('memory_limit', '128M');



I seem to remember reading that 128mb was the maximum. Can the server php core memory itself handle a larger memory setting? Makes sense I guess, i think the memory setting in the config.local.php file is for one instance of an application, not a server-wide setting.



I actually do run SmartOptimizer - it was a little tricky in the initial setup but it seems to help quite a bit. It mostly came down to configuring the .htaccess file properly and making the cache directory inside Smartoptimizer writable.



Cheers,



Scott.

[/quote]



All directory permissions under public_html must be modified - run these commands against the respective paths.



Example:

[quote]

root@yoursever [/home//public_html]# find . -type d -exec chmod 755 {} ;

root@yoursever [/home//public_html]# find . -type f -exec chmod 644 {} ;

root@yoursever [/home//public_html]# find . -type f -name '*.php' -exec chmod 600 {} ;

[/quote]



It's a delicate pain in the butt, but I haven't had any security issues.

Be aware that if you have a large website either by way of page load OR/AND visitors then you'll need some serious CPU power.

I have a client whom started on suPHP and moved all the way to having to use DSO permissions for this reason with compression technology (eAccelarator).



Now, that being said - depending on server resources can you do what you want.

My my.cnf looks like this…it may need some tweaking still too, but I don't have much on my server right now, still working on moving my site over. Just a test site and wordpress site on there now. I should have overkill on resources, it's a dedicated with 3.2 xeon/8gb ram.



[mysqld]

datadir=/var/lib/mysql

skip-locking

safe-show-database

old_passwords=1

long_query_time=2

log-slow-queries=/var/log/mysql-slow-queries.log

query_cache_limit=2M

query_cache_size=64M

query_cache_type=1

max_user_connections=50

max_connections=500

thread_cache_size=256

table_cache=1024

key_buffer=256M

max_connect_errors=20

max_allowed_packet=128M

join_buffer=2M

record_buffer=1M

sort_buffer_size=2M

read_buffer_size=2M

read_rnd_buffer_size=2M

thread_concurrency=4

myisam_sort_buffer_size=64M

local-infile=0

concurrent_insert=2

Hi Guys, thank you very much for all this information! Just one quick question, if I can’t use shmem for the caching method, I’d like to get sqlite working. In the past, when I’ve had the module installed and then rolled out onto my live Cs Cart site I received the error;


<br />
Warning: SQLite3::query() [sqlite3.query]: Unable to prepare statement: 5, database is locked in /home/USER/public_html/core/cache/class.cache_backend_sqlite.php on line 133<br />

```<br />
<br />
Dotell - I noticed you have a command listed above that reads; "skip-locking" - is this specific to the mysql dbs, and do you think this might help in avoiding the error I'm getting?<br />
<br />
It's a nasty bug because a) Its writes itself out to the browser for everyone to see and <img src="upload://koLv6Nwy6blpxWjsJR7cOIcv8Nz.png" class="bbc_emoticon" alt="B)"> It seems to take its time to manifest - i.e; might site could run well for 24 hours under sqlite caching and then the error appears. Once it does, it seems to happen more and more frequently.

[quote name=‘Scott_C’ timestamp=‘1330177984’ post=‘132071’]

Dotell - I noticed you have a command listed above that reads; “skip-locking” - is this specific to the mysql dbs, and do you think this might help in avoiding the error I’m getting?

[/quote]



This was a default setting on my new server.

Thank you.


[quote name='dotell' timestamp='1330260155' post='132109']

This was a default setting on my new server.



http://stackoverflow…ng-in-my-cnf-do

[/quote]