LMS cache size & symlink?

General discussion relating to the O2 Joggler, from the default O2 setup, to alternative operating systems and applications.
Post Reply
Algo
Posts: 23
Joined: Mon Apr 22, 2013 11:07 am
Location: Kent
Contact:

LMS cache size & symlink?

Post by Algo »

Hi,
I'm having loads of fun joggling with the marvelous Squeezplay OS (internal install), but everytime I add music to my network library, the cache size grows!
Doh! Well you'd expect that really!
I'm just wondering if:
creating a symlink from /var/lib/squeezeboxserver/cache to a "cache" folder on a USB SSD
could be used to stop onboard RAM being gobbled up?
Or is this too much like a perpetual motion machine? :lol:

Any takers?
User avatar
JimbobVFR400
Posts: 264
Joined: Fri Jul 20, 2012 8:39 pm

Re: LMS cache size & symlink?

Post by JimbobVFR400 »

I'd be tempted to just run SqPOS from the USB if you're going to have it plugged in anyway.
User avatar
pete
Posts: 2961
Joined: Mon Aug 01, 2011 6:33 am
Location: Time Traveler

Re: LMS cache size & symlink?

Post by pete »

Here I went to using USB SSD sticks inside of the Joggler. You can maybe keep some of the OS on the internal memory and do a chroot to the USB stick making it do most of the work. (I did this with the Chumby a while ago as it booted from a microSD internally mounted card).

I did though add another USB port inside most of my Jogglers to do this. In order to fit the oversized SSD USB stick I removed it from the case. That said though I also removed the USB socket from the WLAN wireless stick such that I could fit the two inside of the Joggler case. This also left a free side USB port. I did this only with 8 Gb SSD sticks. I think the 16 Gb USB sticks have the same footprints. I did also try these little mini 16Gb USB sticks and these eventually wore out on me though.

I am having a similiar issue with XBMC running on an internal 2Gb memory whatever inside of the Openpeak2.
- Pete
O2 Jogglers running EFI Ubuntu / Squeezeplayer
OpenPeak Voip Telephony / Zigbee tabletops hardware modded with Seabios / RTC / Ethernet ROM edits / SSD drives running XPe for automation screens

Auto mater
Algo
Posts: 23
Joined: Mon Apr 22, 2013 11:07 am
Location: Kent
Contact:

Re: LMS cache size & symlink?

Post by Algo »

Thanks for the replys folks.

Jimbob: yeah, that occurred to me after I'd posted!

Pete: I think it was your post that led me to get a USB SSD.
I intend to install it internally, alongside the DAC I've already installed..... that means losing the WiFi stick which I don't use.
I'll need to investigate chroot then.
You say moving some of the system, how critical is it as far as what gets moved?
The idea of moving just the cache came from the wish to ease frequent library updates and expand potential cache growth.
More Putty'ing for me then! :)
User avatar
pete
Posts: 2961
Joined: Mon Aug 01, 2011 6:33 am
Location: Time Traveler

Re: LMS cache size & symlink?

Post by pete »

Its been a while since I have played with the Chumby.

My direction at the time was to kind of keep the original OS on the microSD card and modify it such that it would give me a choice of what was going to boot. I then after playing a bit just moved most of the new OS to a CF card.
- Pete
O2 Jogglers running EFI Ubuntu / Squeezeplayer
OpenPeak Voip Telephony / Zigbee tabletops hardware modded with Seabios / RTC / Ethernet ROM edits / SSD drives running XPe for automation screens

Auto mater
Algo
Posts: 23
Joined: Mon Apr 22, 2013 11:07 am
Location: Kent
Contact:

Re: LMS cache size & symlink?

Post by Algo »

Hi Pete,
Symlink is not what I need, chown is overkill.

So, it seems the best bet is running the OS from a USB SSD as you suggest.

Thanks to all!
Alistair
User avatar
pete
Posts: 2961
Joined: Mon Aug 01, 2011 6:33 am
Location: Time Traveler

Re: LMS cache size & symlink?

Post by pete »

I have now had something like 10 of these USB SSD sticks; all the same at 8Gb purchased for the Joggler and only utilized for the Joggler. All of them have been removed from their little plastic cases. Think the brand was Kingspec and only one to date has gone bad on me. I have since though gone to using little 16Gb SSD ZIF drives. This also can be found inexpensively lately.

