311 reputation
16
bio website
location Finland
age 35
visits member for 2 years, 3 months
seen Mar 20 at 13:00

My daily work is a closed source PHP project but I'm really interested in open source projects and I know PHP, C/C++ and Perl 5 pretty well. I can do some Java, Python, x86 assembler (intel syntax) and some other programming languages, too. I'm currently running Ubuntu (workstation, home computer, laptop) and Cyanogenmod (phone) as my OS of choice. GPG: 563168EB


Jun
27
comment limit linux background flush (dirty pages)
Elevevator in software is a tradeoff: sacrifice latency to improve bandwidth. For example, imagine 100K write ops in the software queue submitted in random order; if the software elevator can order those ops using a huge buffer it may end up sending only 5K much bigger requests to the device. However, as a result, the latency needs to be increased by 100K ops because it may be that the first 2K ops and last 1K ops are actually near each other on the device. Without added latency, it will be impossible to merge those.
Jun
27
comment limit linux background flush (dirty pages)
Logically dirty_bytes should be barely high enough to not stall CPUs while processes are writing if the process is writing on average with the throughput of the device. If your application code is doing cycles of huge computation followed by writing huge amount of data, if will be very hard to optimize because short time averages differs greatly from long time averages. The correct solution would be to adjust process specific dirty_bytes setting but Linux does not support such thing as far as I know.
Jan
16
comment Why does “cat /dev/null” and “ls” take 5 seconds to load?
It seems that your httpd processes are pretty heavy because those eat way more CPU time than mysqld. I'd investigate if it's possible to optimize the code run by httpd processes (possibly PHP code?) to reduce CPU usage. If you have your own server room, it probably makes sense to move mysqld on a server of its own, run a reverse proxy with load balancer (recent apache with mod_proxy is fine) and run multiple httpd worker boxes in between. This is probably cheaper than getting one machine with very fast CPU.
Jan
16
comment Why does “cat /dev/null” and “ls” take 5 seconds to load?
I agree. The system is not memory or I/O limited because there's plenty of cache and system wait (wa in top output) is low. The system simply cannot provide enough CPU time to even start running cat in less than 5 seconds. If you cannot reduce the workload, the only fix is to get more CPU power. Your workload runs with very high concurrency so I would get CPU with as many cores as possible.
Jan
16
comment Very high CPU and low RAM usage - is it possible to place some of swap some of the CPU usage to the RAM (with CloudLinux LVE Manager installed)?
Looking at your top ouput suggests that mysqld is the bottleneck because it's using close to 5 cores in the same time all your php processses use only a little CPU time. With very high probability your PHP code executes some SQL queries that cause locking between MySQL processes. MySQL is known to be poor performer for concurrent write access from multiple clients so try to avoid any writes to the database if possible at all. If your PHP code supports other backends, you should try using some recent PostgreSQL version instead because it probably performs better with concurrent writes.
Jan
11
comment is it possible to force SMART to re-check Offline sectors?
The only 2 ways disk location within the computer case can have a difference are as follows: (1) the location is poorly ventilated and disk overheats (see temperature SMART data), or (2) power source is bad and the power cord running to said location cannot handle the power requirements of the disk drive. Bad power source can cause random errors in any electronic device. The only way to rule (2) out is to use another power source and see if the problem goes away.
Dec
11
comment How dangerous is NFS async when RAID BBU and UPS are present?
If I have understood correctly, using async for NFS is analogous to allowing disk cache (e.g. using nobarrier for local ext4 file system) and then losing power. In case of NFS "losing power" is technically server's kernel crash. The end result should be similar.
Jun
25
comment The best “performance per watt” (MFLOPS/W) for CPU and GPU for the moment
@osgx: it would be interesting to know. In worst case, it's 32 bit and the performance ratio of HD 7970 for single/double precision is 947.2/3788.8 giving 4118 MFLOPS/W for double precision. Still quite bit better than top 1 as of November 2011...
Jun
25
comment Will a 300W psu drain more power than a 100W if the system only uses ~80W?
A modern, highly efficient power supply with 85% rating is required to have a minimum efficiency of 85%. That means that for a suitable load it could be a lot more efficient. If your "300W" power supply does not provide any specific efficiency, you can guess it has efficiency of 50% for anything but close the full load. In short: if both are low quality power supplies, then the "300W" model will probably eat more electricity. For high quality power supplies, the power drain should be close to equal but "300W" model is probably more costly to purchase as a new.
Jun
25
comment How should I tune apache when I see high CPU, but low memory usage?
The problem is definitely something that runs inside Apache process but is not the apache itself. The mod_php is indeed the most likely cause. You need to profile the PHP scripts you're running and figure out what those are doing to waste the CPU.It is not the database, though. If database is the bottle neck, you'll see lots of Apache processes IO blocked waiting for response from the database. The fact that Apache/PHP processes eat CPU means that they are not waiting for IO (unless you're running scripts that use busy waiting and non-blocking IO, in which case you have found the cause).
Jun
25
comment Linux Kernel Versioning: Debian Sid vs Ubuntu Precise
The situation is a bit muddy. According to the Ubuntu Kernel FAQ (wiki.ubuntu.com/Kernel/…) one can infer the base kernel version from the Ubuntu version. However, in reality, one must check /proc/version_signature or consult list at kernel.ubuntu.com/~kernel-ppa/info/kernel-version-map.html. For specific changes, see file /usr/share/doc/linux-image-*/changelog.Debian.gz and compare it to wiki.ubuntu.com/Kernel/FAQ/UbuntuDelta or fetch the Ubuntu git tree.
Jun
21
comment How can I take advantage of IW10 in kernel 2.6.33?
The article at igvita.com highly probably has an error where it claims 2.6.33 supports IW10.
Dec
21
comment Backup strategy for eCryptfs
I think that eCryptfs really encrypts the file in 4KB blocks so a localized change to a file should modify at max additional 8KB of the file. As a result, rsync should work fine.