Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 16 lines (11 sloc) 1.04 KB
d' log/production.log -n  (可以显示行数)
2. more +行数 log/produciton.log
3. 就可以查看错误的行在哪了
事件驱动服务器(thin,node.js,tornado)采用reactor stayle I/O dispatch architecture for handling I/O concurrency
所以他们能处理a couple of thousand level concurrency 但是他们都是single-threaded nature 所以他们不能充分利用多核心cpu
so you need to run a couple of processes, one per CPU core, to fully utilize your CPU.
Ruby 1.8 uses userspace threads, not operating system threads. This means that Ruby 1.8 can only utilize a single CPU core
no matter how many Ruby threads you create.
Ruby 1.9 finally uses operating system threads, but it has a global interpreter lock, which means that each time a Ruby 1.9
thread is running it will prevent other Ruby threads from running, effectively making it the same multicore-wise as 1.8.
即使使用的web框架是支持高并发的,但是如果其中引用了un thread-safe的gem包那么一样不能高并发,所以引用gem包的时候需要注意