CentOS Installation

General discussion forum for the Zend Server - The full, commercial edition

Re: CentOS Installation

Postby tzachi on Wed Feb 04, 2009 11:02 am

Zend Optimizer+ tries to allocate 64MB by using mmap. In order to see exactly why mmap returns error on your machine, can you please run "free" and "ulimit -a" and give here the output?
Also as said before - stopping apache process, removing shared memory segments (you can run this "for i in `ipcs -m | grep apache | grep -v shmid | grep -v Shared | awk {'print $2'}` ; do ipcrm -m $i ; done") and starting again might help.
Last thing you can do is to configure Optimizer+ to use Shared Memory instead of mmap by setting the directive zend_optimizerplus.preferred_memory_model=shm (default in your case in mmap). This will allocate up to 64 MB (which is configured by the directive zend_optimizerplus.memory_consumption).
tzachi
 
Posts: 19
Joined: Sun Feb 01, 2009 9:19 am

Re: CentOS Installation

Postby tzachi on Wed Feb 04, 2009 11:19 am

You can also run "for i in `ipcs -s | grep apache | grep -v semid | grep -v Semap | awk {'print $2'}` ; do ipcrm -s $i ; done" to make sure this is no Apache's semaphores problem.
tzachi
 
Posts: 19
Joined: Sun Feb 01, 2009 9:19 am

Re: CentOS Installation

Postby nathacof on Wed Feb 04, 2009 8:16 pm

Code: Select all
[root@vps ~]# ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
file size               (blocks, -f) unlimited
pending signals                 (-i) 1024
max locked memory       (kbytes, -l) 32
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
stack size              (kbytes, -s) 10240
cpu time               (seconds, -t) unlimited
max user processes              (-u) 35840
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited


This is a virtuozzo VE meaning free will show you the amount of memory on the hardware node, and not my VE. Here you can see the used memory for my VE:
Code: Select all
[root@vps ~]# awk -f memory.awk /proc/user_beancounters
Held: 330.23 MB
Barrier: 1024 MB
Limit: 1152 MB
Failure Count: 0
Percent Used: 32.2491


Here you'll see the hardware node's memory usage:
Code: Select all
[root@vps ~]# free -m
             total       used       free     shared    buffers     cached
Mem:          4044       3885        159          0        134       2733
-/+ buffers/cache:       1016       3027
Swap:         2047          1       2046
Last edited by nathacof on Thu Feb 05, 2009 3:35 pm, edited 3 times in total.
nathacof
 
Posts: 26
Joined: Mon Feb 02, 2009 9:53 pm

Re: CentOS Installation

Postby tzachi on Thu Feb 05, 2009 1:10 pm

I see your post,do you have "free" and "ulimit -a" commands (it will tell me more about available memory)?
If indeed ipcs rm (of everything related to apache) didn't help, then please try to configure zend_optimizerplus.preferred_memory_model=shm.
tzachi
 
Posts: 19
Joined: Sun Feb 01, 2009 9:19 am

Re: CentOS Installation

Postby nathacof on Thu Feb 05, 2009 3:34 pm

sorry updated my previous reply. I'm going to have to wait till the weekend or maybe overnight to try this out again. As this is my production site.
nathacof
 
Posts: 26
Joined: Mon Feb 02, 2009 9:53 pm

Re: CentOS Installation

Postby shahar on Thu Feb 05, 2009 3:44 pm

Hi nathacof,

Thanks for looking into this - in the mean time, we will try to see if this is a Virtuozzo specific issue - perhaps we will be able to get more info on this from Parallels.

We will update you if anything comes up.

Thanks,

Shahar.
shahar
 
Posts: 245
Joined: Mon Oct 06, 2008 12:37 pm
Location: Israel

Re: CentOS Installation

Postby nickma on Thu Feb 05, 2009 9:52 pm

We had similar issues while testing Zend Server with Parallels.

VZ Containers have their own resource limitation in addition to Hardware Node limitations.

Try changing private memory and shared memory limits on the machine and then start the Apache .
vzctl set XYZ --privvmpages 131072:196608
vzctl set XYZ --shmpages 260096:260096

You can also change the settings from Parallels Web GUI.
Infrastructure - > Containers -> Resources -> Memory -> Secondary System Parameters for privvmpages and Auxiliary System Parameters
for shmpages.
User avatar
nickma
 
Posts: 137
Joined: Mon Dec 29, 2008 5:27 pm

Re: CentOS Installation

Postby nathacof on Mon Feb 09, 2009 10:41 pm

The installation went without issue on a fresh VPS running CentOSx64 under VMWare ESX. Except I had to update the symlink to ZendServer.
Last edited by nathacof on Tue Feb 10, 2009 4:13 am, edited 1 time in total.
nathacof
 
Posts: 26
Joined: Mon Feb 02, 2009 9:53 pm

Re: CentOS Installation

Postby nathacof on Mon Feb 09, 2009 10:44 pm

nickma wrote:Try changing private memory and shared memory limits on the machine and then start the Apache .
vzctl set XYZ --privvmpages 131072:196608
vzctl set XYZ --shmpages 260096:260096


