I love Zope 2 since she (it?) makes my devel life better, makes me headbang sometimes, makes building something like this easy and worthwhile.
This is following Khairil's meme post
... start putting a blog entry titled "I Love
Trackback is http://myzope.kedai.com.my/blogs/kedai/209/tbping
In case you live in a cave, or have not heard, foss.my is scheduled on Nov 8-9, 2008 at APIT, TPM.
This is a good place for all to meet and contribute. If you've been experimenting or hacking on something cool and foss, go give a talk so that all can be awed!
If you're not doing anything., drop by (it's only RM30) and meet others. I believe there will be a lot of love and a lot we can learn.
Since not all can give a talk and maybe there will be time for us pythonistas to meet. I would think a bof session will be interesting.
Maybe a "Python in your workplace" bof?
Trackback is http://myzope.kedai.com.my/blogs/kedai/208/tbping
I'm on leave for Raya and has been connected to the net via Celcom 3g (computer) and edge (h/p).
Celcom 3G is now usable. I've been getting consistent 3G speed at all places I've been: Batu Pahat, Muar, and Salak Tinggi.
I've had bad luck at these places the last two month. Now I can view NFL videos without a hitch! Which is cool since I can't view the game live (via Astro).
So, good job Celcom!
Trackback is http://myzope.kedai.com.my/blogs/kedai/207/tbping
In a jiffy. We're going to celebrate Eid al Fitri end of this month.
It's a tradition here in Malaysia that those abroad or away return home; where ever home may be. To many, it's where their parents are.
Some may not be able to return and thus sends greeting cards, videos, etc.
That's where this story came about. We were asked to build a greeting site that will accept videos and display the videos for all to see.
The catch is we have to do it in a jiffy. So, please excuse the plain site.
What we did:
- create a zope product that stores the video properties, and add the video to the file system
- have a python script poll a directory and process the video files using mencoder (transcode to a flv), ffmpeg (take a snapshot of the splash page) and copy the flv so that lighttpd will serve the flv.
Since the site owner wants the site yesterday, we could not do a proper stress test.
But we did manage to do apache bench (ab).
Here's the result:
# ab -n 500 -c 150 http://salamperantau.my/sp/
This is ApacheBench, Version 2.0.41-dev <$Revision: 1.121.2.12 $> apache-2.0
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/
Benchmarking salamperantau.my (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Finished 500 requests
Server Software: Zope/(Zope
Server Hostname: salamperantau.my
Server Port: 80
Document Path: /sp/
Document Length: 28515 bytes
Concurrency Level: 150
Time taken for tests: 29.434537 seconds
Complete requests: 500
Failed requests: 0
Write errors: 0
Total transferred: 15466896 bytes
HTML transferred: 15328321 bytes
Requests per second: 16.99 [#/sec] (mean)
Time per request: 8830.361 [ms] (mean)
Time per request: 58.869 [ms] (mean, across all concurrent requests)
Transfer rate: 513.14 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 34 1097 1602.6 118 9125
Processing: 162 4971 4686.2 3366 27697
Waiting: 62 1368 3011.3 208 15803
Total: 385 6069 5148.0 4484 27752
Percentage of the requests served within a certain time (ms)
50% 4484
66% 6832
75% 8817
80% 9926
90% 13480
95% 16129
98% 20260
99% 23103
100% 27752 (longest request)
# ab -n 1500 -c 550 http://salamperantau.my/sp/
This is ApacheBench, Version 2.0.41-dev <$Revision: 1.121.2.12 $> apache-2.0
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/
Benchmarking salamperantau.my (be patient)
Completed 150 requests
Completed 300 requests
Completed 450 requests
Completed 600 requests
Completed 750 requests
Completed 900 requests
Completed 1050 requests
Completed 1200 requests
Completed 1350 requests
Finished 1500 requests
Server Software: Zope/(Zope
Server Hostname: salamperantau.my
Server Port: 80
Document Path: /sp/
Document Length: 28515 bytes
Concurrency Level: 550
Time taken for tests: 93.437926 seconds
Complete requests: 1500
Failed requests: 18
(Connect: 0, Length: 18, Exceptions: 0)
Write errors: 0
Total transferred: 48610908 bytes
HTML transferred: 48155900 bytes
Requests per second: 16.05 [#/sec] (mean)
Time per request: 34260.573 [ms] (mean)
Time per request: 62.292 [ms] (mean, across all concurrent requests)
Transfer rate: 508.05 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 6 1846 2714.0 131 24625
Processing: 273 21232 19422.3 14800 91218
Waiting: -1221655310235 -2147483648 83287756765.2 566 84931
Total: 353 23079 19735.5 17220 93121
Percentage of the requests served within a certain time (ms)
50% 17220
66% 27006
75% 34304
80% 38438
90% 52617
95% 64155
98% 75835
99% 82032
100% 93121 (longest request)
# ab -n 1000 -c 900 http://salamperantau.my/sp/vsection?category=Profesional
This is ApacheBench, Version 2.0.41-dev <$Revision: 1.121.2.12 $> apache-2.0
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/
Benchmarking salamperantau.my (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Finished 1000 requests
Server Software: Zope/(Zope
Server Hostname: salamperantau.my
Server Port: 80
Document Path: /sp/vsection?category=Profesional
Document Length: 22624 bytes
Concurrency Level: 900
Time taken for tests: 60.998529 seconds
Complete requests: 1000
Failed requests: 0
Write errors: 0
Total transferred: 31148705 bytes
HTML transferred: 30732257 bytes
Requests per second: 16.39 [#/sec] (mean)
Time per request: 54898.675 [ms] (mean)
Time per request: 60.999 [ms] (mean, across all concurrent requests)
Transfer rate: 498.67 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 6 3711 3617.8 3347 24709
Processing: 75 21388 14940.2 18707 57504
Waiting: 27 6282 10214.6 2526 44927
Total: 85 25100 16103.4 23186 60869
Percentage of the requests served within a certain time (ms)
50% 23186
66% 30877
75% 36829
80% 39896
90% 49676
95% 54790
98% 58847
99% 59815
100% 60869 (longest request)
From the result, it doesn't matter how hard we hit it (increase # of requests and concurrency), we will always get about 16 requests/s.
There were a few failed requests though, especially when the concurrency was high.
I just hope the site can stand traffic, if ever it spikes :P
If ever we need to scale, we might:
- chuck in zope clients and start using zeo
- use rsync to sync the flv files across
- have keepalived loadbalance requests
Trackback is http://myzope.kedai.com.my/blogs/kedai/206/tbping
Here's how I installed xen on Centos. Requirement - installed xen enabled kernel and reboot.
Then run virt-install
virt-install
What is the name of your virtual machine? s20
How much RAM should be allocated (in megabytes)? 1000
What would you like to use as the disk (file path)? /usr/local/vdisk/s20
How large would you like the disk (/usr/local/vdisk/s20) to be (in gigabytes)? 30
Would you like to enable graphics support? (yes or no) no
What is the install location? http://mirror.oscc.org.my/centos/5.2/os/x86_64
Welcome to CentOS
+---------+ Choose a Language +---------+
| |
| What language would you like to use |
| during the installation process? |
| |
| Catalan ^ |
| Chinese(Simplified) : |
| Chinese(Traditional) # |
| Croatian : |
| Czech : |
| Danish : |
| Dutch : |
| English v |
| |
| +----+ |
| | OK | |
| +----+ |
| |
| |
+---------------------------------------+
<Tab>/<Alt-Tab> between elements | <Space> selects | <F12> next screen
+----------------+ Configure TCP/IP +----------------+
| |
| [*] Enable IPv4 support |
| ( ) Dynamic IP configuration (DHCP) |
| (*) Manual configuration |
| |
| [ ] Enable IPv6 support |
| (*) Automatic neighbor discovery (RFC 2461) |
| ( ) Dynamic IP configuration (DHCP) |
| ( ) Manual configuration |
| |
| +----+ +------+ |
| | OK | | Back | |
| +----+ +------+ |
| |
| |
+----------------------------------------------------+
<Tab>/<Alt-Tab> between elements | <Space> selects | <F12> next screen
+--------------+ Manual TCP/IP Configuration +---------------+
| |
| Enter the IPv4 and/or the IPv6 address and prefix |
| (address / prefix). For IPv4, the dotted-quad netmask |
| or the CIDR-style prefix are acceptable. The gateway and |
| name server fields must be valid IPv4 or IPv6 addresses. |
| |
| IPv4 address: 192.168.x.x____ / 255.255.255.0___ |
| Gateway: 192.168.x.x____________________________ |
| Name Server: 192.228.128.20___________________________ |
| |
| +----+ +------+ |
| | OK | | Back | |
| +----+ +------+ |
| |
| |
+------------------------------------------------------------+
<Tab>/<Alt-Tab> between elements | <Space> selects | <F12> next screen
+----------------------------+ Retrieving +----------------------------+
| |
| Retrieving images/stage2.img... |
| |
+----------------------------------------------------------------------+
<Tab>/<Alt-Tab> between elements | <Space> selects | <F12> next screen
+-----------------+ Warning +-----------------+
| |
| The partition table on device xvda was |
| unreadable. To create new partitions it |
| must be initialized, causing the loss of |
| ALL DATA on this drive. |
| |
| This operation will override any previous |
| installation choices about which drives |
| to ignore. |
| |
| Would you like to initialize this drive, |
| erasing ALL DATA? |
| |
| +-----+ +----+ |
| | Yes | | No | |
| +-----+ +----+ |
| |
| |
+---------------------------------------------+
<Tab>/<Alt-Tab> between elements | <Space> selects | <F12> next screen
+-------------------------+ Partitioning Type +-------------------------+
| |
| Installation requires partitioning of your hard drive. The |
| default layout is reasonable for most users. You can either |
| choose to use this or create your own. |
| |
| Remove all partitions on selected drives and create default layout. |
| Remove linux partitions on selected drives and create default layout. |
| Use free space on selected drives and create default layout. |
| Create custom layout. |
| |
| Which drive(s) do you want to use for this installation? |
| [*] xvda 30718 MB (Xen Virtual Block Device) ^ |
| # |
| |
| +----+ +------+ |
| | OK | | Back | |
| +----+ +------+ |
| |
| |
+-----------------------------------------------------------------------+
<Space>,<+>,<-> selection | <F2> Add drive | <F12> next screen
+-------------+ Warning +-------------+
| |
| You have chosen to remove all |
| Linux partitions (and ALL DATA on |
| them) on the following drives: |
| |
| /dev/xvda |
| |
| Are you sure you want to do this? |
| |
| +----+ +-----+ |
| | No | | Yes | |
| +----+ +-----+ |
| |
| |
+-------------------------------------+
<Tab>/<Alt-Tab> between elements | <Space> selects | <F12> next screen
+----------+ Boot Loader Configuration +-----------+
| |
| Which boot loader would you like to use? |
| |
| (*) Use GRUB Boot Loader |
| ( ) No Boot Loader |
| |
| +----+ +------+ |
| | OK | | Back | |
| +----+ +------+ |
| |
| |
+--------------------------------------------------+
+------------------+ Boot Loader Configuration +------------------+
| |
| A few systems will need to pass special options to the kernel |
| at boot time for the system to function properly. If you need |
| to pass boot options to the kernel, enter them now. If you |
| don't need any or aren't sure, leave this blank. |
| |
| console=xvc0____________________________________ |
| |
| [ ] Force use of LBA32 (not normally required) |
| |
| +----+ +------+ |
| | OK | | Back | |
| +----+ +------+ |
| |
| |
+-----------------------------------------------------------------+
++ Network Configuration for eth0 ++
| |
| Xen Virtual Ethernet |
| 00:16:3E:54:FB:1D |
| |
| [*] Activate on boot |
| [*] Enable IPv4 support |
| [ ] Enable IPv6 support |
| |
| +----+ +------+ |
| | OK | | Back | |
| +----+ +------+ |
| |
| |
+----------------------------------+
+----------------+ Installation Progress +----------------+
| |
| Retrieving installation information... |
| |
| 40% |
| |
+---------------------------------------------------------+
+----------------------+ Package selection +----------------------+
| |
| The default installation of CentOS includes a set of software |
| applicable for general internet usage. What additional tasks |
| would you like your system to include support for? |
| |
| [ ] Server ^ |
| [ ] Server - GUI : |
| [ ] Clustering # |
| [ ] Storage Clustering v |
| |
| [*] Customize software selection |
| |
| +----+ +------+ |
| | OK | | Back | |
| +----+ +------+ |
| |
| |
+-----------------------------------------------------------------+
+------------------+ Package Installation +------------------+
| |
| Name : filesystem-2.4.0-1.el5.centos-x86_64 |
| Size : 0k |
| Summary: The basic directory layout for a Linux system. |
| |
| |
| Status: |
| |
| 0% |
| |
| Packages Bytes Time |
| Total : 766 1736M 42:28:07 |
| Completed: 3 0M 0:00:44 |
| Remaining: 763 1736M 42:27:22 |
| |
| 0% |
| |
+------------------------------------------------------------+
+----------------------+ Complete +-----------------------+
| |
| Congratulations, your CentOS installation is complete. |
| |
| Remove any media used during the installation process |
| and press <Enter> to reboot your system. |
| |
| |
| +--------+ |
| | Reboot | |
| +--------+ |
| |
| |
+---------------------------------------------------------+
One hitch, xen only works with the first NIC by default. Adding new ones after installation is easy enough
Important xm commnds:
- xm list
- xm create [virtserver]
- xm console [virtserver]
- xm help
And ^] to go to host OS in linux and ^5 in putty.
Trackback is http://myzope.kedai.com.my/blogs/kedai/205/tbping
Google is taking over the web
Beware IE. Or will Firefox be the victim? I haven't tested chrome yet, but will do soon enough. As others, methinks.
Trackback is http://myzope.kedai.com.my/blogs/kedai/204/tbping
