LiTWol @ Oleg Terenchuk

  • Contact
  • Tips & Tricks
  • About me

User login

  • Request new password
To prevent automated spam submissions leave this field empty.

litwol's tweets

  • Failure is a success at ruling out an incorrect option — 2 years 28 weeks ago
  •  
  • 1 of 9
  • ››
more
Home

xml

XML memory consumption test example one

Submitted by litwol on Tue, 10/11/2011 - 21:29

To run this script on your environment you need PHP installed. I prefer to run this script in terminal (php-cli).

To see *actual* memory usage of this script run the following command in terminal: top -b -d .001 | grep php . Once above command is running, execute the following php script using command: php stats.php (assuming you've saved this file on your own computer with file name "stats.php").

REQUIREMENT:

  • Add new comment
  • Read more
Tags:
  • php
  • xml

Processing large or multiple related XML files efficiently in PHP

Submitted by litwol on Tue, 10/11/2011 - 20:33

Click here to scroll to conclussion.

I had to learn the hard way that a 512MB RAM VPS cannot handle 70MB worth of plain text XML files, when i saw a pretty simple importer script consume more than a gig of RAM sending my VPS into swap hell. What did I do wrong and how can I improve things?


Measuring RAM consumption in PHP

  • Add new comment
  • Read more
Tags:
  • php
  • xml
Syndicate content

LiTWoL © Oleg Terenchuk - Hosted on Linode.com 512