Looks like my shmpages is set to 32MB. I wonder if this would work if I dropped PHP's memory_limit.
Code: Select all
[root@vps ~]# awk '/pages/ {print "[",$1,"]\n",
> " Held: ",$3*4/1024,"MB\n ",
> "Barrier: " $4*4/1024,"MB\n ",
> "Limit: ", $5*4/1024,"MB\n ",
> "Fail Count: ", $6,"\n\n"}' /proc/user_beancounters
[ lockedpages ]
  Held:  0 MB
  Barrier: 0.125 MB
  Limit:  0.125 MB
  Fail Count:  0


[ privvmpages ]
  Held:  225.004 MB
  Barrier: 1024 MB
  Limit:  1152 MB
  Fail Count:  0


[ shmpages ]
  Held:  3.10938 MB
  Barrier: 32.8125 MB
  Limit:  32.8125 MB
  Fail Count:  113


[ physpages ]
  Held:  72.4453 MB
  Barrier: 0 MB
  Limit:  8.38861e+06 MB
  Fail Count:  0


[ vmguarpages ]
  Held:  0 MB
  Barrier: 1024 MB
  Limit:  8.38861e+06 MB
  Fail Count:  0


[ oomguarpages ]
  Held:  72.4453 MB
  Barrier: 100 MB
  Limit:  8.38861e+06 MB
  Fail Count:  0


I may play around with the original VPS a bit more in the future but for now I'm going to be testing out the new VPS! :D
nathacof
 
Posts: 26
Joined: Mon Feb 02, 2009 9:53 pm

Re: CentOS Installation

Postby nathacof on Tue Feb 10, 2009 6:11 pm

I don't know if it's a difference between VMWare ESX, and Virtuozzo, or if Zend Server is just that good. But check out these preliminary benchmarks:

Zend Server (VMWare ESX) vs Vanilla PHP (VMWare ESX) vs. Vanilla PHP (Virtuozzo):
==========================================================
ab -n 10000 -c 5 http://vps2.neranjara.org/article
Finished 10000 requests


Server Software: Apache/2.2.3
Server Hostname: vps2.neranjara.org
Server Port: 80

Document Path: /article
Document Length: 6038 bytes

Concurrency Level: 5
Time taken for tests: 215.090 seconds
Complete requests: 10000
Failed requests: 830
(Connect: 0, Receive: 0, Length: 830, Exceptions: 0)
Write errors: 0
Total transferred: 64276526 bytes
HTML transferred: 60395362 bytes
Requests per second: 46.49 [#/sec] (mean)
Time per request: 107.545 [ms] (mean)
Time per request: 21.509 [ms] (mean, across all concurrent requests)
Transfer rate: 291.83 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 18 22 3.6 21 68
Processing: 64 86 127.8 82 6944
Waiting: 45 63 127.6 60 6914
Total: 84 107 127.9 103 6972

Percentage of the requests served within a certain time (ms)
50% 103
66% 108
75% 110
80% 111
90% 117
95% 122
98% 129
99% 134
100% 6972 (longest request)
==========================================================
ab -n 10000 -c 5 http://mysql.neranjara.org/article
Finished 10000 requests


Server Software: Apache/2.2.3
Server Hostname: mysql.neranjara.org
Server Port: 80

Document Path: /article
Document Length: 6038 bytes

Concurrency Level: 5
Time taken for tests: 440.873659 seconds
Complete requests: 10000
Failed requests: 1033
(Connect: 0, Length: 1033, Exceptions: 0)
Write errors: 0
Total transferred: 64258869 bytes
HTML transferred: 60378869 bytes
Requests per second: 22.68 [#/sec] (mean)
Time per request: 220.437 [ms] (mean)
Time per request: 44.087 [ms] (mean, across all concurrent requests)
Transfer rate: 142.34 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.8 0 33
Processing: 100 219 75.8 213 5229
Waiting: 99 218 75.8 212 5228
Total: 100 219 75.8 214 5229

Percentage of the requests served within a certain time (ms)
50% 214
66% 229
75% 241
80% 249
90% 275
95% 304
98% 339
99% 368
100% 5229 (longest request)
==========================================================
ab -n 10000 -c 5 http://neranjara.org/article
Finished 10000 requests


Server Software: Apache/2.2.3
Server Hostname: neranjara.org
Server Port: 80

Document Path: /article
Document Length: 5945 bytes

Concurrency Level: 5
Time taken for tests: 720.489 seconds
Complete requests: 10000
Failed requests: 8827
(Connect: 0, Receive: 0, Length: 8827, Exceptions: 0)
Write errors: 0
Total transferred: 63568742 bytes
HTML transferred: 59458742 bytes
Requests per second: 13.88 [#/sec] (mean)
Time per request: 360.244 [ms] (mean)
Time per request: 72.049 [ms] (mean, across all concurrent requests)
Transfer rate: 86.16 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 17 23 30.2 21 3015
Processing: 156 337 133.1 313 1758
Waiting: 138 315 132.9 291 1737
Total: 177 360 136.7 336 3439

Percentage of the requests served within a certain time (ms)
50% 336
66% 389
75% 425
80% 447
90% 516
95% 588
98% 718
99% 842
100% 3439 (longest request)


These results are without a valid license, so I'm not even utilizing zend page_cache yet...

Either way I think my testing server is going to be my production server soon. :P
nathacof
 
Posts: 26
Joined: Mon Feb 02, 2009 9:53 pm

PreviousNext

Return to Zend Server

Who is online

Users browsing this forum: No registered users and 0 guests