Yup the chroot stuff was an experiment with the Chumby at the time. The original base OS was similiar to the Joggler using flash widgets. Only thing was that it was a bit slow at 800Mhz/Arm CPU. Today with my Seagate Dockstar running Arch Linux and my sprinkler system I have set up two USB drives. The first stick is the OS and the second one is a backup of the first (via a nightly cron job) plus a swap file. Basically if the first memory gets trashed then it defaults to the second one still using the same swap file set up.
if [ -e /mnt/data/etc/rc.local ];
then
if [ -e /dev/sdb1 ];
then
#swapon /dev/sda2
if [ ! -e /mnt/data2/swapfile ];
then
dd if=/dev/zero of=/mnt/data2/swapfile bs=1M count=256
chmod 600 /mnt/data2/swapfile
mkswap /mnt/data2/swapfile
fi
swapon /mnt/data2/swapfile
if [ ! -e /mnt/data2/usr/mcsSprinklers/HTML/mcsSprinklers/Images/no.gif ];
then
if [ ! -d /mnt/data2/usr ];
then
mkdir /mnt/data2/usr
fi
cp -R /mnt/data/usr/mcsSprinklers /mnt/data2/usr
rm /mnt/data2/usr/mcsSprinklers/*
fi
else
#second drive does not exist now
swapon /dev/sda2
fi
else
#swapon /dev/sdb2
if [ ! -e /mnt/data/swapfile ];
then
dd if=/dev/zero of=/mnt/data/swapfile bs=1M count=256
chmod 600 /mnt/data/swapfile
mkswap /mnt/data/swapfile
fi
swapon /mnt/data/swapfile
if [ ! -e /mnt/data/usr/mcsSprinklers/HTML/mcsSprinklers/Images/no.gif ];
then
if [ ! -d /mnt/data/usr ];
then
mkdir /mnt/data/usr
fi
cp -R /mnt/data2/usr/mcsSprinklers /mnt/data/usr
rm /mnt/data/usr/mcsSprinklers/*
fi
fi
- Pete
O2 Jogglers running EFI Ubuntu / Squeezeplayer
OpenPeak Voip Telephony / Zigbee tabletops hardware modded with Seabios / RTC / Ethernet ROM edits / SSD drives running XPe for automation screens

Auto mater
User avatar
pete
Posts: 2961
Joined: Mon Aug 01, 2011 6:33 am
Location: Time Traveler

Re: LMS cache size & symlink?

Post by pete »

Algo,

I was typing so fast that I wasn't paying attention. That said I went to respond to your last message and now its not there?
Do you know if it is possible to alter the SQLite database directory path?
Personally you can do anything when it. I have not tried.

I have squeezebox server running concurrently with MythTV on an Ubuntu 64 bit configuration on a mini BCM multimedia do all motherboard. This mITX board has HDMI out (with audio), DVI, VGA plus 2 onboard LCD ports, miniPCiE, PCiE and much more.

That said I have left a couple of Joggler squeezeplayers running but not really paid attention to them cuz they work fine.

More efforts lately into playing with XBMC on the Joggler.
Attachments
TV-1.jpg
- Pete
O2 Jogglers running EFI Ubuntu / Squeezeplayer
OpenPeak Voip Telephony / Zigbee tabletops hardware modded with Seabios / RTC / Ethernet ROM edits / SSD drives running XPe for automation screens

Auto mater
Algo
Posts: 23
Joined: Mon Apr 22, 2013 11:07 am
Location: Kent
Contact:

Re: LMS cache size & symlink?

Post by Algo »

Thanks Pete, don't know what happened to my post.
Anyhow my setup is:
Squeezplay OS and LMS with a database of 500 or so albums (network storage) on Joggler #1.
This has a USB DAC shoe-horned into it, and I hope to fit an 8GB SSD too (it arrived today!).
I had thought it might be possible to free up RAM by moving the SQLite database library from internal RAM onto the SSD, but that looks to be difficult/impossible. Therfore, running the OS from SSD seems a sensible, if less elegant, solution

Another thought was to use a Joggler (#2) with a dud screen, purely as a Squeeze server for Joggler #1.
Managed to get one cheaply, but unfortunately the unit is fully functional and thus too good for the intended use :D.
Need to buy another one now! I think the Jogglers are awesome, so...... you really can't have too many can you?
I really appreciate all the help, so it's time I rolled up my sleeves and document what hardware efforts I've made/am making even if it is only "Standing on the shoulders of giants"!

Cheers.
Alistair
User avatar
pete
Posts: 2961
Joined: Mon Aug 01, 2011 6:33 am
Location: Time Traveler

Re: LMS cache size & symlink?

Post by pete »

If you want to hack the hardware a bit more you can connect a ZIF SSD drive to the PATA port on the Joggler and utilize that.
- Pete
O2 Jogglers running EFI Ubuntu / Squeezeplayer
OpenPeak Voip Telephony / Zigbee tabletops hardware modded with Seabios / RTC / Ethernet ROM edits / SSD drives running XPe for automation screens

Auto mater
Algo
Posts: 23
Joined: Mon Apr 22, 2013 11:07 am
Location: Kent
Contact:

Re: LMS cache size & symlink?

Post by Algo »

Many thanks for all the useful tips.
I'll get down to some work in the next couple of days!
Post Reply